zeppelin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject zeppelin git commit: ZEPPELIN-1816. Implement getProgress in SparkRInterpreter
Date Mon, 19 Dec 2016 17:42:25 GMT
Repository: zeppelin
Updated Branches:
  refs/heads/master 7984ada24 -> e230af9cf


ZEPPELIN-1816. Implement getProgress in SparkRInterpreter

### What is this PR for?
Since I add jobGroup in ZEPPELIN-1769, it is easy to implement getProgress as well. It could
be delegated to `SparkInterpreter` in the same session.

### What type of PR is it?
 Improvement | Feature ]

### Todos
* [ ] - Task

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

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

### Screenshots (if appropriate)
![sparkr_progress](https://cloud.githubusercontent.com/assets/164491/21212236/aeadd22e-c2c5-11e6-8a16-ba3f940aee39.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 <zjffdu@apache.org>

Closes #1764 from zjffdu/ZEPPELIN-1816 and squashes the following commits:

20425ea [Jeff Zhang] ZEPPELIN-1816. Implement getProgress in SparkRInterpreter


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

Branch: refs/heads/master
Commit: e230af9cfd9d252696b8014c8a3e32b25158dde1
Parents: 7984ada
Author: Jeff Zhang <zjffdu@apache.org>
Authored: Thu Dec 15 12:53:23 2016 +0800
Committer: Lee moon soo <moon@apache.org>
Committed: Mon Dec 19 09:42:13 2016 -0800

----------------------------------------------------------------------
 .../java/org/apache/zeppelin/spark/SparkRInterpreter.java   | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/e230af9c/spark/src/main/java/org/apache/zeppelin/spark/SparkRInterpreter.java
----------------------------------------------------------------------
diff --git a/spark/src/main/java/org/apache/zeppelin/spark/SparkRInterpreter.java b/spark/src/main/java/org/apache/zeppelin/spark/SparkRInterpreter.java
index f4152a5..ef8e9fc 100644
--- a/spark/src/main/java/org/apache/zeppelin/spark/SparkRInterpreter.java
+++ b/spark/src/main/java/org/apache/zeppelin/spark/SparkRInterpreter.java
@@ -42,6 +42,7 @@ public class SparkRInterpreter extends Interpreter {
   private static final Logger logger = LoggerFactory.getLogger(SparkRInterpreter.class);
 
   private static String renderOptions;
+  private SparkInterpreter sparkInterpreter;
   private ZeppelinR zeppelinR;
   private SparkContext sc;
 
@@ -70,7 +71,7 @@ public class SparkRInterpreter extends Interpreter {
 
     int port = SparkRBackend.port();
 
-    SparkInterpreter sparkInterpreter = getSparkInterpreter();
+    this.sparkInterpreter = getSparkInterpreter();
     this.sc = sparkInterpreter.getSparkContext();
     SparkVersion sparkVersion = new SparkVersion(sc.version());
     ZeppelinRContext.setSparkContext(sc);
@@ -185,7 +186,11 @@ public class SparkRInterpreter extends Interpreter {
 
   @Override
   public int getProgress(InterpreterContext context) {
-    return 0;
+    if (sparkInterpreter != null) {
+      return sparkInterpreter.getProgress(context);
+    } else {
+      return 0;
+    }
   }
 
   @Override


Mime
View raw message