zuston commented on code in PR #1681:
URL: 
https://github.com/apache/incubator-uniffle/pull/1681#discussion_r1596527874


##########
server/src/main/java/org/apache/uniffle/server/storage/HadoopStorageManager.java:
##########
@@ -57,12 +57,14 @@ public class HadoopStorageManager extends 
SingleStorageManager {
   private static final Logger LOG = 
LoggerFactory.getLogger(HadoopStorageManager.class);
 
   private final Configuration hadoopConf;
+  private final String shuffleServerId;
   private Map<String, HadoopStorage> appIdToStorages = 
JavaUtils.newConcurrentMap();
   private Map<String, HadoopStorage> pathToStorages = 
JavaUtils.newConcurrentMap();
 
   HadoopStorageManager(ShuffleServerConf conf) {
     super(conf);
     hadoopConf = conf.getHadoopConf();
+    shuffleServerId = conf.getString(ShuffleServerConf.SHUFFLE_SERVER_ID, 
"shuffleServerId");

Review Comment:
   Is the default value right? Why not fast fail? 



##########
server/src/main/java/org/apache/uniffle/server/storage/HadoopStorageManager.java:
##########
@@ -94,15 +96,19 @@ public void removeResources(PurgeEvent event) {
     String appId = event.getAppId();
     HadoopStorage storage = getStorageByAppId(appId);
     if (storage != null) {
+      boolean purgeForExpired = false;
       if (event instanceof AppPurgeEvent) {
         storage.removeHandlers(appId);
         appIdToStorages.remove(appId);
+        purgeForExpired = ((AppPurgeEvent) event).isAppExpired();
       }
       ShuffleDeleteHandler deleteHandler =
           ShuffleHandlerFactory.getInstance()
               .createShuffleDeleteHandler(
                   new CreateShuffleDeleteHandlerRequest(
-                      StorageType.HDFS.name(), storage.getConf()));
+                      StorageType.HDFS.name(),
+                      storage.getConf(),
+                      purgeForExpired ? shuffleServerId : null));

Review Comment:
   this is wrong. 



-- 
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]

Reply via email to