You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@uniffle.apache.org by GitBox <gi...@apache.org> on 2022/11/12 10:16:17 UTC

[GitHub] [incubator-uniffle] zuston commented on a diff in pull request #308: [WIP] Dump state when stateful upgrading of shuffle-server

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


##########
client-spark/common/src/main/java/org/apache/spark/shuffle/RssSparkShuffleUtils.java:
##########
@@ -149,16 +156,31 @@ public static int estimateTaskConcurrency(SparkConf sparkConf) {
     if (!sparkConf.getBoolean(Constants.SPARK_DYNAMIC_ENABLED, false)) {
       int executorInstances = sparkConf.getInt(Constants.SPARK_EXECUTOR_INSTANTS,
           Constants.SPARK_EXECUTOR_INSTANTS_DEFAULT_VALUE);
-      taskConcurrency =  executorInstances > 0 ? executorInstances * taskConcurrencyPerExecutor : 0;
+      taskConcurrency = executorInstances > 0 ? executorInstances * taskConcurrencyPerExecutor : 0;
     } else {
       // Default is infinity
       int maxExecutors = Math.min(sparkConf.getInt(Constants.SPARK_MAX_DYNAMIC_EXECUTOR,
           Constants.SPARK_DYNAMIC_EXECUTOR_DEFAULT_VALUE), Constants.SPARK_MAX_DYNAMIC_EXECUTOR_LIMIT);
       int minExecutors = sparkConf.getInt(Constants.SPARK_MIN_DYNAMIC_EXECUTOR,
           Constants.SPARK_DYNAMIC_EXECUTOR_DEFAULT_VALUE);
-      taskConcurrency = (int)((maxExecutors - minExecutors) * dynamicAllocationFactor + minExecutors)
-                            * taskConcurrencyPerExecutor;
+      taskConcurrency = (int) ((maxExecutors - minExecutors) * dynamicAllocationFactor + minExecutors)
+          * taskConcurrencyPerExecutor;
     }
     return taskConcurrency;
   }
+
+  public static StatefulUpgradeClientOptions getStatefulUpgradeOptions(RssConf clientConfig) {

Review Comment:
   Yes. And I think this can leverage the dynamic config mechanism



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