This is an automated email from the ASF dual-hosted git repository. zjffdu pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/zeppelin.git
The following commit(s) were added to refs/heads/master by this push: new 79899a0 [ZEPPELIN-4312] enable livy to run as remote interpreter in docker 79899a0 is described below commit 79899a0c55339356dca92cfcc662d5c6d0d6ee2d Author: Michal Vince <vince.mic...@gmail.com> AuthorDate: Wed Oct 2 09:14:59 2019 +0200 [ZEPPELIN-4312] enable livy to run as remote interpreter in docker ### What is this PR for? This pull request enables livy interpreter to run as remote interpreter in docker. This is (hopefully) improvement of liuxunorg `s work on running remote interpreters in docker ### What type of PR is it? [Improvement] ### Todos * [ ] - Task ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-4312 ### 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: Michal Vince <vince.mic...@gmail.com> Closes #3430 from zlosim/ZEPPELIN-4312 and squashes the following commits: d8f63ce5c [Michal Vince] added todo comment 5bef257f9 [Michal Vince] enable livy to run as remote interpreter in docker --- .../interpreter/launcher/DockerInterpreterProcess.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/zeppelin-plugins/launcher/docker/src/main/java/org/apache/zeppelin/interpreter/launcher/DockerInterpreterProcess.java b/zeppelin-plugins/launcher/docker/src/main/java/org/apache/zeppelin/interpreter/launcher/DockerInterpreterProcess.java index 9802f81..779c42b 100644 --- a/zeppelin-plugins/launcher/docker/src/main/java/org/apache/zeppelin/interpreter/launcher/DockerInterpreterProcess.java +++ b/zeppelin-plugins/launcher/docker/src/main/java/org/apache/zeppelin/interpreter/launcher/DockerInterpreterProcess.java @@ -208,6 +208,7 @@ public class DockerInterpreterProcess extends RemoteInterpreterProcess { // Create container with exposed ports final ContainerConfig containerConfig = ContainerConfig.builder() .hostConfig(hostConfig) + .hostname(this.zeppelinServiceHost) .image(containerImage) .workingDir("/") .env(listEnv) @@ -453,6 +454,7 @@ public class DockerInterpreterProcess extends RemoteInterpreterProcess { LOGGER.warn("{} file not found, Did not upload the krb5.conf to the container!", krb5conf); } + // TODO: Interpreter specific settings, we should consider general property or some other more elegant solution // 3) Get the keytab file in each interpreter properties // Upload Keytab file to container, Keep the same directory as local host // 3.1) shell interpreter properties keytab file @@ -466,14 +468,18 @@ public class DockerInterpreterProcess extends RemoteInterpreterProcess { intpKeytab = properties.getProperty("submarine.hadoop.keytab", ""); } if (StringUtils.isBlank(intpKeytab)) { - // 3.4) jdbc interpreter properties keytab file + // 3.4) livy interpreter properties keytab file + intpKeytab = properties.getProperty("zeppelin.livy.keytab", ""); + } + if (StringUtils.isBlank(intpKeytab)) { + // 3.5) jdbc interpreter properties keytab file intpKeytab = properties.getProperty("zeppelin.jdbc.keytab.location", ""); } if (!StringUtils.isBlank(intpKeytab) && !copyFiles.containsKey(intpKeytab)) { LOGGER.info("intpKeytab : {}", intpKeytab); copyFiles.put(intpKeytab, intpKeytab); } - // 3.5) zeppelin server keytab file + // 3.6) zeppelin server keytab file String zeppelinServerKeytab = zconf.getString(ZEPPELIN_SERVER_KERBEROS_KEYTAB); if (!StringUtils.isBlank(zeppelinServerKeytab) && !copyFiles.containsKey(zeppelinServerKeytab)) {