Repository: zeppelin
Updated Branches:
  refs/heads/master 5d7151097 -> 7f16fc217


ZEPPELIN-2943 Streaming output will be closed in 30 seconds for 
IPythonInterpreter

### What is this PR for?
Straightforward fix to set the timeout as 100 years so that spark streaming app 
won't be stopped unless 100 years later.

### What type of PR is it?
[Bug Fix]

### Todos
* [ ] - Task

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

### How should this be tested?
Tested manually, see screenshot.

### Screenshots (if appropriate)
![streaming](https://user-images.githubusercontent.com/164491/30589783-789a99c6-9d01-11e7-88a3-c36d49321541.gif)

### 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 #2593 from zjffdu/ZEPPELIN-2943 and squashes the following commits:

9144409 [Jeff Zhang] Fix a test bug
0923b3c [Jeff Zhang] ZEPPELIN-2943 Streaming output will be closed in 30 
seconds for IPythonInterpreter


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

Branch: refs/heads/master
Commit: 7f16fc217732b486f5df041f0cfa398d5650a500
Parents: 5d71510
Author: Jeff Zhang <zjf...@apache.org>
Authored: Wed Sep 20 06:55:01 2017 +0800
Committer: Jeff Zhang <zjf...@apache.org>
Committed: Wed Sep 20 08:12:07 2017 +0800

----------------------------------------------------------------------
 python/src/main/resources/grpc/python/ipython_server.py         | 5 +++--
 .../apache/zeppelin/interpreter/AbstractInterpreterTest.java    | 1 +
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7f16fc21/python/src/main/resources/grpc/python/ipython_server.py
----------------------------------------------------------------------
diff --git a/python/src/main/resources/grpc/python/ipython_server.py 
b/python/src/main/resources/grpc/python/ipython_server.py
index 1d92766..98fa616 100644
--- a/python/src/main/resources/grpc/python/ipython_server.py
+++ b/python/src/main/resources/grpc/python/ipython_server.py
@@ -35,7 +35,7 @@ else:
     import queue as queue
 
 
-TIMEOUT = 30
+TIMEOUT = 60*60*24*365*100  # 100 years
 
 class IPython(ipython_pb2_grpc.IPythonServicer):
 
@@ -50,7 +50,8 @@ class IPython(ipython_pb2_grpc.IPythonServicer):
         self._status = ipython_pb2.RUNNING
 
     def execute(self, request, context):
-        print("execute code: " + request.code)
+        print("execute code:\n")
+        print(request.code)
         sys.stdout.flush()
         stdout_queue = queue.Queue(maxsize = 10)
         stderr_queue = queue.Queue(maxsize = 10)

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7f16fc21/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/AbstractInterpreterTest.java
----------------------------------------------------------------------
diff --git 
a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/AbstractInterpreterTest.java
 
b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/AbstractInterpreterTest.java
index 9ab2137..ad3dd99 100644
--- 
a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/AbstractInterpreterTest.java
+++ 
b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/AbstractInterpreterTest.java
@@ -56,6 +56,7 @@ public abstract class AbstractInterpreterTest {
     
System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_NOTEBOOK_DIR.getVarName(),
 notebookDir.getAbsolutePath());
 
     conf = new ZeppelinConfiguration();
+    
conf.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETER_GROUP_ORDER.getVarName(),
 "test,mock1,mock2,mock_resource_pool");
     interpreterSettingManager = new InterpreterSettingManager(conf,
         mock(AngularObjectRegistryListener.class), 
mock(RemoteInterpreterProcessListener.class), 
mock(ApplicationEventListener.class));
     interpreterFactory = new InterpreterFactory(interpreterSettingManager);

Reply via email to