You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uniffle.apache.org by ro...@apache.org on 2022/07/02 15:21:05 UTC
[incubator-uniffle] branch master updated: [Minor] Store shuffleId int to be consistent with other data structure (#10)
This is an automated email from the ASF dual-hosted git repository.
roryqi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git
The following commit(s) were added to refs/heads/master by this push:
new b0fe5f3 [Minor] Store shuffleId int to be consistent with other data structure (#10)
b0fe5f3 is described below
commit b0fe5f3b5bd4205a163a2e1264a52891cfb5d61b
Author: Junfan Zhang <ju...@outlook.com>
AuthorDate: Sat Jul 2 23:21:01 2022 +0800
[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.
---
server/src/main/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 73ae28e..7a605a7 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<String, Long> appIds = Maps.newConcurrentMap();
// appId -> shuffleId -> commit count
- private Map<String, Map<Long, AtomicInteger>> commitCounts = Maps.newConcurrentMap();
+ private Map<String, Map<Integer, AtomicInteger>> commitCounts = Maps.newConcurrentMap();
private Map<String, Map<Integer, Object>> commitLocks = Maps.newConcurrentMap();
// appId -> shuffleId -> blockIds
private Map<String, Map<Integer, Roaring64NavigableMap>> cachedBlockIds = Maps.newConcurrentMap();
@@ -229,9 +229,9 @@ public class ShuffleTaskManager {
}
}
- public int updateAndGetCommitCount(String appId, long shuffleId) {
+ public int updateAndGetCommitCount(String appId, int shuffleId) {
commitCounts.putIfAbsent(appId, Maps.newConcurrentMap());
- Map<Long, AtomicInteger> shuffleCommit = commitCounts.get(appId);
+ Map<Integer, AtomicInteger> shuffleCommit = commitCounts.get(appId);
shuffleCommit.putIfAbsent(shuffleId, new AtomicInteger(0));
AtomicInteger commitNum = shuffleCommit.get(shuffleId);
return commitNum.incrementAndGet();