rickyma commented on code in PR #1635:
URL:
https://github.com/apache/incubator-uniffle/pull/1635#discussion_r1559283093
##########
server/src/main/java/org/apache/uniffle/server/ShuffleTaskManager.java:
##########
@@ -763,22 +762,18 @@ public void removeResources(String appId, boolean
checkAppExpired) {
return;
}
final long start = System.currentTimeMillis();
- String user = getUserByAppId(appId);
ShuffleTaskInfo shuffleTaskInfo = shuffleTaskInfos.remove(appId);
if (shuffleTaskInfo == null) {
LOG.info("Resource for appId[" + appId + "] had been removed before.");
return;
}
- final Map<Integer, Roaring64NavigableMap> shuffleToCachedBlockIds =
- shuffleTaskInfo.getCachedBlockIds();
partitionsToBlockIds.remove(appId);
shuffleBufferManager.removeBuffer(appId);
shuffleFlushManager.removeResources(appId);
- if (!shuffleToCachedBlockIds.isEmpty()) {
- storageManager.removeResources(
- new AppPurgeEvent(appId, user, new
ArrayList<>(shuffleToCachedBlockIds.keySet())));
- }
+
Review Comment:
Useless newline remove it?
##########
server/src/test/java/org/apache/uniffle/server/ShuffleTaskManagerTest.java:
##########
@@ -470,7 +470,11 @@ public void removeShuffleDataWithHdfsTest() throws
Exception {
assertTrue(fs.exists(new Path(appBasePath)));
assertNull(shuffleBufferManager.getBufferPool().get(appId).get(0));
assertNotNull(shuffleBufferManager.getBufferPool().get(appId).get(1));
+
+ // the shufflePurgeEvent only will delete the children folders
+ // Once the app is expired, all the app folder should be deleted.
Review Comment:
folder -> folders
##########
server/src/test/java/org/apache/uniffle/server/ShuffleTaskManagerTest.java:
##########
@@ -528,6 +532,14 @@ public void removeShuffleDataWithLocalfileTest() throws
Exception {
assertEquals(0, files.length);
}
}
+
+ // the shufflePurgeEvent only will delete the children folders
+ // Once the app is expired, all the app folder should be deleted.
Review Comment:
folder -> folders
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]