You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by pr...@apache.org on 2017/01/26 02:40:17 UTC

zeppelin git commit: ZEPPELIN-2006. Livy interpreter doesn't work in anonymous mode

Repository: zeppelin
Updated Branches:
  refs/heads/master 2ef835915 -> 045a921e6


ZEPPELIN-2006. Livy interpreter doesn't work in anonymous mode

### What is this PR for?
We should not pass proxy-user to livy server in anonymous mode, otherwise the livy session will be started as user anonymous.

### What type of PR is it?
[Bug Fix]

### Todos
* [ ] - Task

### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-2006

### How should this be tested?
Tested manually in anonymous mode.

### 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: Jeff Zhang <zj...@apache.org>

Closes #1938 from zjffdu/ZEPPELIN-2006 and squashes the following commits:

a6f7faf [Jeff Zhang] ZEPPELIN-2006. Livy interpreter doesn't work in anonymous mode


Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/045a921e
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/045a921e
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/045a921e

Branch: refs/heads/master
Commit: 045a921e6f210504d858578313368376bbf957d8
Parents: 2ef8359
Author: Jeff Zhang <zj...@apache.org>
Authored: Tue Jan 24 16:56:22 2017 +0800
Committer: Prabhjyot Singh <pr...@gmail.com>
Committed: Thu Jan 26 08:10:01 2017 +0530

----------------------------------------------------------------------
 .../main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/045a921e/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java
----------------------------------------------------------------------
diff --git a/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java b/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java
index 6b72906..1b209c5 100644
--- a/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java
+++ b/livy/src/main/java/org/apache/zeppelin/livy/BaseLivyInterprereter.java
@@ -206,7 +206,8 @@ public abstract class BaseLivyInterprereter extends Interpreter {
           conf.put(entry.getKey().toString().substring(5), entry.getValue().toString());
       }
 
-      CreateSessionRequest request = new CreateSessionRequest(kind, user, conf);
+      CreateSessionRequest request = new CreateSessionRequest(kind,
+          user.equals("anonymous") ? null : user, conf);
       SessionInfo sessionInfo = SessionInfo.fromJson(
           callRestAPI("/sessions", "POST", request.toJson()));
       long start = System.currentTimeMillis();