zhengchenyu commented on code in PR #2195:
URL: 
https://github.com/apache/incubator-uniffle/pull/2195#discussion_r1809783278


##########
internal-client/src/main/java/org/apache/uniffle/client/impl/grpc/ShuffleServerGrpcClient.java:
##########
@@ -212,16 +209,8 @@ private ShuffleRegisterResponse doRegisterShuffle(
         
.setMaxConcurrencyPerPartitionToWrite(maxConcurrencyPerPartitionToWrite)
         .addAllPartitionRanges(toShufflePartitionRanges(partitionRanges))
         .setStageAttemptNumber(stageAttemptNumber);
-    if (StringUtils.isNotBlank(keyClassName)) {
-      reqBuilder.setKeyClass(keyClassName);
-      reqBuilder.setValueClass(valueClassName);
-      if (StringUtils.isNotBlank(comparatorClassName)) {
-        reqBuilder.setComparatorClass(comparatorClassName);
-      }
-      reqBuilder.setMergedBlockSize(mergedBlockSize);
-      if (StringUtils.isNotBlank(mergeClassLoader)) {
-        reqBuilder.setMergeClassLoader(mergeClassLoader);
-      }
+    if (mergeContext != null && 
StringUtils.isNotBlank(mergeContext.getKeyClass())) {

Review Comment:
   Since we have check keyClass in TezRemoteShuffleManager, there is no need to 
check KeyClass.



##########
client-tez/src/main/java/org/apache/tez/dag/app/TezRemoteShuffleManager.java:
##########
@@ -305,13 +306,19 @@ public ShuffleAssignmentsInfo run() throws Exception {
                                           RssTezConfig.toRssConf(conf)
                                               
.get(MAX_CONCURRENCY_PER_PARTITION_TO_WRITE),
                                           0,
-                                          keyClassName,
-                                          valueClassName,
-                                          comparatorClassName,
-                                          conf.getInt(
-                                              
RssTezConfig.RSS_MERGED_BLOCK_SZIE,
-                                              
RssTezConfig.RSS_MERGED_BLOCK_SZIE_DEFAULT),
-                                          
conf.get(RssTezConfig.RSS_REMOTE_MERGE_CLASS_LOADER)));
+                                          RssProtos.MergeContext.newBuilder()

Review Comment:
   For tez, RssOrderedPartitionedKVOutput will trigger AppMaster to 
registerShuffle. If merge is disable, the parameters are null. Otherwise, these 
are not null.
   So I did not check whether remote merge is enable. Here I think we should 
check keyClass, if null, we will pass null, no need to construct MergeContext.
   By this way, the code logic is clearer.



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