Repository: zeppelin Updated Branches: refs/heads/master fc9d542b7 -> a424f5c65
[MINOR][Code Refactoring] Configuration name change for keytab and principal used for FileSystemNotebookRepo ### What is this PR for? Trivial change for configuration name change. ### What type of PR is it? [Refactoring] ### Todos * [ ] - Task ### What is the Jira issue? * No jira created ### How should this be tested? * First time? Setup Travis CI as described on https://zeppelin.apache.org/contribution/contributions.html#continuous-integration * Strongly recommended: add automated unit tests for any new or changed behavior * Outline any manual steps to test the PR here. ### 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 <zjf...@apache.org> Closes #2620 from zjffdu/minor_refactoring and squashes the following commits: c68ce76 [Jeff Zhang] [MINOR][Code Refactoring] Configuration name change for keytab and principal used for FileSystemNotebookRepo Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/a424f5c6 Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/a424f5c6 Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/a424f5c6 Branch: refs/heads/master Commit: a424f5c655623c8128824f95a673ad7cb06d09a7 Parents: fc9d542 Author: Jeff Zhang <zjf...@apache.org> Authored: Wed Oct 11 15:54:59 2017 +0800 Committer: Jeff Zhang <zjf...@apache.org> Committed: Wed Oct 11 20:41:21 2017 +0800 ---------------------------------------------------------------------- conf/zeppelin-site.xml.template | 4 ++-- docs/setup/storage/storage.md | 2 +- .../java/org/apache/zeppelin/conf/ZeppelinConfiguration.java | 4 ++-- .../apache/zeppelin/notebook/repo/FileSystemNotebookRepo.java | 7 ++++--- 4 files changed, 9 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/zeppelin/blob/a424f5c6/conf/zeppelin-site.xml.template ---------------------------------------------------------------------- diff --git a/conf/zeppelin-site.xml.template b/conf/zeppelin-site.xml.template index f1bfb61..b25ba19 100755 --- a/conf/zeppelin-site.xml.template +++ b/conf/zeppelin-site.xml.template @@ -181,13 +181,13 @@ </property> <property> - <name>zeppelin.hdfs.keytab</name> + <name>zeppelin.server.kerberos.keytab</name> <value></value> <description>keytab for accessing kerberized hdfs</description> </property> <property> - <name>zeppelin.hdfs.principal</name> + <name>zeppelin.server.kerberos.principal</name> <value></value> <description>principal for accessing kerberized hdfs</description> </property> http://git-wip-us.apache.org/repos/asf/zeppelin/blob/a424f5c6/docs/setup/storage/storage.md ---------------------------------------------------------------------- diff --git a/docs/setup/storage/storage.md b/docs/setup/storage/storage.md index 0b65f91..f6b8b5c 100644 --- a/docs/setup/storage/storage.md +++ b/docs/setup/storage/storage.md @@ -57,7 +57,7 @@ To enable versioning for all your local notebooks though a standard Git reposito ## Notebook Storage in hadoop compatible file system repository <a name="Hdfs"></a> Notes may be stored in hadoop compatible file system such as hdfs, so that multiple Zeppelin instances can share the same notes. It supports all the versions of hadoop 2.x. If you use `FileSystemNotebookRepo`, then `zeppelin.notebook.dir` is the path on the hadoop compatible file system. And you need to specify `HADOOP_CONF_DIR` in `zeppelin-env.sh` so that zeppelin can find the right hadoop configuration files. -If your hadoop cluster is kerberized, then you need to specify `zeppelin.hdfs.keytab` and `zeppelin.hdfs.principal` +If your hadoop cluster is kerberized, then you need to specify `zeppelin.server.kerberos.keytab` and `zeppelin.server.kerberos.principal` ``` <property> http://git-wip-us.apache.org/repos/asf/zeppelin/blob/a424f5c6/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 f329d47..3a82bc5 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 @@ -693,8 +693,8 @@ public class ZeppelinConfiguration extends XMLConfiguration { ZEPPELIN_SERVER_STRICT_TRANSPORT("zeppelin.server.strict.transport", "max-age=631138519"), ZEPPELIN_SERVER_X_XSS_PROTECTION("zeppelin.server.xxss.protection", "1"), - ZEPPELIN_HDFS_KEYTAB("zeppelin.hdfs.keytab", ""), - ZEPPELIN_HDFS_PRINCIPAL("zeppelin.hdfs.principal", ""), + ZEPPELIN_SERVER_KERBEROS_KEYTAB("zeppelin.server.kerberos.keytab", ""), + ZEPPELIN_SERVER_KERBEROS_PRINCIPAL("zeppelin.server.kerberos.principal", ""), ZEPPELIN_INTERPRETER_CALLBACK_PORTRANGE("zeppelin.interpreter.callback.portRange", ":"); http://git-wip-us.apache.org/repos/asf/zeppelin/blob/a424f5c6/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/FileSystemNotebookRepo.java ---------------------------------------------------------------------- diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/FileSystemNotebookRepo.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/FileSystemNotebookRepo.java index 150ac26..ba858e6 100644 --- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/FileSystemNotebookRepo.java +++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/FileSystemNotebookRepo.java @@ -20,7 +20,6 @@ import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.net.URISyntaxException; -import java.security.PrivilegedAction; import java.security.PrivilegedExceptionAction; import java.util.ArrayList; import java.util.List; @@ -50,8 +49,10 @@ public class FileSystemNotebookRepo implements NotebookRepo { this.isSecurityEnabled = UserGroupInformation.isSecurityEnabled(); if (isSecurityEnabled) { - String keytab = zConf.getString(ZeppelinConfiguration.ConfVars.ZEPPELIN_HDFS_KEYTAB); - String principal = zConf.getString(ZeppelinConfiguration.ConfVars.ZEPPELIN_HDFS_PRINCIPAL); + String keytab = zConf.getString( + ZeppelinConfiguration.ConfVars.ZEPPELIN_SERVER_KERBEROS_KEYTAB); + String principal = zConf.getString( + ZeppelinConfiguration.ConfVars.ZEPPELIN_SERVER_KERBEROS_PRINCIPAL); if (StringUtils.isBlank(keytab) || StringUtils.isBlank(principal)) { throw new IOException("keytab and principal can not be empty, keytab: " + keytab + ", principal: " + principal);