You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@submarine.apache.org by GitBox <gi...@apache.org> on 2019/11/22 10:21:42 UTC

[GitHub] [submarine] huiyangjian commented on a change in pull request #88: SUBMARINE-288.Set some users to have root privilege

huiyangjian commented on a change in pull request #88: SUBMARINE-288.Set some users to have root privilege
URL: https://github.com/apache/submarine/pull/88#discussion_r349525837
 
 

 ##########
 File path: submarine-server/server-submitter/submitter-yarnservice/src/main/java/org/apache/submarine/server/submitter/yarnservice/utils/EnvironmentUtilities.java
 ##########
 @@ -120,4 +125,25 @@ static void appendToEnv(Service service, String key, String value,
       }
     }
   }
-}
+
+  static void etcAppendToEnv(Service service, String key, String value,
+                             String delim) {
+    Map<String, String> env = service.getConfiguration().getEnv();
+    if (!env.containsKey(key)) {
+      env.put(key, value);
+    } else {
+      if (!value.isEmpty()) {
+        String existingValue = env.get(key);
+        if((existingValue.contains(ETC_PASSWD) && value.contains(ETC_PASSWD))
 
 Review comment:
   thanks

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


With regards,
Apache Git Services

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