You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by bz...@apache.org on 2016/06/20 01:54:59 UTC

zeppelin git commit: Python: fix for 'run all' paragraphs

Repository: zeppelin
Updated Branches:
  refs/heads/master 70d22d3d0 -> 85ee2ddbc


Python: fix for 'run all' paragraphs

### What is this PR for?
Switch to FIFO scheduler as in current implementation `.interpret()` is not thread-safe and so in parallel one 'Run All' fails some paragraphs with NPE in logs

### What type of PR is it?
Bug Fix | Improvement

### How should this be tested?
'Run All' passes without NPE in logs i.e on this [Zeppelin notebook for python](https://www.zeppelinhub.com/viewer/notebooks/aHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL2J6ei9pbmN1YmF0b3ItemVwcGVsaW4vMTkyZjU3YjZjMGZkMjc4NzgwZDI3NDAzMGY1YmJlOTZlZThkNzdiYi9ub3RlYm9vay8yQlFBMzVDSlovbm90ZS5qc29u)
### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Alexander Bezzubov <bz...@apache.org>

Closes #1033 from bzz/fix/python-run-all and squashes the following commits:

72e9d62 [Alexander Bezzubov] Python: switch to FIFO scheduler


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

Branch: refs/heads/master
Commit: 85ee2ddbcb7d3a4e5839c5bad88870a3d844530c
Parents: 70d22d3
Author: Alexander Bezzubov <bz...@apache.org>
Authored: Fri Jun 17 13:59:50 2016 +0900
Committer: Alexander Bezzubov <bz...@apache.org>
Committed: Mon Jun 20 10:54:36 2016 +0900

----------------------------------------------------------------------
 .../main/java/org/apache/zeppelin/python/PythonInterpreter.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/85ee2ddb/python/src/main/java/org/apache/zeppelin/python/PythonInterpreter.java
----------------------------------------------------------------------
diff --git a/python/src/main/java/org/apache/zeppelin/python/PythonInterpreter.java b/python/src/main/java/org/apache/zeppelin/python/PythonInterpreter.java
index 46dc1b2..b1da981 100644
--- a/python/src/main/java/org/apache/zeppelin/python/PythonInterpreter.java
+++ b/python/src/main/java/org/apache/zeppelin/python/PythonInterpreter.java
@@ -161,8 +161,8 @@ public class PythonInterpreter extends Interpreter {
 
   @Override
   public Scheduler getScheduler() {
-    return SchedulerFactory.singleton().createOrGetParallelScheduler(
-        PythonInterpreter.class.getName() + this.hashCode(), 10);
+    return SchedulerFactory.singleton().createOrGetFIFOScheduler(
+        PythonInterpreter.class.getName() + this.hashCode());
   }
 
   @Override