yanghua commented on a change in pull request #1452: [HUDI-740]Fix can not 
specify the sparkMaster of cleans run command
URL: https://github.com/apache/incubator-hudi/pull/1452#discussion_r404550898
 
 

 ##########
 File path: hudi-cli/src/main/java/org/apache/hudi/cli/utils/SparkUtil.java
 ##########
 @@ -61,9 +62,14 @@ public static SparkLauncher initLauncher(String 
propertiesFile) throws URISyntax
   }
 
   public static JavaSparkContext initJavaSparkConf(String name) {
+    return initJavaSparkConf(name, Option.empty(), Option.empty());
+  }
+
+  public static JavaSparkContext initJavaSparkConf(String name, Option<String> 
master,
+                                                   Option<String> 
executorMemory) {
     SparkConf sparkConf = new SparkConf().setAppName(name);
 
-    String defMasterFromEnv = sparkConf.getenv("SPARK_MASTER");
+    String defMasterFromEnv = master.orElse(sparkConf.getenv("SPARK_MASTER"));
 
 Review comment:
   Can we extract the string literals in this method to be constant fields?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to