You are viewing a plain text version of this content. The canonical link for it is here.
Posted to submarine-dev@hadoop.apache.org by li...@apache.org on 2019/10/06 09:27:39 UTC

[hadoop-submarine] branch master updated: [SUBMARINE-104]. YARN application type should set SUBMARINE

This is an automated email from the ASF dual-hosted git repository.

liuxun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hadoop-submarine.git


The following commit(s) were added to refs/heads/master by this push:
     new 7e38b4e  [SUBMARINE-104]. YARN application type should set SUBMARINE
7e38b4e is described below

commit 7e38b4e69835127d763452a450e1b058e9f77c79
Author: 陆中豪 <lu...@luzhonghaodeMacBook-Pro.local>
AuthorDate: Sun Oct 6 17:16:12 2019 +0800

    [SUBMARINE-104]. YARN application type should set SUBMARINE
    
    ### What is this PR for?
    No matter which runtime we use, we should set the same application type.
    Currently,  the application type for Tony run time is "TONY", we should set the  application type to
    "SUBMARINE" instead.
    ### What type of PR is it?
    Improvement
    
    ### What is the Jira issue?
    https://issues.apache.org/jira/browse/SUBMARINE-104
    
    ### Screenshots (if appropriate)
    <img width="1131" alt="SUBMARINE-104" src="https://user-images.githubusercontent.com/8197966/65847473-45e72b00-e374-11e9-9732-695c9d954a44.png">
    
    ### How should this be tested?
    https://travis-ci.org/luzhonghao/hadoop-submarine/builds/591292126
    
    ### Questions:
    * Does the licenses files need update? No
    * Is there breaking changes for older versions? No
    * Does this needs documentation? No
    
    Author: 陆中豪 <lu...@luzhonghaodeMacBook-Pro.local>
    
    Closes #24 from luzhonghao/SUBMARINE-104 and squashes the following commits:
    
    c7e4b0b [陆中豪] [SUBMARINE-104]. YARN application type should set SUBMARINE
---
 .../java/org/apache/submarine/common/conf/SubmarineConfiguration.java  | 2 ++
 .../src/main/java/org/apache/submarine/runtimes/tony/TonyUtils.java    | 3 +++
 submarine-runtime/tony-runtime/src/test/java/TestTonyUtils.java        | 1 +
 submodules/tony                                                        | 2 +-
 4 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/submarine-core/src/main/java/org/apache/submarine/common/conf/SubmarineConfiguration.java b/submarine-core/src/main/java/org/apache/submarine/common/conf/SubmarineConfiguration.java
index a62cdf3..b455138 100644
--- a/submarine-core/src/main/java/org/apache/submarine/common/conf/SubmarineConfiguration.java
+++ b/submarine-core/src/main/java/org/apache/submarine/common/conf/SubmarineConfiguration.java
@@ -34,6 +34,8 @@ public class SubmarineConfiguration extends Configuration {
   // Default 2GB
   public static final long DEFAULT_MAX_ALLOWED_REMOTE_URI_SIZE_MB = 2048;
 
+  public static final String SUBMARINE_RUNTIME_APP_TYPE = "SUBMARINE";
+
   public SubmarineConfiguration() {
     this(new Configuration(false), true);
   }
diff --git a/submarine-runtime/tony-runtime/src/main/java/org/apache/submarine/runtimes/tony/TonyUtils.java b/submarine-runtime/tony-runtime/src/main/java/org/apache/submarine/runtimes/tony/TonyUtils.java
index 14c0ffa..7dfc60c 100644
--- a/submarine-runtime/tony-runtime/src/main/java/org/apache/submarine/runtimes/tony/TonyUtils.java
+++ b/submarine-runtime/tony-runtime/src/main/java/org/apache/submarine/runtimes/tony/TonyUtils.java
@@ -27,6 +27,8 @@ import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
 
+import static org.apache.submarine.common.conf.SubmarineConfiguration.SUBMARINE_RUNTIME_APP_TYPE;
+
 /**
  * Utilities for Tony Runtime.
  */
@@ -106,6 +108,7 @@ public final class TonyUtils {
     tonyConf.setStrings(TonyConfigurationKeys.CONTAINER_LAUNCH_ENV,
         envs.stream().map(env -> env.replaceAll("DOCKER_", ""))
             .toArray(String[]::new));
+    tonyConf.setStrings(TonyConfigurationKeys.APPLICATION_TYPE, SUBMARINE_RUNTIME_APP_TYPE);
 
     // Set up running command
     if (parameters.getWorkerLaunchCmd() != null) {
diff --git a/submarine-runtime/tony-runtime/src/test/java/TestTonyUtils.java b/submarine-runtime/tony-runtime/src/test/java/TestTonyUtils.java
index 2b21a46..ba6a82b 100644
--- a/submarine-runtime/tony-runtime/src/test/java/TestTonyUtils.java
+++ b/submarine-runtime/tony-runtime/src/test/java/TestTonyUtils.java
@@ -121,5 +121,6 @@ public class TestTonyUtils {
         Constants.VCORES)));
     Assert.assertEquals(tensorFlowParams.getPSLaunchCmd(),
         tonyConf.get(TonyConfigurationKeys.getExecuteCommandKey("ps")));
+    Assert.assertEquals("SUBMARINE", tonyConf.get(TonyConfigurationKeys.APPLICATION_TYPE));
   }
 }
diff --git a/submodules/tony b/submodules/tony
index a07f0fb..7a0a4a6 160000
--- a/submodules/tony
+++ b/submodules/tony
@@ -1 +1 @@
-Subproject commit a07f0fb68112014d4420ef6d9817eeebddd19ad1
+Subproject commit 7a0a4a6c1f172b535dc30984163f6e19cb67600b