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 80de4bb  [ZEPPELIN-3529] Add uName into jobGroupId for checking user
80de4bb is described below

commit 80de4bbc0233815200f1baf8d6c4e570073bcc79
Author: Jaehoon Jeong <jaehoon.je...@woowahan.com>
AuthorDate: Tue Jun 5 21:02:16 2018 +0900

    [ZEPPELIN-3529] Add uName into jobGroupId for checking user
    
    ### What is this PR for?
    Need to check user in jobGroupId
    because when some paragraph is running,
    who run paragraph cannot be found in spark application web UI.
    
    I just add to userId.
    
    ### What type of PR is it?
    [Improvement]
    
    ### Todos
    * [x] - Modify Code
    
    ### What is the Jira issue?
    * https://issues.apache.org/jira/browse/ZEPPELIN-3529
    
    ### How should this be tested?
    * Check jobGroupId in Spark Application Web UI of Zeppelin Spark Interpreter
    
    ### Questions:
    * Does the licenses files need update?
        * No
    * Is there breaking changes for older versions?
        * No
    * Does this needs documentation?
        * No
    
    Author: Jaehoon Jeong <jaehoon.je...@woowahan.com>
    
    Closes #3006 from woowahan-jaehoon/ZEPPELIN-3529 and squashes the following 
commits:
    
    b1da18c46 [Jaehoon Jeong] [ZEPPELIN-3529] Add uName into jobGroupId for 
checking user
---
 .../interpreter/src/main/java/org/apache/zeppelin/spark/Utils.java  | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git 
a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/Utils.java 
b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/Utils.java
index 1220bd7..744e532 100644
--- a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/Utils.java
+++ b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/Utils.java
@@ -155,7 +155,11 @@ class Utils {
   }
   
   public static String buildJobGroupId(InterpreterContext context) {
-    return "zeppelin-" + context.getNoteId() + "-" + context.getParagraphId();
+    String uName = "anonymous";
+    if (context.getAuthenticationInfo() != null) {
+      uName = getUserName(context.getAuthenticationInfo());
+    }
+    return "zeppelin-" + uName + "-" + context.getNoteId() + "-" + 
context.getParagraphId();
   }
 
   public static String buildJobDesc(InterpreterContext context) {

Reply via email to