You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by bz...@apache.org on 2015/06/17 03:49:28 UTC

incubator-zeppelin git commit: [ZEPPELIN-30] interpreter.json should be saved in $ZEPPELIN_CONF_DIR

Repository: incubator-zeppelin
Updated Branches:
  refs/heads/master b5c705790 -> d6446d707


[ZEPPELIN-30] interpreter.json should be saved in $ZEPPELIN_CONF_DIR

- Changed conf directory from "conf/" to "$ZEPPELIN_CONF_DIR"

Author: Jongyoul Lee <jo...@gmail.com>

Closes #104 from jongyoul/ZEPPELIN-30 and squashes the following commits:

a2fa425 [Jongyoul Lee] [ZEPPELIN-30] interpreter.json should be saved in $ZEPPELIN_CONF_DIR - Changed zeppelin-site.xml.template
11cbbd7 [Jongyoul Lee] [ZEPPELIN-30] interpreter.json should be saved in $ZEPPELIN_CONF_DIR - Reverted unexpected changes
f56c7cc [Jongyoul Lee] [ZEPPELIN-30] interpreter.json should be saved in $ZEPPELIN_CONF_DIR - Added default value of $ZEPPELIN_CONF_DIR
0201586 [Jongyoul Lee] [ZEPPELIN-30] interpreter.json should be saved in $ZEPPELIN_CONF_DIR - Changed conf directory from "conf/" to "$ZEPPELIN_CONF_DIR"


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

Branch: refs/heads/master
Commit: d6446d7078012d1e7ff8c0c9c619e339a3c49fcf
Parents: b5c7057
Author: Jongyoul Lee <jo...@gmail.com>
Authored: Mon Jun 15 17:05:35 2015 +0900
Committer: Alexander Bezzubov <bz...@apache.org>
Committed: Wed Jun 17 10:49:12 2015 +0900

----------------------------------------------------------------------
 conf/zeppelin-site.xml.template                 |  8 +++----
 .../zeppelin/conf/ZeppelinConfiguration.java    | 24 +++++++++++++-------
 2 files changed, 20 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/d6446d70/conf/zeppelin-site.xml.template
----------------------------------------------------------------------
diff --git a/conf/zeppelin-site.xml.template b/conf/zeppelin-site.xml.template
index e10c85e..cd72f12 100644
--- a/conf/zeppelin-site.xml.template
+++ b/conf/zeppelin-site.xml.template
@@ -84,8 +84,8 @@
 
 <property>
   <name>zeppelin.ssl.keystore.path</name>
-  <value>conf/keystore</value>
-  <description>Path to keystore relative to Zeppelin home</description>
+  <value>keystore</value>
+  <description>Path to keystore relative to Zeppelin configuration directory</description>
 </property>
 
 <property>
@@ -110,8 +110,8 @@
 
 <property>
   <name>zeppelin.ssl.truststore.path</name>
-  <value>conf/truststore</value>
-  <description>Path to truststore relative to Zeppelin home. Defaults to the keystore path</description>
+  <value>truststore</value>
+  <description>Path to truststore relative to Zeppelin configuration directory. Defaults to the keystore path</description>
 </property>
 
 <property>

http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/d6446d70/zeppelin-zengine/src/main/java/org/apache/zeppelin/conf/ZeppelinConfiguration.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/conf/ZeppelinConfiguration.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/conf/ZeppelinConfiguration.java
index 78a463c..95d77b7 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/conf/ZeppelinConfiguration.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/conf/ZeppelinConfiguration.java
@@ -281,7 +281,10 @@ public class ZeppelinConfiguration extends XMLConfiguration {
   }
 
   public String getKeyStorePath() {
-    return getRelativeDir(ConfVars.ZEPPELIN_SSL_KEYSTORE_PATH);
+    return getRelativeDir(
+        String.format("%s/%s",
+            getConfDir(),
+            getString(ConfVars.ZEPPELIN_SSL_KEYSTORE_PATH)));
   }
 
   public String getKeyStoreType() {
@@ -337,7 +340,7 @@ public class ZeppelinConfiguration extends XMLConfiguration {
   }
 
   public String getInterpreterSettingPath() {
-    return getRelativeDir("conf/interpreter.json");
+    return getRelativeDir(String.format("%s/interpreter.json", getConfDir()));
   }
 
   public String getInterpreterRemoteRunnerPath() {
@@ -356,6 +359,10 @@ public class ZeppelinConfiguration extends XMLConfiguration {
     }
   }
 
+  public String getConfDir() {
+    return getString(ConfVars.ZEPPELIN_CONF_DIR);
+  }
+
 
   /**
    * Wrapper class.
@@ -372,7 +379,7 @@ public class ZeppelinConfiguration extends XMLConfiguration {
     ZEPPELIN_WEBSOCKET_PORT("zeppelin.websocket.port", -1),
     ZEPPELIN_SSL("zeppelin.ssl", false),
     ZEPPELIN_SSL_CLIENT_AUTH("zeppelin.ssl.client.auth", false),
-    ZEPPELIN_SSL_KEYSTORE_PATH("zeppelin.ssl.keystore.path", "conf/keystore"),
+    ZEPPELIN_SSL_KEYSTORE_PATH("zeppelin.ssl.keystore.path", "keystore"),
     ZEPPELIN_SSL_KEYSTORE_TYPE("zeppelin.ssl.keystore.type", "JKS"),
     ZEPPELIN_SSL_KEYSTORE_PASSWORD("zeppelin.ssl.keystore.password", ""),
     ZEPPELIN_SSL_KEY_MANAGER_PASSWORD("zeppelin.ssl.key.manager.password", null),
@@ -391,13 +398,14 @@ public class ZeppelinConfiguration extends XMLConfiguration {
         + "org.apache.zeppelin.hive.HiveInterpreter,"
         + "org.apache.zeppelin.tajo.TajoInterpreter,"
         + "org.apache.zeppelin.flink.FlinkInterpreter"),
-        ZEPPELIN_INTERPRETER_DIR("zeppelin.interpreter.dir", "interpreter"),
-        ZEPPELIN_ENCODING("zeppelin.encoding", "UTF-8"),
-        ZEPPELIN_NOTEBOOK_DIR("zeppelin.notebook.dir", "notebook"),
-        ZEPPELIN_NOTEBOOK_STORAGE("zeppelin.notebook.storage", VFSNotebookRepo.class.getName()),
+    ZEPPELIN_INTERPRETER_DIR("zeppelin.interpreter.dir", "interpreter"),
+    ZEPPELIN_ENCODING("zeppelin.encoding", "UTF-8"),
+    ZEPPELIN_NOTEBOOK_DIR("zeppelin.notebook.dir", "notebook"),
+    ZEPPELIN_NOTEBOOK_STORAGE("zeppelin.notebook.storage", VFSNotebookRepo.class.getName()),
     ZEPPELIN_INTERPRETER_REMOTE_RUNNER("zeppelin.interpreter.remoterunner", "bin/interpreter.sh"),
     // Decide when new note is created, interpreter settings will be binded automatically or not.
-    ZEPPELIN_NOTEBOOK_AUTO_INTERPRETER_BINDING("zeppelin.notebook.autoInterpreterBinding", true);
+    ZEPPELIN_NOTEBOOK_AUTO_INTERPRETER_BINDING("zeppelin.notebook.autoInterpreterBinding", true),
+    ZEPPELIN_CONF_DIR("zeppelin.conf.dir", "conf");
 
     private String varName;
     @SuppressWarnings("rawtypes")