You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by ah...@apache.org on 2017/01/23 03:00:13 UTC

zeppelin git commit: [ZEPPELIN-1994] bugfix of streaming output.

Repository: zeppelin
Updated Branches:
  refs/heads/master 7941d3751 -> 1a1fbc423


[ZEPPELIN-1994] bugfix of streaming output.

### What is this PR for?
If you run the following code, then streaming output doesn't work properly from the second run.
```
%spark.pyspark
import time
print("1")
time.sleep(2)
print("2")
time.sleep(2)
print("3")
time.sleep(2)
print("4")
```
This problem comes from the order of `paragraph update` event timing and `paragraph update-append` event timing is incorrect.
and This PR will fix also https://github.com/apache/zeppelin/pull/1833 too.

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

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

### How should this be tested?
- run several times pyspark interpreter with above code.

### Screenshots (if appropriate)
- before
![2017-01-21 00_55_25](https://cloud.githubusercontent.com/assets/3348133/22173437/bfa48e64-df77-11e6-9625-ab44dedee395.gif)

- after
![2017-01-21 00_59_12](https://cloud.githubusercontent.com/assets/3348133/22173438/c21820ac-df77-11e6-87dc-07970fca13ca.gif)

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

Author: astroshim <hs...@zepl.com>

Closes #1927 from astroshim/ZEPPELIN-1994 and squashes the following commits:

c7baa59 [astroshim] fix streaming output problem


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

Branch: refs/heads/master
Commit: 1a1fbc423bc2631000e0ecad2e792efc377a4fd5
Parents: 7941d37
Author: astroshim <hs...@zepl.com>
Authored: Sat Jan 21 01:06:52 2017 -0800
Committer: ahyoungryu <ah...@apache.org>
Committed: Mon Jan 23 11:59:59 2017 +0900

----------------------------------------------------------------------
 zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/1a1fbc42/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
index 5dbe1a0..228bb77 100644
--- a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
+++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
@@ -1040,7 +1040,9 @@ function ParagraphCtrl($scope, $rootScope, $route, $window, $routeParams, $locat
       $scope.paragraph.title = data.paragraph.title;
       $scope.paragraph.lineNumbers = data.paragraph.lineNumbers;
       $scope.paragraph.status = data.paragraph.status;
-      $scope.paragraph.results = data.paragraph.results;
+      if (data.paragraph.status !== 'RUNNING') {
+        $scope.paragraph.results = data.paragraph.results;
+      }
       $scope.paragraph.settings = data.paragraph.settings;
       if ($scope.editor) {
         $scope.editor.setReadOnly($scope.isRunning(data.paragraph));