You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@uniffle.apache.org by "zjf2012 (via GitHub)" <gi...@apache.org> on 2023/02/24 09:06:54 UTC

[GitHub] [incubator-uniffle] zjf2012 commented on a diff in pull request #637: [#615] improvement: Reduce task binary by removing 'partitionToServers' from RssShuffleHandle

zjf2012 commented on code in PR #637:
URL: https://github.com/apache/incubator-uniffle/pull/637#discussion_r1116696515


##########
client-spark/spark3/src/main/java/org/apache/spark/shuffle/RssShuffleManager.java:
##########
@@ -318,12 +319,13 @@ public <K, V, C> ShuffleHandle registerShuffle(int shuffleId, ShuffleDependency<
     if (dependency.partitioner().numPartitions() == 0) {
       LOG.info("RegisterShuffle with ShuffleId[" + shuffleId + "], partitionNum is 0, "
           + "return the empty RssShuffleHandle directly");
+      Broadcast<byte[]> ptsBd = RssSparkShuffleUtils.createPartShuffleServerMap(SparkContext.getOrCreate(),

Review Comment:
   yes, I tried. But we cannot call 'SparkContext.getActive()' method from Java since it's package private in scala. And "registerShuffle" is called in Driver only after SparkContext was created. So we should be safe here and always get the active SparkContext.



-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org