zeppelin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zjf...@apache.org
Subject zeppelin git commit: [zeppelin-3639] Add Ipython interpreter prerequisite check for protobuf
Date Thu, 02 Aug 2018 07:40:50 GMT
Repository: zeppelin
Updated Branches:
  refs/heads/branch-0.8 50655a962 -> e17ff9da1

[zeppelin-3639] Add Ipython interpreter prerequisite check for protobuf

This is to protobuf prerequisite check when starting ipython kernel. This is required since
from grpcio 1.12.0 it's  independent from protobuf

[ Improvement ]

* [x] - add protobuf prerequisite check
* [x] - add to ipython docs


1. remove grpcio and protobuf
2. install latest grpcio and try to run ipython interpreter - should fail
3. then install protobuf and try again - should work

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

Author: Khalid Huseynov <khalidhnv@gmail.com>

Closes #3084 from khalidhuseynov/fix/ZEPPELIN-3639 and squashes the following commits:

066e061d2 [Khalid Huseynov] fix ipython documentation
58c06898b [Khalid Huseynov] add protobuf prerequsite check

(cherry picked from commit c95d89684132f95e4b1d7e3beecc3af6d1a712b2)
Signed-off-by: Jeff Zhang <zjffdu@apache.org>

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

Branch: refs/heads/branch-0.8
Commit: e17ff9da1de7a293f4c007bdfdd2614b75f2a320
Parents: 50655a9
Author: Khalid Huseynov <khalidhnv@gmail.com>
Authored: Thu Jul 19 16:03:58 2018 +0900
Committer: Jeff Zhang <zjffdu@apache.org>
Committed: Thu Aug 2 15:40:41 2018 +0800

 docs/interpreter/python.md                                     | 3 ++-
 .../java/org/apache/zeppelin/python/IPythonInterpreter.java    | 6 +++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/docs/interpreter/python.md b/docs/interpreter/python.md
index 94bffd0..82280ac 100644
--- a/docs/interpreter/python.md
+++ b/docs/interpreter/python.md
@@ -258,8 +258,9 @@ IPython is more powerful than the default python interpreter with extra
     - Jupyter `pip install jupyter`
     - grpcio `pip install grpcio`
+    - protobuf `pip install protobuf`
-If you already install anaconda, then you just need to install `grpcio` as Jupyter is already
included in anaconda.
+If you already install anaconda, then you just need to install `grpcio` as Jupyter is already
included in anaconda. For grpcio version >= 1.12.0 you'll also need to install protobuf
 In addition to all basic functions of the python interpreter, you can use all the IPython
advanced features as you use it in Jupyter Notebook.

diff --git a/python/src/main/java/org/apache/zeppelin/python/IPythonInterpreter.java b/python/src/main/java/org/apache/zeppelin/python/IPythonInterpreter.java
index b873f7e..b71f5c2 100644
--- a/python/src/main/java/org/apache/zeppelin/python/IPythonInterpreter.java
+++ b/python/src/main/java/org/apache/zeppelin/python/IPythonInterpreter.java
@@ -192,7 +192,11 @@ public class IPythonInterpreter extends Interpreter implements ExecuteResultHand
       if (!freezeOutput.contains("grpcio=")) {
         return "grpcio is not installed";
-      LOGGER.info("IPython prerequisite is meet");
+      if (!freezeOutput.contains("protobuf=")) {
+        return "protobuf is not installed";
+      }
+      LOGGER.info("IPython prerequisite is met");
     } catch (Exception e) {
       LOGGER.warn("Fail to checkIPythonPrerequisite", e);
       return "Fail to checkIPythonPrerequisite: " + ExceptionUtils.getStackTrace(e);

View raw message