zeppelin git commit: [HOTFIX] Fix unit test failure of NewSparkInterpreterTest

2018-06-15 Thread zjffdu
Repository: zeppelin
Updated Branches:
  refs/heads/branch-0.8 f50acdf63 -> 974cd5dae


[HOTFIX] Fix unit test failure of NewSparkInterpreterTest


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

Branch: refs/heads/branch-0.8
Commit: 974cd5daed41dc50885a6fa773a027b7f1166de1
Parents: f50acdf
Author: Jeff Zhang 
Authored: Fri Jun 15 22:34:13 2018 +0800
Committer: Jeff Zhang 
Committed: Fri Jun 15 22:34:13 2018 +0800

--
 .../java/org/apache/zeppelin/spark/NewSparkInterpreterTest.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/974cd5da/spark/interpreter/src/test/java/org/apache/zeppelin/spark/NewSparkInterpreterTest.java
--
diff --git 
a/spark/interpreter/src/test/java/org/apache/zeppelin/spark/NewSparkInterpreterTest.java
 
b/spark/interpreter/src/test/java/org/apache/zeppelin/spark/NewSparkInterpreterTest.java
index 263c38b..25a400c 100644
--- 
a/spark/interpreter/src/test/java/org/apache/zeppelin/spark/NewSparkInterpreterTest.java
+++ 
b/spark/interpreter/src/test/java/org/apache/zeppelin/spark/NewSparkInterpreterTest.java
@@ -67,7 +67,7 @@ public class NewSparkInterpreterTest {
   // catch the interpreter output in onUpdate
   private InterpreterResultMessageOutput messageOutput;
 
-  private RemoteEventClient mockRemoteEventClient = 
mock(RemoteEventClient.class);
+  private RemoteEventClient mockRemoteEventClient;
 
   @Test
   public void testSparkInterpreter() throws IOException, InterruptedException, 
InterpreterException {
@@ -82,6 +82,7 @@ public class NewSparkInterpreterTest {
 interpreter.setInterpreterGroup(mock(InterpreterGroup.class));
 interpreter.open();
 
+mockRemoteEventClient = mock(RemoteEventClient.class);
 interpreter.getZeppelinContext().setEventClient(mockRemoteEventClient);
 InterpreterResult result = interpreter.interpret("val a=\"hello world\"", 
getInterpreterContext());
 assertEquals(InterpreterResult.Code.SUCCESS, result.code());



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

2018-06-15 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/f50acdf6
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/f50acdf6
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/f50acdf6

Branch: refs/heads/branch-0.8
Commit: f50acdf63ea0a1a806e78f241af70247ab8bbd52
Parents: adc2e63
Author: Jeff Zhang 
Authored: Fri Jun 15 17:22:10 2018 +0800
Committer: Jeff Zhang 
Committed: Fri Jun 15 17:22:10 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/f50acdf6/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/f50acdf6

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

2018-06-15 Thread zjffdu
Repository: zeppelin
Updated Branches:
  refs/heads/branch-0.8 8971cbd0c -> f50acdf63


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/adc2e63c
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/adc2e63c
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/adc2e63c

Branch: refs/heads/branch-0.8
Commit: adc2e63c1ff1f7690ba7b3c10984c8024e379a31
Parents: 8971cbd
Author: Jeff Zhang 
Authored: Fri Jun 15 17:22:04 2018 +0800
Committer: Jeff Zhang 
Committed: Fri Jun 15 17:22:04 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/adc2e63c/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 Push Summary

2018-06-15 Thread zjffdu
Repository: zeppelin
Updated Tags:  refs/tags/v0.8.0-rc5 [created] adc2e63c1


[zeppelin] Git Push Summary

2018-06-15 Thread zjffdu
Repository: zeppelin
Updated Tags:  refs/tags/v0.8.0-rc5 [deleted] 029ad9615


zeppelin git commit: ZEPPELIN-3519. zeppelin.spark.printREPLOutput doesn't work for new SparkInterpreter

2018-06-15 Thread zjffdu
Repository: zeppelin
Updated Branches:
  refs/heads/branch-0.8 efa09aa8c -> 8971cbd0c


ZEPPELIN-3519. zeppelin.spark.printREPLOutput doesn't work for new 
SparkInterpreter

Straightforward fix to make `zeppelin.spark.printREPLOutput` work in 
`NewSparkInterpreter`

[Bug Fix]

* [ ] - Task

* https://issues.apache.org/jira/browse/ZEPPELIN-3519

* CI pass

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

Author: Jeff Zhang 

Closes #3022 from zjffdu/ZEPPELIN-3519 and squashes the following commits:

9d3bbe578 [Jeff Zhang] ZEPPELIN-3519. zeppelin.spark.printREPLOutput doesn't 
work for new SparkInterpreter

(cherry picked from commit 6ed3d88a2a43e33c6bbd0931c92c13304d7ab0de)
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/8971cbd0
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/8971cbd0
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/8971cbd0

Branch: refs/heads/branch-0.8
Commit: 8971cbd0ca64c5014cac1f8ea9221f84c4abbe97
Parents: efa09aa
Author: Jeff Zhang 
Authored: Fri Jun 1 12:54:16 2018 +0800
Committer: Jeff Zhang 
Committed: Fri Jun 15 17:19:45 2018 +0800

--
 .../zeppelin/spark/NewSparkInterpreter.java |  7 +++---
 .../zeppelin/spark/NewSparkInterpreterTest.java | 26 
 .../spark/SparkScala210Interpreter.scala| 10 +---
 .../spark/SparkScala211Interpreter.scala| 11 ++---
 .../spark/BaseSparkScalaInterpreter.scala   |  3 ++-
 5 files changed, 47 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/8971cbd0/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 2ea79f0..9f7d03d 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
@@ -95,9 +95,10 @@ public class NewSparkInterpreter extends 
AbstractSparkInterpreter {
 
   String innerIntpClassName = innerInterpreterClassMap.get(scalaVersion);
   Class clazz = Class.forName(innerIntpClassName);
-  this.innerInterpreter =
-  (BaseSparkScalaInterpreter) clazz.getConstructor(SparkConf.class, 
List.class)
-  .newInstance(conf, getDependencyFiles());
+  this.innerInterpreter = (BaseSparkScalaInterpreter)
+  clazz.getConstructor(SparkConf.class, List.class, Boolean.class)
+  .newInstance(conf, getDependencyFiles(),
+  
Boolean.parseBoolean(getProperty("zeppelin.spark.printREPLOutput", "true")));
   this.innerInterpreter.open();
 
   sc = this.innerInterpreter.sc();

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/8971cbd0/spark/interpreter/src/test/java/org/apache/zeppelin/spark/NewSparkInterpreterTest.java
--
diff --git 
a/spark/interpreter/src/test/java/org/apache/zeppelin/spark/NewSparkInterpreterTest.java
 
b/spark/interpreter/src/test/java/org/apache/zeppelin/spark/NewSparkInterpreterTest.java
index f6cb9a9..263c38b 100644
--- 
a/spark/interpreter/src/test/java/org/apache/zeppelin/spark/NewSparkInterpreterTest.java
+++ 
b/spark/interpreter/src/test/java/org/apache/zeppelin/spark/NewSparkInterpreterTest.java
@@ -385,6 +385,32 @@ public class NewSparkInterpreterTest {
 assertEquals(InterpreterResult.Code.SUCCESS, result.code());
   }
 
+  @Test
+  public void testDisableReplOutput() throws InterpreterException {
+Properties properties = new Properties();
+properties.setProperty("spark.master", "local");
+properties.setProperty("spark.app.name", "test");
+properties.setProperty("zeppelin.spark.maxResult", "100");
+properties.setProperty("zeppelin.spark.test", "true");
+properties.setProperty("zeppelin.spark.useNew", "true");
+properties.setProperty("zeppelin.spark.printREPLOutput", "false");
+
+interpreter = new SparkInterpreter(properties);
+assertTrue(interpreter.getDelegation() instanceof NewSparkInterpreter);
+interpreter.setInterpreterGroup(mock(InterpreterGroup.class));
+interpreter.open();
+
+InterpreterResult result = interpreter.interpret("val a=\"hello world\"", 
getInterpreterContext());
+assertEquals(InterpreterResult.Code.SUCCESS, result.code());
+// no output for define new variable
+assertEquals("", output);
+
+result = interpreter.interpret("print(a)", getInterpreterContext());
+assertE

zeppelin git commit: ZEPPELIN-3519. zeppelin.spark.printREPLOutput doesn't work for new SparkInterpreter

2018-06-15 Thread zjffdu
Repository: zeppelin
Updated Branches:
  refs/heads/master 1caa6aa2f -> 6ed3d88a2


ZEPPELIN-3519. zeppelin.spark.printREPLOutput doesn't work for new 
SparkInterpreter

### What is this PR for?
Straightforward fix to make `zeppelin.spark.printREPLOutput` work in 
`NewSparkInterpreter`

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

### Todos
* [ ] - Task

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

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

### 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 

Closes #3022 from zjffdu/ZEPPELIN-3519 and squashes the following commits:

9d3bbe578 [Jeff Zhang] ZEPPELIN-3519. zeppelin.spark.printREPLOutput doesn't 
work for new SparkInterpreter


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

Branch: refs/heads/master
Commit: 6ed3d88a2a43e33c6bbd0931c92c13304d7ab0de
Parents: 1caa6aa
Author: Jeff Zhang 
Authored: Fri Jun 1 12:54:16 2018 +0800
Committer: Jeff Zhang 
Committed: Fri Jun 15 17:16:10 2018 +0800

--
 .../zeppelin/spark/NewSparkInterpreter.java |  7 +++---
 .../zeppelin/spark/NewSparkInterpreterTest.java | 26 
 .../spark/SparkScala210Interpreter.scala|  9 ---
 .../spark/SparkScala211Interpreter.scala| 11 ++---
 .../spark/BaseSparkScalaInterpreter.scala   |  3 ++-
 5 files changed, 46 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/6ed3d88a/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 b60e38b..c532074 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
@@ -95,9 +95,10 @@ public class NewSparkInterpreter extends 
AbstractSparkInterpreter {
 
   String innerIntpClassName = innerInterpreterClassMap.get(scalaVersion);
   Class clazz = Class.forName(innerIntpClassName);
-  this.innerInterpreter =
-  (BaseSparkScalaInterpreter) clazz.getConstructor(SparkConf.class, 
List.class)
-  .newInstance(conf, getDependencyFiles());
+  this.innerInterpreter = (BaseSparkScalaInterpreter)
+  clazz.getConstructor(SparkConf.class, List.class, Boolean.class)
+  .newInstance(conf, getDependencyFiles(),
+  
Boolean.parseBoolean(getProperty("zeppelin.spark.printREPLOutput", "true")));
   this.innerInterpreter.open();
 
   sc = this.innerInterpreter.sc();

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/6ed3d88a/spark/interpreter/src/test/java/org/apache/zeppelin/spark/NewSparkInterpreterTest.java
--
diff --git 
a/spark/interpreter/src/test/java/org/apache/zeppelin/spark/NewSparkInterpreterTest.java
 
b/spark/interpreter/src/test/java/org/apache/zeppelin/spark/NewSparkInterpreterTest.java
index 84bdc43..a694f08 100644
--- 
a/spark/interpreter/src/test/java/org/apache/zeppelin/spark/NewSparkInterpreterTest.java
+++ 
b/spark/interpreter/src/test/java/org/apache/zeppelin/spark/NewSparkInterpreterTest.java
@@ -390,6 +390,32 @@ public class NewSparkInterpreterTest {
 assertEquals(InterpreterResult.Code.SUCCESS, result.code());
   }
 
+  @Test
+  public void testDisableReplOutput() throws InterpreterException {
+Properties properties = new Properties();
+properties.setProperty("spark.master", "local");
+properties.setProperty("spark.app.name", "test");
+properties.setProperty("zeppelin.spark.maxResult", "100");
+properties.setProperty("zeppelin.spark.test", "true");
+properties.setProperty("zeppelin.spark.useNew", "true");
+properties.setProperty("zeppelin.spark.printREPLOutput", "false");
+
+interpreter = new SparkInterpreter(properties);
+assertTrue(interpreter.getDelegation() instanceof NewSparkInterpreter);
+interpreter.setInterpreterGroup(mock(InterpreterGroup.class));
+interpreter.open();
+
+InterpreterResult result = interpreter.interpret("val a=\"hello world\"", 
getInterpreterContext());
+assertEquals(InterpreterResult.Code.SUCCESS, result.code());
+// no output for define new variable
+assertEquals("", output);
+
+result = interpre

zeppelin git commit: [ZEPPELIN-3539] Add jceks stored password support for LDAP

2018-06-15 Thread prabhjyotsingh
Repository: zeppelin
Updated Branches:
  refs/heads/branch-0.8 731d0be6b -> efa09aa8c


[ZEPPELIN-3539] Add jceks stored password support for LDAP

This is to add support for storing password in jceks for LDAP (realm).

If the hadoopSecurityCredentialPath path is present and not empty in the 
shiro.ini, then the password is read from the keystore file and it need not be 
stored inside the shiro.ini file.

[Improvement | Feature]

* [x] - Add documentation

* [ZEPPELIN-3539](https://issues.apache.org/jira/browse/ZEPPELIN-3539)

Create a keystore file using the hadoop credential command line
```
hadoop credential create ldapRealm.systemPassword -provider 
jceks://file/user/zeppelin/conf/zeppelin.jceks
```
Change the following values in the Shiro.ini file, and uncomment the line:
```
ldapRealm.hadoopSecurityCredentialPath = 
jceks://file/user/zeppelin/conf/zeppelin.jceks
```

* Does the licenses files need update? N/A
* Is there breaking changes for older versions? N/A
* Does this needs documentation? N/A

Author: Prabhjyot Singh 

Closes #3018 from prabhjyotsingh/ZEPPELIN-3539 and squashes the following 
commits:

4dcbaabb4 [Prabhjyot Singh] zeppelin server should not start if invaild 
configuration is applied
228022db3 [Prabhjyot Singh] doc for hadoopSecurityCredentialPath
1428b3d1b [Prabhjyot Singh] [ZEPPELIN-3539] Add jceks stored password support 
for LDAP

Change-Id: Id50532a0b05de1572efd7fb5dc8a6ca66fb8

# Conflicts:
#   
zeppelin-server/src/main/java/org/apache/zeppelin/realm/ActiveDirectoryGroupRealm.java
#   zeppelin-server/src/main/java/org/apache/zeppelin/realm/LdapRealm.java


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

Branch: refs/heads/branch-0.8
Commit: efa09aa8c8d3545667eec856412d6e5033caa55e
Parents: 731d0be
Author: Prabhjyot Singh 
Authored: Thu Jun 14 12:46:08 2018 +0530
Committer: Prabhjyot Singh 
Committed: Fri Jun 15 13:18:59 2018 +0530

--
 docs/setup/security/shiro_authentication.md |  11 +
 .../realm/ActiveDirectoryGroupRealm.java|  36 +--
 .../org/apache/zeppelin/realm/LdapRealm.java| 284 +++
 3 files changed, 186 insertions(+), 145 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/efa09aa8/docs/setup/security/shiro_authentication.md
--
diff --git a/docs/setup/security/shiro_authentication.md 
b/docs/setup/security/shiro_authentication.md
index e1bf650..a9dd13e 100644
--- a/docs/setup/security/shiro_authentication.md
+++ b/docs/setup/security/shiro_authentication.md
@@ -185,6 +185,17 @@ securityManager.sessionManager = $sessionManager
 securityManager.realms = $ldapRealm
 ```
 
+Also instead of specifying systemPassword in clear text in `shiro.ini` 
administrator can choose to specify the same in "hadoop credential". 
+Create a keystore file using the hadoop credential command line:
+``` 
+hadoop credential create ldapRealm.systemPassword -provider 
jceks://file/user/zeppelin/conf/zeppelin.jceks
+```
+
+Add the following line in the `shiro.ini` file:
+``` 
+ldapRealm.hadoopSecurityCredentialPath = 
jceks://file/user/zeppelin/conf/zeppelin.jceks
+```
+
 ### PAM
 [PAM](https://en.wikipedia.org/wiki/Pluggable_authentication_module) 
authentication support allows the reuse of existing authentication
 moduls on the host where Zeppelin is running. On a typical system modules are 
configured per service for example sshd, passwd, etc. under `/etc/pam.d/`. You 
can

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/efa09aa8/zeppelin-server/src/main/java/org/apache/zeppelin/realm/ActiveDirectoryGroupRealm.java
--
diff --git 
a/zeppelin-server/src/main/java/org/apache/zeppelin/realm/ActiveDirectoryGroupRealm.java
 
b/zeppelin-server/src/main/java/org/apache/zeppelin/realm/ActiveDirectoryGroupRealm.java
index 4f3626c..54650a4 100644
--- 
a/zeppelin-server/src/main/java/org/apache/zeppelin/realm/ActiveDirectoryGroupRealm.java
+++ 
b/zeppelin-server/src/main/java/org/apache/zeppelin/realm/ActiveDirectoryGroupRealm.java
@@ -17,18 +17,14 @@
 package org.apache.zeppelin.realm;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.security.alias.CredentialProvider;
-import org.apache.hadoop.security.alias.CredentialProviderFactory;
+import org.apache.shiro.authc.AuthenticationException;
 import org.apache.shiro.authc.AuthenticationInfo;
 import org.apache.shiro.authc.AuthenticationToken;
 import org.apache.shiro.authc.SimpleAuthenticationInfo;
 import org.apache.shiro.authc.Usern

zeppelin git commit: [ZEPPELIN-3539] Add jceks stored password support for LDAP

2018-06-15 Thread prabhjyotsingh
Repository: zeppelin
Updated Branches:
  refs/heads/master bf4e1f93b -> 1caa6aa2f


[ZEPPELIN-3539] Add jceks stored password support for LDAP

This is to add support for storing password in jceks for LDAP (realm).

If the hadoopSecurityCredentialPath path is present and not empty in the 
shiro.ini, then the password is read from the keystore file and it need not be 
stored inside the shiro.ini file.

[Improvement | Feature]

* [x] - Add documentation

* [ZEPPELIN-3539](https://issues.apache.org/jira/browse/ZEPPELIN-3539)

Create a keystore file using the hadoop credential command line
```
hadoop credential create ldapRealm.systemPassword -provider 
jceks://file/user/zeppelin/conf/zeppelin.jceks
```
Change the following values in the Shiro.ini file, and uncomment the line:
```
ldapRealm.hadoopSecurityCredentialPath = 
jceks://file/user/zeppelin/conf/zeppelin.jceks
```

* Does the licenses files need update? N/A
* Is there breaking changes for older versions? N/A
* Does this needs documentation? N/A

Author: Prabhjyot Singh 

Closes #3018 from prabhjyotsingh/ZEPPELIN-3539 and squashes the following 
commits:

4dcbaabb4 [Prabhjyot Singh] zeppelin server should not start if invaild 
configuration is applied
228022db3 [Prabhjyot Singh] doc for hadoopSecurityCredentialPath
1428b3d1b [Prabhjyot Singh] [ZEPPELIN-3539] Add jceks stored password support 
for LDAP

Change-Id: Id50532a0b05de1572efd7fb5dc8a6ca66fb8


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

Branch: refs/heads/master
Commit: 1caa6aa2fffbf0b2b549dffa5b3b88d2d63da5ad
Parents: bf4e1f9
Author: Prabhjyot Singh 
Authored: Thu Jun 14 12:46:08 2018 +0530
Committer: Prabhjyot Singh 
Committed: Fri Jun 15 13:07:36 2018 +0530

--
 docs/setup/security/shiro_authentication.md |  11 +
 .../realm/ActiveDirectoryGroupRealm.java|  17 +-
 .../org/apache/zeppelin/realm/LdapRealm.java| 285 +++
 3 files changed, 175 insertions(+), 138 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1caa6aa2/docs/setup/security/shiro_authentication.md
--
diff --git a/docs/setup/security/shiro_authentication.md 
b/docs/setup/security/shiro_authentication.md
index e1bf650..a9dd13e 100644
--- a/docs/setup/security/shiro_authentication.md
+++ b/docs/setup/security/shiro_authentication.md
@@ -185,6 +185,17 @@ securityManager.sessionManager = $sessionManager
 securityManager.realms = $ldapRealm
 ```
 
+Also instead of specifying systemPassword in clear text in `shiro.ini` 
administrator can choose to specify the same in "hadoop credential". 
+Create a keystore file using the hadoop credential command line:
+``` 
+hadoop credential create ldapRealm.systemPassword -provider 
jceks://file/user/zeppelin/conf/zeppelin.jceks
+```
+
+Add the following line in the `shiro.ini` file:
+``` 
+ldapRealm.hadoopSecurityCredentialPath = 
jceks://file/user/zeppelin/conf/zeppelin.jceks
+```
+
 ### PAM
 [PAM](https://en.wikipedia.org/wiki/Pluggable_authentication_module) 
authentication support allows the reuse of existing authentication
 moduls on the host where Zeppelin is running. On a typical system modules are 
configured per service for example sshd, passwd, etc. under `/etc/pam.d/`. You 
can

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1caa6aa2/zeppelin-server/src/main/java/org/apache/zeppelin/realm/ActiveDirectoryGroupRealm.java
--
diff --git 
a/zeppelin-server/src/main/java/org/apache/zeppelin/realm/ActiveDirectoryGroupRealm.java
 
b/zeppelin-server/src/main/java/org/apache/zeppelin/realm/ActiveDirectoryGroupRealm.java
index 3ca8c4e..624b1ae 100644
--- 
a/zeppelin-server/src/main/java/org/apache/zeppelin/realm/ActiveDirectoryGroupRealm.java
+++ 
b/zeppelin-server/src/main/java/org/apache/zeppelin/realm/ActiveDirectoryGroupRealm.java
@@ -17,9 +17,6 @@
 package org.apache.zeppelin.realm;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.security.alias.CredentialProvider;
-import org.apache.hadoop.security.alias.CredentialProviderFactory;
 import org.apache.shiro.authc.AuthenticationException;
 import org.apache.shiro.authc.AuthenticationInfo;
 import org.apache.shiro.authc.AuthenticationToken;
@@ -141,19 +138,7 @@ public class ActiveDirectoryGroupRealm extends 
AbstractLdapRealm {
 if (StringUtils.isEmpty(this.hadoopSecurityCredentialPath)) {
   password = this.systemPassword;
 } else {
-  try {
-Configuration configuration = new Configuration();
-co