Skip to content

Commit 91f6171

Browse files
ODP-2039: Set ZeppelinConf if not set
(cherry picked from commit 671e3b0) ODP-2039: Read kerbros config from zeppelin-site.xml (if possible) (cherry picked from commit 2519bdc)
1 parent 81b3980 commit 91f6171

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

zeppelin-interpreter/src/main/java/org/apache/zeppelin/conf/ZeppelinConfiguration.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ private void loadXMLConfig(@Nullable String filename) throws ConfigurationExcept
9898
if (StringUtils.isBlank(filename)) {
9999
filename = ZEPPELIN_SITE_XML;
100100
}
101+
if (!this.properties.isEmpty()) {
102+
return;
103+
}
101104
List<FileLocationStrategy> subs = Arrays.asList(
102105
new ZeppelinLocationStrategy(),
103106
new ClasspathLocationStrategy());

zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterOption.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ public void setUserImpersonate(boolean userImpersonate) {
9292
}
9393

9494
public InterpreterOption() {
95+
this.zConf = ZeppelinConfiguration.load();
9596
}
9697

9798
public InterpreterOption(String perUser, String perNote) {

zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/FileSystemStorage.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,9 @@ public class FileSystemStorage {
5757
// your ticket expired.
5858
static {
5959
if (UserGroupInformation.isSecurityEnabled()) {
60-
String keytab = ZeppelinConfiguration.getStaticString(
61-
ZeppelinConfiguration.ConfVars.ZEPPELIN_SERVER_KERBEROS_KEYTAB);
62-
String principal = ZeppelinConfiguration.getStaticString(
63-
ZeppelinConfiguration.ConfVars.ZEPPELIN_SERVER_KERBEROS_PRINCIPAL);
60+
ZeppelinConfiguration conf = ZeppelinConfiguration.load();
61+
String keytab = conf.getString(ZeppelinConfiguration.ConfVars.ZEPPELIN_SERVER_KERBEROS_KEYTAB);
62+
String principal = conf.getString(ZeppelinConfiguration.ConfVars.ZEPPELIN_SERVER_KERBEROS_PRINCIPAL);
6463
if (StringUtils.isBlank(keytab) || StringUtils.isBlank(principal)) {
6564
throw new RuntimeException("keytab and principal can not be empty, keytab: " + keytab
6665
+ ", principal: " + principal);

0 commit comments

Comments
 (0)