Repository: zeppelin
Updated Branches:
  refs/heads/master 6f867ceb0 -> c1935e1e8


[ZEPPELIN-1264] [HOTFIX] Fix CI test failure with Failed to create interpreter: 
org.apache.zeppelin.interpreter.remote.mock.MockInterpreterA

### What is this PR for?
Fix CI test failure with error

```
14:05:27,226 ERROR org.apache.zeppelin.interpreter.remote.RemoteInterpreter:237 
- Failed to create interpreter: 
org.apache.zeppelin.interpreter.remote.mock.MockInterpreterA
14:05:27,227 ERROR org.apache.zeppelin.interpreter.remote.RemoteInterpreter:264 
- Failed to initialize interpreter: 
org.apache.zeppelin.interpreter.remote.mock.MockInterpreterA. Remove it from 
interpreterGroup
14:05:27,240  INFO org.apache.zeppelin.scheduler.SchedulerFactory:131 - Job 
jobName1 started by scheduler test
14:05:27,240  INFO org.apache.zeppelin.interpreter.remote.RemoteInterpreter:223 
- Create remote interpreter 
org.apache.zeppelin.interpreter.remote.mock.MockInterpreterA
14:05:27,242 ERROR org.apache.zeppelin.interpreter.remote.RemoteInterpreter:237 
- Failed to create interpreter: 
org.apache.zeppelin.interpreter.remote.mock.MockInterpreterA
14:05:27,243 ERROR org.apache.zeppelin.scheduler.Job:189 - Job failed
org.apache.zeppelin.interpreter.InterpreterException: 
org.apache.thrift.TApplicationException: Internal error processing 
createInterpreter
        at 
org.apache.zeppelin.interpreter.remote.RemoteInterpreter.init(RemoteInterpreter.java:238)
        at 
org.apache.zeppelin.interpreter.remote.RemoteInterpreter.getFormType(RemoteInterpreter.java:383)
        at 
org.apache.zeppelin.interpreter.remote.RemoteInterpreter.interpret(RemoteInterpreter.java:299)
        at 
org.apache.zeppelin.scheduler.RemoteSchedulerTest$2.jobRun(RemoteSchedulerTest.java:210)
        at org.apache.zeppelin.scheduler.Job.run(Job.java:176)
        at 
org.apache.zeppelin.scheduler.RemoteScheduler$JobRunner.run(RemoteScheduler.java:329)
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.thrift.TApplicationException: Internal error processing 
createInterpreter
        at 
org.apache.thrift.TApplicationException.read(TApplicationException.java:111)
        at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:71)
        at 
org.apache.zeppelin.interpreter.thrift.RemoteInterpreterService$Client.recv_createInterpreter(RemoteInterpreterService.java:196)
        at 
org.apache.zeppelin.interpreter.thrift.RemoteInterpreterService$Client.createInterpreter(RemoteInterpreterService.java:180)
        at 
org.apache.zeppelin.interpreter.remote.RemoteInterpreter.init(RemoteInterpreter.java:227)
        ... 12 more
```

Some unittest launches remote interpreter process for the test with some mock 
interpreter implementation. So mock interpreter class in the test should be 
available for interpreter's classpath for the test.

### What type of PR is it?
Hot Fix

### Todos
* [x] - Add necessary test-classes directory in interpreter process's classpath

### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-1264

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no

Author: Lee moon soo <m...@apache.org>

Closes #1261 from Leemoonsoo/ZEPPELIN-1264 and squashes the following commits:

10ad928 [Lee moon soo] Add zeppelin-interpreter/target/test-classes, 
zeppelin-zengine/target/test-classes in classpath of interpreter


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

Branch: refs/heads/master
Commit: c1935e1e8d2346900998ab2994361aa7c03425ca
Parents: 6f867ce
Author: Lee moon soo <m...@apache.org>
Authored: Tue Aug 2 06:38:45 2016 -0500
Committer: Lee moon soo <m...@apache.org>
Committed: Tue Aug 2 16:12:48 2016 -0500

----------------------------------------------------------------------
 bin/interpreter.cmd | 8 ++++++++
 bin/interpreter.sh  | 9 +++++++++
 2 files changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/c1935e1e/bin/interpreter.cmd
----------------------------------------------------------------------
diff --git a/bin/interpreter.cmd b/bin/interpreter.cmd
index 4a501f0..fd6af3d 100644
--- a/bin/interpreter.cmd
+++ b/bin/interpreter.cmd
@@ -46,6 +46,14 @@ if exist 
"%ZEPPELIN_HOME%\zeppelin-interpreter\target\classes" (
     set ZEPPELIN_CLASSPATH=%ZEPPELIN_CLASSPATH%;"!ZEPPELIN_INTERPRETER_JAR!"
 )
 
+REM add test classes for unittest
+if exist "%ZEPPELIN_HOME%\zeppelin-interpreter\target\test-classes" (
+    set 
ZEPPELIN_CLASSPATH=%ZEPPELIN_CLASSPATH%;"%ZEPPELIN_HOME%\zeppelin-interpreter\target\test-classes"
+)
+if exist "%ZEPPELIN_HOME%\zeppelin-zengine\target\test-classes" (
+    set 
ZEPPELIN_CLASSPATH=%ZEPPELIN_CLASSPATH%;"%ZEPPELIN_HOME%\zeppelin-zengine\target\test-classes"
+)
+
 call "%bin%\functions.cmd" ADDJARINDIR 
"%ZEPPELIN_HOME%\zeppelin-interpreter\target\lib"
 call "%bin%\functions.cmd" ADDJARINDIR "%INTERPRETER_DIR%"
 

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/c1935e1e/bin/interpreter.sh
----------------------------------------------------------------------
diff --git a/bin/interpreter.sh b/bin/interpreter.sh
index 38d0f69..a81c8f2 100755
--- a/bin/interpreter.sh
+++ b/bin/interpreter.sh
@@ -63,6 +63,15 @@ else
   ZEPPELIN_INTP_CLASSPATH+=":${ZEPPELIN_INTERPRETER_JAR}"
 fi
 
+# add test classes for unittest
+if [[ -d "${ZEPPELIN_HOME}/zeppelin-interpreter/target/test-classes" ]]; then
+  
ZEPPELIN_INTP_CLASSPATH+=":${ZEPPELIN_HOME}/zeppelin-interpreter/target/test-classes"
+fi
+if [[ -d "${ZEPPELIN_HOME}/zeppelin-zengine/target/test-classes" ]]; then
+  
ZEPPELIN_INTP_CLASSPATH+=":${ZEPPELIN_HOME}/zeppelin-zengine/target/test-classes"
+fi
+
+
 addJarInDirForIntp "${ZEPPELIN_HOME}/zeppelin-interpreter/target/lib"
 addJarInDirForIntp "${INTERPRETER_DIR}"
 

Reply via email to