celeborn/common
cchung100m 4e1e97b2c2
[CELEBORN-478] Replace putIfAbsent with computeIfAbsent in ConcurrentHashMap in Java code
### What changes were proposed in this pull request?

Replace `putIfAbsent` with computeIfAbsent in ConcurrentHashMap

### Why are the changes needed?

The invoking of `putIfAbsent` will always call its value if it's a time-consuming operation. So we'd better replace `putIfAbsent` with `computeIfAbsent` in some critical paths.

### Does this PR introduce _any_ user-facing change?

No, it does not affect the user-facing API

### How was this patch tested?

current UT

Closes #1567 from cchung100m/CELEBORN-478.

Lead-authored-by: cchung100m <cchung100m@cs.ccu.edu.tw>
Co-authored-by: Cheng Pan <chengpan@apache.org>
Co-authored-by: Neo Chien <cchung100m@cs.ccu.edu.tw>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-06-29 16:44:18 +08:00
..
src [CELEBORN-478] Replace putIfAbsent with computeIfAbsent in ConcurrentHashMap in Java code 2023-06-29 16:44:18 +08:00
pom.xml [CELEBORN-666] Define protobuf-maven-plugin in the root pom.xml 2023-06-12 19:46:46 +08:00