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