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

zjffdu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zeppelin.git


The following commit(s) were added to refs/heads/master by this push:
     new baae6ed  [ZEPPELIN-5639] Support node label in yarn interpreter 
launcher
baae6ed is described below

commit baae6edfd296352dcc2c6efa69d18e24e0ae743a
Author: huage1994 <guanhua...@foxmail.com>
AuthorDate: Fri Jan 28 22:54:14 2022 +0800

    [ZEPPELIN-5639] Support node label in yarn interpreter launcher
    
    ### What is this PR for?
    Support node label in yarn interpreter launcher,
    so that user can run interpreter in specific node.
    
    ### What type of PR is it?
    [Feature]
    
    ### Todos
    * [ ] - Task
    
    ### What is the Jira issue?
    * Open an issue on Jira https://issues.apache.org/jira/browse/ZEPPELIN-5639
    
    ### How should this be tested?
    CI passed
    
    ### Screenshots (if appropriate)
    
    ### Questions:
    * Does the licenses files need update? No
    * Is there breaking changes for older versions? No
    * Does this needs documentation? No
    
    Author: huage1994 <guanhua...@foxmail.com>
    
    Closes #4293 from huage1994/ZEPPELIN-5639 and squashes the following 
commits:
    
    7c5dfb3a98 [huage1994] [ZEPPELIN-5639] Support node label in yarn 
interpreter launcher
---
 docs/quickstart/yarn.md                                              | 5 +++++
 .../zeppelin/interpreter/launcher/YarnRemoteInterpreterProcess.java  | 4 ++++
 2 files changed, 9 insertions(+)

diff --git a/docs/quickstart/yarn.md b/docs/quickstart/yarn.md
index 60fb48e..0aee85c 100644
--- a/docs/quickstart/yarn.md
+++ b/docs/quickstart/yarn.md
@@ -64,6 +64,11 @@ Besides that, you can also specify other properties as 
following table.
     <td>default</td>
     <td>yarn queue name</td>
   </tr>
+  <tr>
+    <td>zeppelin.interpreter.yarn.node.label.expression</td>
+    <td></td>
+    <td>yarn node label expression specified for interpreter process</td>
+  </tr>
 </table>
 
 ## Differences with non-yarn interpreter mode (local mode)
diff --git 
a/zeppelin-plugins/launcher/yarn/src/main/java/org/apache/zeppelin/interpreter/launcher/YarnRemoteInterpreterProcess.java
 
b/zeppelin-plugins/launcher/yarn/src/main/java/org/apache/zeppelin/interpreter/launcher/YarnRemoteInterpreterProcess.java
index 33bca6c..31e1f74 100644
--- 
a/zeppelin-plugins/launcher/yarn/src/main/java/org/apache/zeppelin/interpreter/launcher/YarnRemoteInterpreterProcess.java
+++ 
b/zeppelin-plugins/launcher/yarn/src/main/java/org/apache/zeppelin/interpreter/launcher/YarnRemoteInterpreterProcess.java
@@ -178,6 +178,10 @@ public class YarnRemoteInterpreterProcess extends 
RemoteInterpreterProcess {
       this.appId = appResponse.getApplicationId();
       ApplicationSubmissionContext appContext = 
yarnApplication.getApplicationSubmissionContext();
       appContext = createApplicationSubmissionContext(appContext);
+      String YARN_NODE_LABEL_EXPRESSION = 
"zeppelin.interpreter.yarn.node.label.expression";
+      
if(StringUtils.isNotEmpty(properties.getProperty(YARN_NODE_LABEL_EXPRESSION,"")))
 {
+        
appContext.setNodeLabelExpression(properties.getProperty(YARN_NODE_LABEL_EXPRESSION));
+      }
       yarnClient.submitApplication(appContext);
 
       long start = System.currentTimeMillis();

Reply via email to