Skip to content

Commit

Permalink
Replace putIfAbsent with computeIfAbsent in DruidBalancer
Browse files Browse the repository at this point in the history
  • Loading branch information
dgolitsyn committed Jun 27, 2017
1 parent 574587b commit 11f2eaa
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public DruidCoordinatorRuntimeParams run(DruidCoordinatorRuntimeParams params)
params.getDruidCluster().getHistoricals().entrySet()) {
String tier = entry.getKey();

currentlyMovingSegments.putIfAbsent(tier, new ConcurrentHashMap<>());
currentlyMovingSegments.computeIfAbsent(tier, t -> new ConcurrentHashMap<>());

if (!currentlyMovingSegments.get(tier).isEmpty()) {
reduceLifetimes(tier);
Expand Down

0 comments on commit 11f2eaa

Please sign in to comment.