From b0fe5f3b5bd4205a163a2e1264a52891cfb5d61b Mon Sep 17 00:00:00 2001 From: Junfan Zhang Date: Sat, 2 Jul 2022 23:21:01 +0800 Subject: [PATCH] [Minor] Store shuffleId int to be consistent with other data structure (#10) ### What changes were proposed in this pull request? Store shuffleId int to be consistent with other data structure ### Why are the changes needed? Store shuffleId int to be consistent with other data structure, like the `partitionsToBlockIds` and `commitLocks`. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? No need. --- .../java/com/tencent/rss/server/ShuffleTaskManager.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/src/main/java/com/tencent/rss/server/ShuffleTaskManager.java b/server/src/main/java/com/tencent/rss/server/ShuffleTaskManager.java index 73ae28e632..7a605a796a 100644 --- a/server/src/main/java/com/tencent/rss/server/ShuffleTaskManager.java +++ b/server/src/main/java/com/tencent/rss/server/ShuffleTaskManager.java @@ -76,7 +76,7 @@ public class ShuffleTaskManager { private ShuffleBufferManager shuffleBufferManager; private Map appIds = Maps.newConcurrentMap(); // appId -> shuffleId -> commit count - private Map> commitCounts = Maps.newConcurrentMap(); + private Map> commitCounts = Maps.newConcurrentMap(); private Map> commitLocks = Maps.newConcurrentMap(); // appId -> shuffleId -> blockIds private Map> cachedBlockIds = Maps.newConcurrentMap(); @@ -229,9 +229,9 @@ public void addFinishedBlockIds( } } - public int updateAndGetCommitCount(String appId, long shuffleId) { + public int updateAndGetCommitCount(String appId, int shuffleId) { commitCounts.putIfAbsent(appId, Maps.newConcurrentMap()); - Map shuffleCommit = commitCounts.get(appId); + Map shuffleCommit = commitCounts.get(appId); shuffleCommit.putIfAbsent(shuffleId, new AtomicInteger(0)); AtomicInteger commitNum = shuffleCommit.get(shuffleId); return commitNum.incrementAndGet();