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

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


The following commit(s) were added to refs/heads/branch-0.8 by this push:
     new aefe527  [ZEPPELIN-3529] Add uName into jobGroupId for checking user
aefe527 is described below

commit aefe5272ff699aaffbbacc6a9b08cd5e84df417f
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
    
    (cherry picked from commit 80de4bbc0233815200f1baf8d6c4e570073bcc79)
    Signed-off-by: Jeff Zhang <zjf...@apache.org>
---
 .../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 82bf210..ccfc348 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
@@ -149,7 +149,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 getNoteId(String jobgroupId) {

Reply via email to