zeppelin git commit: ZEPPELIN-3482 Incorrect user is picked up by Zeppelin during relogin after Knox SSO token expiry

2018-05-27 Thread prabhjyotsingh
Repository: zeppelin
Updated Branches:
  refs/heads/branch-0.8 877bcd701 -> ad355b515


ZEPPELIN-3482 Incorrect user is picked up by Zeppelin during relogin after Knox 
SSO token expiry

### What is this PR for?
Incorrect user is picked up by Zeppelin during relogin after Knox SSO token 
expiry

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

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

### How should this be tested?
* steps in JIRA description.

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no

Author: Renjith Kamath 

Closes #2977 from r-kamath/ZEPPELIN-3482 and squashes the following commits:

1b84467 [Renjith Kamath] ZEPPELIN-3482 Incorrect user is picked up by Zeppelin 
during relogin after Knox SSO token expiry

(cherry picked from commit c41ba77ff9e189daf499cc0d33f54daba0add850)
Signed-off-by: Prabhjyot Singh 

# Conflicts:
#   zeppelin-server/src/main/java/org/apache/zeppelin/rest/LoginRestApi.java


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

Branch: refs/heads/branch-0.8
Commit: ad355b515e9d8ce65bf1eb0527de586f0a1c81f8
Parents: 877bcd7
Author: Renjith Kamath 
Authored: Wed May 23 11:28:19 2018 +0530
Committer: Prabhjyot Singh 
Committed: Mon May 28 10:38:29 2018 +0530

--
 .../apache/zeppelin/realm/jwt/KnoxJwtRealm.java | 10 +++-
 .../org/apache/zeppelin/rest/LoginRestApi.java  | 25 +---
 2 files changed, 26 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/ad355b51/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/KnoxJwtRealm.java
--
diff --git 
a/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/KnoxJwtRealm.java 
b/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/KnoxJwtRealm.java
index d3a2759..0ba403b 100644
--- 
a/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/KnoxJwtRealm.java
+++ 
b/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/KnoxJwtRealm.java
@@ -120,7 +120,7 @@ public class KnoxJwtRealm extends AuthorizingRealm {
 return null;
   }
 
-  private String getName(JWTAuthenticationToken upToken) throws ParseException 
{
+  public String getName(JWTAuthenticationToken upToken) throws ParseException {
 SignedJWT signed = SignedJWT.parse(upToken.getToken());
 String userName = signed.getJWTClaimsSet().getSubject();
 return userName;
@@ -139,6 +139,14 @@ public class KnoxJwtRealm extends AuthorizingRealm {
 LOGGER.warn("Expiration time validation of JWT token failed.");
 return false;
   }
+  String currentUser = (String) 
org.apache.shiro.SecurityUtils.getSubject().getPrincipal();
+  if (currentUser == null) {
+return true;
+  }
+  String cookieUser = signed.getJWTClaimsSet().getSubject();
+  if (!cookieUser.equals(currentUser)) {
+return false;
+  }
   return true;
 } catch (ParseException ex) {
   LOGGER.info("ParseException in validateToken", ex);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/ad355b51/zeppelin-server/src/main/java/org/apache/zeppelin/rest/LoginRestApi.java
--
diff --git 
a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/LoginRestApi.java 
b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/LoginRestApi.java
index b05c295..8d96188 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/LoginRestApi.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/LoginRestApi.java
@@ -18,6 +18,7 @@ package org.apache.zeppelin.rest;
 
 import com.google.gson.Gson;
 
+import java.text.ParseException;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -79,9 +80,14 @@ public class LoginRestApi {
   Cookie cookie = headers.getCookies().get(knoxJwtRealm.getCookieName());
   if (cookie != null && cookie.getValue() != null) {
 Subject currentUser = org.apache.shiro.SecurityUtils.getSubject();
-if (!currentUser.isAuthenticated()) {
-  JWTAuthenticationToken token = new JWTAuthenticationToken(null, 
cookie.getValue());
-  response = proceedToLogin(currentUser, token);
+JWTAuthenticationToken token = new JWTAuthenticationToken(null, 
cookie.getValue());
+try {
+  String name = knoxJwtRealm.getName(token);
+  if (!currentUser.isAuthenticated() || 
!currentUser.getPrincipal().equals(name)) {
+response = proceedToLogin(currentU

zeppelin git commit: ZEPPELIN-3482 Incorrect user is picked up by Zeppelin during relogin after Knox SSO token expiry

2018-05-27 Thread prabhjyotsingh
Repository: zeppelin
Updated Branches:
  refs/heads/master e9dedab46 -> c41ba77ff


ZEPPELIN-3482 Incorrect user is picked up by Zeppelin during relogin after Knox 
SSO token expiry

### What is this PR for?
Incorrect user is picked up by Zeppelin during relogin after Knox SSO token 
expiry

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

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

### How should this be tested?
* steps in JIRA description.

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no

Author: Renjith Kamath 

Closes #2977 from r-kamath/ZEPPELIN-3482 and squashes the following commits:

1b84467 [Renjith Kamath] ZEPPELIN-3482 Incorrect user is picked up by Zeppelin 
during relogin after Knox SSO token expiry


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

Branch: refs/heads/master
Commit: c41ba77ff9e189daf499cc0d33f54daba0add850
Parents: e9dedab
Author: Renjith Kamath 
Authored: Wed May 23 11:28:19 2018 +0530
Committer: Prabhjyot Singh 
Committed: Mon May 28 10:35:39 2018 +0530

--
 .../apache/zeppelin/realm/jwt/KnoxJwtRealm.java | 10 +++-
 .../org/apache/zeppelin/rest/LoginRestApi.java  | 26 ++--
 2 files changed, 27 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/c41ba77f/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/KnoxJwtRealm.java
--
diff --git 
a/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/KnoxJwtRealm.java 
b/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/KnoxJwtRealm.java
index 3d87aa5..3663174 100644
--- 
a/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/KnoxJwtRealm.java
+++ 
b/zeppelin-server/src/main/java/org/apache/zeppelin/realm/jwt/KnoxJwtRealm.java
@@ -121,7 +121,7 @@ public class KnoxJwtRealm extends AuthorizingRealm {
 return null;
   }
 
-  private String getName(JWTAuthenticationToken upToken) throws ParseException 
{
+  public String getName(JWTAuthenticationToken upToken) throws ParseException {
 SignedJWT signed = SignedJWT.parse(upToken.getToken());
 String userName = signed.getJWTClaimsSet().getSubject();
 return userName;
@@ -140,6 +140,14 @@ public class KnoxJwtRealm extends AuthorizingRealm {
 LOGGER.warn("Expiration time validation of JWT token failed.");
 return false;
   }
+  String currentUser = (String) 
org.apache.shiro.SecurityUtils.getSubject().getPrincipal();
+  if (currentUser == null) {
+return true;
+  }
+  String cookieUser = signed.getJWTClaimsSet().getSubject();
+  if (!cookieUser.equals(currentUser)) {
+return false;
+  }
   return true;
 } catch (ParseException ex) {
   LOGGER.info("ParseException in validateToken", ex);

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/c41ba77f/zeppelin-server/src/main/java/org/apache/zeppelin/rest/LoginRestApi.java
--
diff --git 
a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/LoginRestApi.java 
b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/LoginRestApi.java
index 8451914..7a748e5 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/LoginRestApi.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/LoginRestApi.java
@@ -28,6 +28,7 @@ import org.apache.shiro.subject.Subject;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.text.ParseException;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -78,9 +79,14 @@ public class LoginRestApi {
   Cookie cookie = headers.getCookies().get(knoxJwtRealm.getCookieName());
   if (cookie != null && cookie.getValue() != null) {
 Subject currentUser = org.apache.shiro.SecurityUtils.getSubject();
-if (!currentUser.isAuthenticated()) {
-  JWTAuthenticationToken token = new JWTAuthenticationToken(null, 
cookie.getValue());
-  response = proceedToLogin(currentUser, token);
+JWTAuthenticationToken token = new JWTAuthenticationToken(null, 
cookie.getValue());
+try {
+  String name = knoxJwtRealm.getName(token);
+  if (!currentUser.isAuthenticated() || 
!currentUser.getPrincipal().equals(name)) {
+response = proceedToLogin(currentUser, token);
+  }
+} catch (ParseException e) {
+  LOG.error("ParseException in LoginRestApi: ", e);
 }
   }
   if (response == nul

[2/2] zeppelin git commit: Preparing development version 0.8.1-SNAPSHOT

2018-05-27 Thread zjffdu
Preparing development version 0.8.1-SNAPSHOT


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

Branch: refs/heads/branch-0.8
Commit: 877bcd7011b14c2213e9cd2de94f0e6299bfe789
Parents: b025caa
Author: Jeff Zhang 
Authored: Mon May 28 12:54:18 2018 +0800
Committer: Jeff Zhang 
Committed: Mon May 28 12:54:18 2018 +0800

--
 alluxio/pom.xml | 4 ++--
 angular/pom.xml | 4 ++--
 beam/pom.xml| 4 ++--
 bigquery/pom.xml| 4 ++--
 cassandra/pom.xml   | 4 ++--
 elasticsearch/pom.xml   | 4 ++--
 file/pom.xml| 4 ++--
 flink/pom.xml   | 4 ++--
 geode/pom.xml   | 4 ++--
 groovy/pom.xml  | 4 ++--
 hbase/pom.xml   | 4 ++--
 helium-dev/pom.xml  | 4 ++--
 ignite/pom.xml  | 4 ++--
 interpreter-parent/pom.xml  | 4 ++--
 jdbc/pom.xml| 4 ++--
 kylin/pom.xml   | 4 ++--
 lens/pom.xml| 4 ++--
 livy/pom.xml| 4 ++--
 markdown/pom.xml| 4 ++--
 neo4j/pom.xml   | 4 ++--
 pig/pom.xml | 4 ++--
 pom.xml | 2 +-
 python/pom.xml  | 4 ++--
 r/pom.xml   | 4 ++--
 sap/pom.xml | 4 ++--
 scalding/pom.xml| 4 ++--
 scio/pom.xml| 4 ++--
 shell/pom.xml   | 4 ++--
 spark/interpreter/pom.xml   | 4 ++--
 spark/pom.xml   | 4 ++--
 spark/scala-2.10/pom.xml| 4 ++--
 spark/scala-2.11/pom.xml| 4 ++--
 spark/spark-dependencies/pom.xml| 4 ++--
 spark/spark-scala-parent/pom.xml| 4 ++--
 spark/spark-shims/pom.xml   | 4 ++--
 spark/spark1-shims/pom.xml  | 4 ++--
 spark/spark2-shims/pom.xml  | 4 ++--
 zeppelin-display/pom.xml| 4 ++--
 zeppelin-distribution/pom.xml   | 2 +-
 zeppelin-examples/pom.xml   | 4 ++--
 zeppelin-examples/zeppelin-example-clock/pom.xml| 4 ++--
 zeppelin-examples/zeppelin-example-horizontalbar/pom.xml| 4 ++--
 zeppelin-examples/zeppelin-example-spell-echo/pom.xml   | 4 ++--
 zeppelin-examples/zeppelin-example-spell-flowchart/pom.xml  | 4 ++--
 zeppelin-examples/zeppelin-example-spell-markdown/pom.xml   | 4 ++--
 zeppelin-examples/zeppelin-example-spell-translator/pom.xml | 4 ++--
 zeppelin-integration/pom.xml| 4 ++--
 zeppelin-interpreter/pom.xml| 4 ++--
 zeppelin-jupyter/pom.xml| 4 ++--
 zeppelin-server/pom.xml | 4 ++--
 zeppelin-web/pom.xml| 4 ++--
 zeppelin-zengine/pom.xml| 4 ++--
 52 files changed, 102 insertions(+), 102 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/877bcd70/alluxio/pom.xml
--
diff --git a/alluxio/pom.xml b/alluxio/pom.xml
index b6a4876..acef494 100644
--- a/alluxio/pom.xml
+++ b/alluxio/pom.xml
@@ -22,14 +22,14 @@
 
 interpreter-parent
 org.apache.zeppelin
-0.8.0
+0.8.1-SNAPSHOT
 ../interpreter-parent
 
 
 org.apache.zeppelin
 zeppelin-alluxio
 jar
-0.8.0
+0.8.1-SNAPSHOT
 Zeppelin: Alluxio interpreter
 
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/877bcd70

[zeppelin] Git Push Summary

2018-05-27 Thread zjffdu
Repository: zeppelin
Updated Tags:  refs/tags/v0.8.0-rc4 [created] b025caac5


[1/2] zeppelin git commit: Preparing Apache Zeppelin release 0.8.0

2018-05-27 Thread zjffdu
Repository: zeppelin
Updated Branches:
  refs/heads/branch-0.8 613d90dd5 -> 877bcd701


Preparing Apache Zeppelin release 0.8.0


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

Branch: refs/heads/branch-0.8
Commit: b025caac587140e6ee1a6be2cf1261d5c638c8bf
Parents: 613d90d
Author: Jeff Zhang 
Authored: Mon May 28 12:54:11 2018 +0800
Committer: Jeff Zhang 
Committed: Mon May 28 12:54:11 2018 +0800

--
 alluxio/pom.xml | 4 ++--
 angular/pom.xml | 4 ++--
 beam/pom.xml| 4 ++--
 bigquery/pom.xml| 4 ++--
 cassandra/pom.xml   | 4 ++--
 elasticsearch/pom.xml   | 4 ++--
 file/pom.xml| 4 ++--
 flink/pom.xml   | 4 ++--
 geode/pom.xml   | 4 ++--
 groovy/pom.xml  | 4 ++--
 hbase/pom.xml   | 4 ++--
 helium-dev/pom.xml  | 4 ++--
 ignite/pom.xml  | 4 ++--
 interpreter-parent/pom.xml  | 4 ++--
 jdbc/pom.xml| 4 ++--
 kylin/pom.xml   | 4 ++--
 lens/pom.xml| 4 ++--
 livy/pom.xml| 4 ++--
 markdown/pom.xml| 4 ++--
 neo4j/pom.xml   | 4 ++--
 pig/pom.xml | 4 ++--
 pom.xml | 2 +-
 python/pom.xml  | 4 ++--
 r/pom.xml   | 4 ++--
 sap/pom.xml | 4 ++--
 scalding/pom.xml| 4 ++--
 scio/pom.xml| 4 ++--
 shell/pom.xml   | 4 ++--
 spark/interpreter/pom.xml   | 4 ++--
 spark/pom.xml   | 4 ++--
 spark/scala-2.10/pom.xml| 4 ++--
 spark/scala-2.11/pom.xml| 4 ++--
 spark/spark-dependencies/pom.xml| 4 ++--
 spark/spark-scala-parent/pom.xml| 4 ++--
 spark/spark-shims/pom.xml   | 4 ++--
 spark/spark1-shims/pom.xml  | 4 ++--
 spark/spark2-shims/pom.xml  | 4 ++--
 zeppelin-display/pom.xml| 4 ++--
 zeppelin-distribution/pom.xml   | 2 +-
 zeppelin-examples/pom.xml   | 4 ++--
 zeppelin-examples/zeppelin-example-clock/pom.xml| 4 ++--
 zeppelin-examples/zeppelin-example-horizontalbar/pom.xml| 4 ++--
 zeppelin-examples/zeppelin-example-spell-echo/pom.xml   | 4 ++--
 zeppelin-examples/zeppelin-example-spell-flowchart/pom.xml  | 4 ++--
 zeppelin-examples/zeppelin-example-spell-markdown/pom.xml   | 4 ++--
 zeppelin-examples/zeppelin-example-spell-translator/pom.xml | 4 ++--
 zeppelin-integration/pom.xml| 4 ++--
 zeppelin-interpreter/pom.xml| 4 ++--
 zeppelin-jupyter/pom.xml| 4 ++--
 zeppelin-server/pom.xml | 4 ++--
 zeppelin-web/pom.xml| 4 ++--
 zeppelin-zengine/pom.xml| 4 ++--
 52 files changed, 102 insertions(+), 102 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/b025caac/alluxio/pom.xml
--
diff --git a/alluxio/pom.xml b/alluxio/pom.xml
index acef494..b6a4876 100644
--- a/alluxio/pom.xml
+++ b/alluxio/pom.xml
@@ -22,14 +22,14 @@
 
 interpreter-parent
 org.apache.zeppelin
-0.8.1-SNAPSHOT
+0.8.0
 ../interpreter-parent
 
 
 org.apache.zeppelin
 zeppelin-alluxio
 jar
-0.8.1-SNAPSHOT
+0.8.0
 Zeppelin: Alluxio

zeppelin git commit: ZEPPELIN-3506. DepInterpreter is broken

2018-05-27 Thread zjffdu
Repository: zeppelin
Updated Branches:
  refs/heads/branch-0.8 664e2880e -> 613d90dd5


ZEPPELIN-3506. DepInterpreter is broken

### What is this PR for?
The bug is due to getInterpreterInTheSameSessionByClassName doesn't find the 
correct DepInterpreter. This PR fix this issue. The unit test fails due to 
classpath issue, will enable it later.

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

### Todos
* [ ] - Task

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

### How should this be tested?
* CI pass and manually tested

### Screenshots (if appropriate)
![screen shot 2018-05-28 at 11 49 33 
am](https://user-images.githubusercontent.com/164491/40596424-36e407e2-626d-11e8-8965-05a5833af54c.png)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Jeff Zhang 

Closes #2988 from zjffdu/ZEPPELIN-3506 and squashes the following commits:

dd77d5c28 [Jeff Zhang] ZEPPELIN-3506. DepInterpreter is broken

(cherry picked from commit e9dedab46df9dfe3ff6902e453db92cf0e712e82)
Signed-off-by: Jeff Zhang 


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

Branch: refs/heads/branch-0.8
Commit: 613d90dd514eda5170a04a43a29b3fe539124dfc
Parents: 664e288
Author: Jeff Zhang 
Authored: Mon May 28 10:19:42 2018 +0800
Committer: Jeff Zhang 
Committed: Mon May 28 12:50:08 2018 +0800

--
 .../spark/AbstractSparkInterpreter.java | 10 +
 .../zeppelin/spark/NewSparkInterpreter.java |  3 +-
 .../zeppelin/spark/OldSparkInterpreter.java |  3 +-
 .../apache/zeppelin/spark/SparkInterpreter.java |  1 +
 .../zeppelin/spark/NewSparkInterpreterTest.java | 39 +++-
 5 files changed, 53 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/613d90dd/spark/interpreter/src/main/java/org/apache/zeppelin/spark/AbstractSparkInterpreter.java
--
diff --git 
a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/AbstractSparkInterpreter.java
 
b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/AbstractSparkInterpreter.java
index 9968dc6..aa1343a 100644
--- 
a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/AbstractSparkInterpreter.java
+++ 
b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/AbstractSparkInterpreter.java
@@ -31,6 +31,8 @@ import java.util.Properties;
  */
 public abstract class AbstractSparkInterpreter extends Interpreter {
 
+  private SparkInterpreter parentSparkInterpreter;
+
   public AbstractSparkInterpreter(Properties properties) {
 super(properties);
   }
@@ -54,4 +56,12 @@ public abstract class AbstractSparkInterpreter extends 
Interpreter {
   public abstract String getSparkUIUrl();
 
   public abstract boolean isUnsupportedSparkVersion();
+
+  public void setParentSparkInterpreter(SparkInterpreter 
parentSparkInterpreter) {
+this.parentSparkInterpreter = parentSparkInterpreter;
+  }
+
+  public SparkInterpreter getParentSparkInterpreter() {
+return parentSparkInterpreter;
+  }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/613d90dd/spark/interpreter/src/main/java/org/apache/zeppelin/spark/NewSparkInterpreter.java
--
diff --git 
a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/NewSparkInterpreter.java
 
b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/NewSparkInterpreter.java
index c8efa7a..591ef96 100644
--- 
a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/NewSparkInterpreter.java
+++ 
b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/NewSparkInterpreter.java
@@ -241,7 +241,8 @@ public class NewSparkInterpreter extends 
AbstractSparkInterpreter {
   }
 
   private DepInterpreter getDepInterpreter() {
-Interpreter p = 
getInterpreterInTheSameSessionByClassName(DepInterpreter.class.getName());
+Interpreter p = getParentSparkInterpreter()
+
.getInterpreterInTheSameSessionByClassName(DepInterpreter.class.getName());
 if (p == null) {
   return null;
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/613d90dd/spark/interpreter/src/main/java/org/apache/zeppelin/spark/OldSparkInterpreter.java
--
diff --git 
a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/OldSparkInterpreter.java
 
b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/OldSparkInterpreter.java
index 1f59d18..0dfe3cb 100644
--- 
a/spark/interpreter/src/main/java/org/apache/zeppeli

zeppelin git commit: ZEPPELIN-3506. DepInterpreter is broken

2018-05-27 Thread zjffdu
Repository: zeppelin
Updated Branches:
  refs/heads/master 4b436ca22 -> e9dedab46


ZEPPELIN-3506. DepInterpreter is broken

### What is this PR for?
The bug is due to getInterpreterInTheSameSessionByClassName doesn't find the 
correct DepInterpreter. This PR fix this issue. The unit test fails due to 
classpath issue, will enable it later.

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

### Todos
* [ ] - Task

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

### How should this be tested?
* CI pass and manually tested

### Screenshots (if appropriate)
![screen shot 2018-05-28 at 11 49 33 
am](https://user-images.githubusercontent.com/164491/40596424-36e407e2-626d-11e8-8965-05a5833af54c.png)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Jeff Zhang 

Closes #2988 from zjffdu/ZEPPELIN-3506 and squashes the following commits:

dd77d5c28 [Jeff Zhang] ZEPPELIN-3506. DepInterpreter is broken


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

Branch: refs/heads/master
Commit: e9dedab46df9dfe3ff6902e453db92cf0e712e82
Parents: 4b436ca
Author: Jeff Zhang 
Authored: Mon May 28 10:19:42 2018 +0800
Committer: Jeff Zhang 
Committed: Mon May 28 12:49:57 2018 +0800

--
 .../spark/AbstractSparkInterpreter.java | 10 +
 .../zeppelin/spark/NewSparkInterpreter.java |  3 +-
 .../zeppelin/spark/OldSparkInterpreter.java |  3 +-
 .../apache/zeppelin/spark/SparkInterpreter.java |  1 +
 .../zeppelin/spark/NewSparkInterpreterTest.java | 39 +++-
 5 files changed, 53 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/e9dedab4/spark/interpreter/src/main/java/org/apache/zeppelin/spark/AbstractSparkInterpreter.java
--
diff --git 
a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/AbstractSparkInterpreter.java
 
b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/AbstractSparkInterpreter.java
index 9968dc6..aa1343a 100644
--- 
a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/AbstractSparkInterpreter.java
+++ 
b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/AbstractSparkInterpreter.java
@@ -31,6 +31,8 @@ import java.util.Properties;
  */
 public abstract class AbstractSparkInterpreter extends Interpreter {
 
+  private SparkInterpreter parentSparkInterpreter;
+
   public AbstractSparkInterpreter(Properties properties) {
 super(properties);
   }
@@ -54,4 +56,12 @@ public abstract class AbstractSparkInterpreter extends 
Interpreter {
   public abstract String getSparkUIUrl();
 
   public abstract boolean isUnsupportedSparkVersion();
+
+  public void setParentSparkInterpreter(SparkInterpreter 
parentSparkInterpreter) {
+this.parentSparkInterpreter = parentSparkInterpreter;
+  }
+
+  public SparkInterpreter getParentSparkInterpreter() {
+return parentSparkInterpreter;
+  }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/e9dedab4/spark/interpreter/src/main/java/org/apache/zeppelin/spark/NewSparkInterpreter.java
--
diff --git 
a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/NewSparkInterpreter.java
 
b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/NewSparkInterpreter.java
index 9b629f9..b2b715b 100644
--- 
a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/NewSparkInterpreter.java
+++ 
b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/NewSparkInterpreter.java
@@ -244,7 +244,8 @@ public class NewSparkInterpreter extends 
AbstractSparkInterpreter {
   }
 
   private DepInterpreter getDepInterpreter() {
-Interpreter p = 
getInterpreterInTheSameSessionByClassName(DepInterpreter.class.getName());
+Interpreter p = getParentSparkInterpreter()
+
.getInterpreterInTheSameSessionByClassName(DepInterpreter.class.getName());
 if (p == null) {
   return null;
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/e9dedab4/spark/interpreter/src/main/java/org/apache/zeppelin/spark/OldSparkInterpreter.java
--
diff --git 
a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/OldSparkInterpreter.java
 
b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/OldSparkInterpreter.java
index 1f59d18..0dfe3cb 100644
--- 
a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/OldSparkInterpreter.java
+++ 
b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/OldSpar

zeppelin git commit: ZEPPELIN-3475: Bump up version of Apache Thrift

2018-05-27 Thread prabhjyotsingh
Repository: zeppelin
Updated Branches:
  refs/heads/master 51c613d7e -> 4b436ca22


ZEPPELIN-3475: Bump up version of Apache Thrift

### What is this PR for?
Bump up version of Apache Thrift

### What type of PR is it?
[Improvement]

### What is the Jira issue?
* [ZEPPELIN-3475](https://issues.apache.org/jira/browse/ZEPPELIN-3475)

### Questions:
* Does the licenses files need update? yes
* Is there breaking changes for older versions? no
* Does this needs documentation? no

Author: Prabhjyot Singh 

Closes #2975 from prabhjyotsingh/ZEPPELIN-3475 and squashes the following 
commits:

2b1d518 [Prabhjyot Singh] Revert "add maven-shade-plugin"
19b21b1 [Prabhjyot Singh] add maven-shade-plugin
042511d [Prabhjyot Singh] re-generate with thrift-0.9.3
67d2399 [Prabhjyot Singh] update license
000e1fd [Prabhjyot Singh] ZEPPELIN-3475: Bump up version of Apache Thrift


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

Branch: refs/heads/master
Commit: 4b436ca22091baab8170fa80713e86918db5b987
Parents: 51c613d
Author: Prabhjyot Singh 
Authored: Thu May 24 15:27:01 2018 +0530
Committer: Prabhjyot Singh 
Committed: Mon May 28 08:26:43 2018 +0530

--
 pom.xml   |  2 +-
 zeppelin-distribution/src/bin_license/LICENSE |  2 +-
 .../apache/zeppelin/interpreter/thrift/CallbackInfo.java  |  6 +++---
 .../interpreter/thrift/InterpreterCompletion.java |  4 ++--
 .../interpreter/thrift/RemoteApplicationResult.java   |  6 +++---
 .../thrift/RemoteInterpreterCallbackService.java  |  4 ++--
 .../interpreter/thrift/RemoteInterpreterContext.java  |  4 ++--
 .../interpreter/thrift/RemoteInterpreterEvent.java|  4 ++--
 .../interpreter/thrift/RemoteInterpreterEventType.java|  2 +-
 .../interpreter/thrift/RemoteInterpreterResult.java   |  4 ++--
 .../thrift/RemoteInterpreterResultMessage.java|  4 ++--
 .../interpreter/thrift/RemoteInterpreterService.java  | 10 +-
 .../thrift/ZeppelinServerResourceParagraphRunner.java |  4 ++--
 13 files changed, 28 insertions(+), 28 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/4b436ca2/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 89c11d9..94003fd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -101,7 +101,7 @@
 
 1.7.10
 1.2.17
-0.9.2
+0.9.3
 2.2
 0.2.1
 9.2.15.v20160210

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/4b436ca2/zeppelin-distribution/src/bin_license/LICENSE
--
diff --git a/zeppelin-distribution/src/bin_license/LICENSE 
b/zeppelin-distribution/src/bin_license/LICENSE
index 37fbce1..90642b3 100644
--- a/zeppelin-distribution/src/bin_license/LICENSE
+++ b/zeppelin-distribution/src/bin_license/LICENSE
@@ -38,7 +38,7 @@ The following components are provided under Apache License.
 (Apache 2.0) Apache Lens (http://lens.apache.org/)
 (Apache 2.0) Apache Flink (http://flink.apache.org/)
 (Apache 2.0) Apache Beam (http://beam.apache.org/)
-(Apache 2.0) Apache Thrift 0.9.2 (org.apache.thrift:libthrift:0.9.2 - 
http://thrift.apache.org/)
+(Apache 2.0) Apache Thrift 0.9.3 (org.apache.thrift:libthrift:0.9.3 - 
http://thrift.apache.org/)
 (Apache 2.0) Apache Lucene (https://lucene.apache.org/)
 (Apache 2.0) Apache Zookeeper (org.apache.zookeeper:zookeeper:jar:3.4.5 - 
http://zookeeper.apache.org/)
 (Apache 2.0) Chill (com.twitter:chill:0.8.0 - 
https://github.com/twitter/chill/)

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/4b436ca2/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/CallbackInfo.java
--
diff --git 
a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/CallbackInfo.java
 
b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/CallbackInfo.java
index c36a7ac..90785b2 100644
--- 
a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/CallbackInfo.java
+++ 
b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/thrift/CallbackInfo.java
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 /**
- * Autogenerated by Thrift Compiler (0.9.2)
+ * Autogenerated by Thrift Compiler (0.9.3)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(