lwllvyb commented on code in PR #2199:
URL: 
https://github.com/apache/incubator-uniffle/pull/2199#discussion_r1810651182


##########
storage/src/main/java/org/apache/uniffle/storage/common/AbstractStorage.java:
##########
@@ -44,13 +47,13 @@ public ShuffleWriteHandler 
getOrCreateWriteHandler(CreateShuffleWriteHandlerRequ
     writerHandlers.computeIfAbsent(request.getAppId(), key -> 
JavaUtils.newConcurrentMap());
     requests.computeIfAbsent(request.getAppId(), key -> 
JavaUtils.newConcurrentMap());
     Map<String, ShuffleWriteHandler> map = 
writerHandlers.get(request.getAppId());
-    String partitionKey =
-        RssUtils.generatePartitionKey(
-            request.getAppId(), request.getShuffleId(), 
request.getStartPartition());
-    map.computeIfAbsent(partitionKey, key -> newWriteHandler(request));
+    String partitionKeyExceptAppId =

Review Comment:
   Thanks for your suggestion.
   request.getShuffleId() and request.getStartPartition() both return an `int` 
type. If we combine these two values into an `int` type, how many bits these 
would each take? I have no idea with this. 
   
   Only AbstractStorage class calls `generatePartitionKey` function, is it 
better to keep using the `String` type ?



##########
storage/src/main/java/org/apache/uniffle/storage/common/AbstractStorage.java:
##########
@@ -44,13 +47,13 @@ public ShuffleWriteHandler 
getOrCreateWriteHandler(CreateShuffleWriteHandlerRequ
     writerHandlers.computeIfAbsent(request.getAppId(), key -> 
JavaUtils.newConcurrentMap());
     requests.computeIfAbsent(request.getAppId(), key -> 
JavaUtils.newConcurrentMap());
     Map<String, ShuffleWriteHandler> map = 
writerHandlers.get(request.getAppId());
-    String partitionKey =
-        RssUtils.generatePartitionKey(
-            request.getAppId(), request.getShuffleId(), 
request.getStartPartition());
-    map.computeIfAbsent(partitionKey, key -> newWriteHandler(request));
+    String partitionKeyExceptAppId =

Review Comment:
   Thanks for your suggestion.
   
   request.getShuffleId() and request.getStartPartition() both return an `int` 
type. If we combine these two values into an `int` type, how many bits these 
would each take? I have no idea with this. 
   
   Only AbstractStorage class calls `generatePartitionKey` function, is it 
better to keep using the `String` type ?



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