This is an automated email from the ASF dual-hosted git repository.
zuston 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 4bd3af64 Remove unused data structure and method (#429)
4bd3af64 is described below
commit 4bd3af64d9e8460301bf04f4b0db261482f63222
Author: Junfan Zhang <[email protected]>
AuthorDate: Fri Dec 16 09:51:05 2022 +0800
Remove unused data structure and method (#429)
### What changes were proposed in this pull request?
1. Remove unused data structure and method
### Why are the changes needed?
1. Save memory
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Don't need.
---
.../org/apache/uniffle/server/ShuffleFlushManager.java | 14 --------------
1 file changed, 14 deletions(-)
diff --git
a/server/src/main/java/org/apache/uniffle/server/ShuffleFlushManager.java
b/server/src/main/java/org/apache/uniffle/server/ShuffleFlushManager.java
index 4f1cc426..62f1c3ae 100644
--- a/server/src/main/java/org/apache/uniffle/server/ShuffleFlushManager.java
+++ b/server/src/main/java/org/apache/uniffle/server/ShuffleFlushManager.java
@@ -28,7 +28,6 @@ import java.util.concurrent.atomic.AtomicLong;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.Maps;
import com.google.common.collect.Queues;
-import com.google.common.collect.RangeMap;
import com.google.common.util.concurrent.Uninterruptibles;
import org.apache.commons.lang3.StringUtils;
import org.apache.hadoop.conf.Configuration;
@@ -59,8 +58,6 @@ public class ShuffleFlushManager {
private final int storageDataReplica;
private final ShuffleServerConf shuffleServerConf;
private Configuration hadoopConf;
- // appId -> shuffleId -> partitionId -> handlers
- private Map<String, Map<Integer, RangeMap<Integer, ShuffleWriteHandler>>>
handlers = Maps.newConcurrentMap();
// appId -> shuffleId -> committed shuffle blockIds
private Map<String, Map<Integer, Roaring64NavigableMap>> committedBlockIds =
Maps.newConcurrentMap();
private final int retryMax;
@@ -276,7 +273,6 @@ public class ShuffleFlushManager {
}
public void removeResources(String appId) {
- handlers.remove(appId);
committedBlockIds.remove(appId);
}
@@ -300,11 +296,6 @@ public class ShuffleFlushManager {
return hadoopConf;
}
- @VisibleForTesting
- protected Map<String, Map<Integer, RangeMap<Integer, ShuffleWriteHandler>>>
getHandlers() {
- return handlers;
- }
-
@VisibleForTesting
void processPendingEvents() throws Exception {
PendingShuffleFlushEvent event = pendingEvents.take();
@@ -329,10 +320,6 @@ public class ShuffleFlushManager {
addPendingEventsInternal(event);
}
- private void cleanupFlushEventData(ShuffleDataFlushEvent event) {
- event.doCleanup();
- }
-
private void dropPendingEvent(PendingShuffleFlushEvent event) {
ShuffleServerMetrics.counterTotalDroppedEventNum.inc();
event.getEvent().doCleanup();
@@ -358,7 +345,6 @@ public class ShuffleFlushManager {
}
public void removeResourcesOfShuffleId(String appId, int shuffleId) {
- Optional.ofNullable(handlers.get(appId)).ifPresent(x ->
x.remove(shuffleId));
Optional.ofNullable(committedBlockIds.get(appId)).ifPresent(x ->
x.remove(shuffleId));
}