yuanzac commented on a change in pull request #179: SUBMARINE-377. [SDK] Submit 
a job by pysubamrine
URL: https://github.com/apache/submarine/pull/179#discussion_r379228169
 
 

 ##########
 File path: 
submarine-server/server-submitter/submitter-yarn/src/main/java/org/apache/submarine/server/submitter/yarn/YarnUtils.java
 ##########
 @@ -46,129 +44,61 @@
   private static final Log LOG = LogFactory.getLog(YarnUtils.class);
 
   public static Configuration tonyConfFromClientContext(
-          ParametersHolder parameters) throws YarnException, ParseException {
+          RunJobParameters parameters, Framework framework) throws 
YarnException, ParseException {
     Configuration tonyConf = new Configuration();
     // Add tony.xml for configuration.
     tonyConf.addResource(Constants.TONY_XML);
     tonyConf.setStrings(TonyConfigurationKeys.FRAMEWORK_NAME,
-            parameters.getFramework().getValue());
+            framework.getValue());
     tonyConf.setStrings(TonyConfigurationKeys.APPLICATION_NAME,
-            parameters.getParameters().getName());
-    tonyConf.setStrings(
-        TonyConfigurationKeys.getInstancesKey(Constants.WORKER_JOB_NAME),
-            parameters.getOptionValue(CliConstants.N_WORKERS));
-    if (parameters.getOptionValue(CliConstants.N_PS) != null) {
-      tonyConf.setStrings(
-              TonyConfigurationKeys.getInstancesKey(Constants.PS_JOB_NAME),
-              parameters.getOptionValue(CliConstants.N_PS));
-    }
-    // Resources for PS & Worker
-    if (parameters.getOptionValue(CliConstants.PS_RES) != null) {
 
 Review comment:
   @pingsutw,
   Thanks. you mean for both java client and python client, a job can be 
submitted with YAML, right?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@submarine.apache.org
For additional commands, e-mail: dev-h...@submarine.apache.org

Reply via email to