AngersZhuuuu commented on code in PR #2373:
URL: https://github.com/apache/celeborn/pull/2373#discussion_r1917811789


##########
client/src/main/java/org/apache/celeborn/client/read/CelebornInputStream.java:
##########
@@ -65,26 +70,54 @@ public static CelebornInputStream create(
       ExceptionMaker exceptionMaker,
       MetricsCallback metricsCallback)
       throws IOException {
-    if (locations == null || locations.size() == 0) {
+    if (locations == null || locations.isEmpty()) {
       return emptyInputStream;
     } else {
-      return new CelebornInputStreamImpl(
-          conf,
-          clientFactory,
-          shuffleKey,
-          locations,
-          streamHandlers,
-          attempts,
-          attemptNumber,
-          startMapIndex,
-          endMapIndex,
-          fetchExcludedWorkers,
-          shuffleClient,
-          appShuffleId,
-          shuffleId,
-          partitionId,
-          exceptionMaker,
-          metricsCallback);
+      // if startMapIndex > endMapIndex, means partition is skew partition.
+      // locations will split to sub-partitions with startMapIndex size.

Review Comment:
   Should we say it's a skew partition will be read in celeborn way?



##########
client-spark/spark-3/src/main/scala/org/apache/spark/shuffle/celeborn/CelebornShuffleReader.scala:
##########
@@ -136,15 +163,14 @@ class CelebornShuffleReader[K, C](
               pbOpenStreamList.setShuffleKey(shuffleKey)
               workerRequestMap.put(
                 hostPort,
-                (client, new util.ArrayList[PartitionLocation], 
pbOpenStreamList))
+                (client, new JArrayList[PartitionLocation], pbOpenStreamList))
             } catch {
               case ex: Exception =>
                 
shuffleClient.excludeFailedFetchLocation(location.hostAndFetchPort, ex)
                 logWarning(
                   s"Failed to create client for $shuffleKey-$partitionId from 
host: ${location.hostAndFetchPort}. " +
                     s"Shuffle reader will try its replica if exists.")
             }
-          }

Review Comment:
   Why remove this {} pair?



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

Reply via email to