This is an automated email from the ASF dual-hosted git repository.
liuxun 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 6b39875 [ZEPPELIN-4328] Fixed buildEnvFromProperties() access limit
causes the DockerInterpreterLauncher exception
6b39875 is described below
commit 6b398757a5f5b8763725475090567e1525e0b2f4
Author: Xun Liu <[email protected]>
AuthorDate: Sat Sep 14 20:44:50 2019 +0800
[ZEPPELIN-4328] Fixed buildEnvFromProperties() access limit causes the
DockerInterpreterLauncher exception
### What is this PR for?
I found DockerInterpreterLauncher can't run.
Because DockerInterpreterLauncher needs to support Standard Interpreter and
spark interpreter,
Rely on StandardInterpreterLauncher and SparkInterpreterLauncher.
However, the StandardInterpreterLauncher and SparkInterpreterLauncher are
moved to the zeppelin-zengine module in
[ZEPPELIN-4227](https://issues.apache.org/jira/browse/ZEPPELIN-4227), and the
DockerInterpreterLauncher is dynamically loaded by the classloader, so the
DockerInterpreterLauncher cannot call functions in the
StandardInterpreterLauncher and SparkInterpreterLauncher in different
classloads.
```
ERROR [2019-09-12 17:54:55,622] ({SchedulerFactory2} Job.java[run]:174) -
Job failed
java.lang.IllegalAccessError: tried to access method
org.apache.zeppelin.interpreter.launcher.StandardInterpreterLauncher.buildEnvFromProperties(Lorg/apache/zeppelin/interpreter/launcher/InterpreterLaunchContext;)Ljava/util/Map;
from class org.apache.zeppelin.interpreter.launcher.DockerInterpreterLauncher
at
org.apache.zeppelin.interpreter.launcher.DockerInterpreterLauncher.launch(DockerInterpreterLauncher.java:62)
at
org.apache.zeppelin.interpreter.InterpreterSetting.createInterpreterProcess(InterpreterSetting.java:764)
at
org.apache.zeppelin.interpreter.ManagedInterpreterGroup.getOrCreateInterpreterProcess(ManagedInterpreterGroup.java:63)
at
org.apache.zeppelin.interpreter.remote.RemoteInterpreter.getOrCreateInterpreterProcess(RemoteInterpreter.java:110)
at
org.apache.zeppelin.interpreter.remote.RemoteInterpreter.internal_create(RemoteInterpreter.java:163)
at
org.apache.zeppelin.interpreter.remote.RemoteInterpreter.open(RemoteInterpreter.java:131)
at
org.apache.zeppelin.interpreter.remote.RemoteInterpreter.getFormType(RemoteInterpreter.java:298)
at org.apache.zeppelin.notebook.Paragraph.jobRun(Paragraph.java:467)
at org.apache.zeppelin.notebook.Paragraph.jobRun(Paragraph.java:77)
at org.apache.zeppelin.scheduler.Job.run(Job.java:172)
at
org.apache.zeppelin.scheduler.AbstractScheduler.runJob(AbstractScheduler.java:121)
at
org.apache.zeppelin.scheduler.RemoteScheduler$JobRunner.run(RemoteScheduler.java:187)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
ERROR [2019-09-12 17:54:55,631] ({SchedulerFactory2}
NotebookServer.java[onStatusChange]:1798) - Error
java.lang.IllegalAccessError: tried to access method
org.apache.zeppelin.interpreter.launcher.StandardInterpreterLauncher.buildEnvFromProperties(Lorg/apache/zeppelin/interpreter/launcher/InterpreterLaunchContext;)Ljava/util/Map;
from class org.apache.zeppelin.interpreter.launcher.DockerInterpreterLauncher
at
org.apache.zeppelin.interpreter.launcher.DockerInterpreterLauncher.launch(DockerInterpreterLauncher.java:62)
at
org.apache.zeppelin.interpreter.InterpreterSetting.createInterpreterProcess(InterpreterSetting.java:764)
at
org.apache.zeppelin.interpreter.ManagedInterpreterGroup.getOrCreateInterpreterProcess(ManagedInterpreterGroup.java:63)
at
org.apache.zeppelin.interpreter.remote.RemoteInterpreter.getOrCreateInterpreterProcess(RemoteInterpreter.java:110)
at
org.apache.zeppelin.interpreter.remote.RemoteInterpreter.internal_create(RemoteInterpreter.java:163)
at
org.apache.zeppelin.interpreter.remote.RemoteInterpreter.open(RemoteInterpreter.java:131)
at
org.apache.zeppelin.interpreter.remote.RemoteInterpreter.getFormType(RemoteInterpreter.java:298)
at org.apache.zeppelin.notebook.Paragraph.jobRun(Paragraph.java:467)
at org.apache.zeppelin.notebook.Paragraph.jobRun(Paragraph.java:77)
at org.apache.zeppelin.scheduler.Job.run(Job.java:172)
at
org.apache.zeppelin.scheduler.AbstractScheduler.runJob(AbstractScheduler.java:121)
at
org.apache.zeppelin.scheduler.RemoteScheduler$JobRunner.run(RemoteScheduler.java:187)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
WARN [2019-09-12 17:54:55,631] ({SchedulerFactory2}
NotebookServer.java[onStatusChange]:1806) - Job
paragraph_1562119234978_370545724 is finished, status: ERROR, exception:
java.lang.IllegalAccessError: tried to access method
org.apache.zeppelin.interpreter.launcher.StandardInterpreterLauncher.buildEnvFromProperties(Lorg/apache/zeppelin/interpreter/launcher/InterpreterLaunchContext;)Ljava/util/Map;
from class org.apache.zeppelin.interpreter.launcher.DockerInterpreterLauncher,
result: [...]
INFO [2019-09-12 17:54:55,651] ({SchedulerFactory2}
AbstractScheduler.java[runJob]:142) - Job paragraph_1562119234978_370545724
finished by scheduler RemoteInterpreter-angular-shared_process-shared_session
```
### What type of PR is it?
Bug Fix
### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-4328
### How should this be tested?
[CI Pass](https://travis-ci.org/liuxunorg/zeppelin/builds/584951933)
### 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: Xun Liu <[email protected]>
Closes #3444 from liuxunorg/ZEPPELIN-4328 and squashes the following
commits:
a337f8d92 [Xun Liu] [ZEPPELIN-4328] Fixed buildEnvFromProperties() access
limit causes the DockerInterpreterLauncher exception
---
.../apache/zeppelin/interpreter/launcher/SparkInterpreterLauncher.java | 2 +-
.../zeppelin/interpreter/launcher/StandardInterpreterLauncher.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git
a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/launcher/SparkInterpreterLauncher.java
b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/launcher/SparkInterpreterLauncher.java
index ea883a2..d02d82d 100644
---
a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/launcher/SparkInterpreterLauncher.java
+++
b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/launcher/SparkInterpreterLauncher.java
@@ -58,7 +58,7 @@ public class SparkInterpreterLauncher extends
StandardInterpreterLauncher {
}
@Override
- protected Map<String, String>
buildEnvFromProperties(InterpreterLaunchContext context) throws IOException {
+ public Map<String, String> buildEnvFromProperties(InterpreterLaunchContext
context) throws IOException {
Map<String, String> env = super.buildEnvFromProperties(context);
Properties sparkProperties = new Properties();
String sparkMaster = getSparkMaster(properties);
diff --git
a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/launcher/StandardInterpreterLauncher.java
b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/launcher/StandardInterpreterLauncher.java
index df9aa31..fc37918 100644
---
a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/launcher/StandardInterpreterLauncher.java
+++
b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/launcher/StandardInterpreterLauncher.java
@@ -88,7 +88,7 @@ public class StandardInterpreterLauncher extends
InterpreterLauncher {
}
}
- protected Map<String, String>
buildEnvFromProperties(InterpreterLaunchContext context) throws IOException {
+ public Map<String, String> buildEnvFromProperties(InterpreterLaunchContext
context) throws IOException {
Map<String, String> env = new HashMap<>();
for (Object key : context.getProperties().keySet()) {
if (RemoteInterpreterUtils.isEnvString((String) key)) {