Repository: zeppelin Updated Branches: refs/heads/branch-0.6 b422bdf2a -> aaed286b2
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 <[email protected]> Closes #1033 from bzz/fix/python-run-all and squashes the following commits: 72e9d62 [Alexander Bezzubov] Python: switch to FIFO scheduler (cherry picked from commit 85ee2ddbcb7d3a4e5839c5bad88870a3d844530c) Signed-off-by: Alexander Bezzubov <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/aaed286b Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/aaed286b Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/aaed286b Branch: refs/heads/branch-0.6 Commit: aaed286b2853d6f793825e5956e5d58783f4dfc9 Parents: b422bdf Author: Alexander Bezzubov <[email protected]> Authored: Fri Jun 17 13:59:50 2016 +0900 Committer: Alexander Bezzubov <[email protected]> Committed: Mon Jun 20 10:55:44 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/aaed286b/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 4f390a6..2b9ec7c 100644 --- a/python/src/main/java/org/apache/zeppelin/python/PythonInterpreter.java +++ b/python/src/main/java/org/apache/zeppelin/python/PythonInterpreter.java @@ -171,8 +171,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
