GitHub user Leemoonsoo opened a pull request:
https://github.com/apache/incubator-zeppelin/pull/611
[ZEPPELIN-554] Streaming interpreter output to front-end
### What is this PR for?
Output from interpreter is displayed after completion of paragraph
execution.
It'll be useful if output can be streamed to front-end during execution.
Previous work #593 injects InterpreterOutput stream object to Interpreter.
This PR is based on #593 and stream the data from InterpreterOutput to
front-end.
This implementation only streams output is %text. Other output type (%html,
%angular, %table) is not streamed to the front end.
While this PR keeps backward compatibility, Interpreter who want to use
this feature will need to modify code to write output into `InterpreterOutput`
instead of return with `InterpreterResult`.
This PR includes modification of SparkInterpreter to use InterpreterOutput.
### What type of PR is it?
Feature
### Todos
### Is there a relevant Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-554
### How should this be tested?
Run such code using Spark interpreter
```
(1 to 10).foreach{ i=>
Thread.sleep(1000)
println("Hello " + i)
}
```
### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/Leemoonsoo/incubator-zeppelin
output_stream_frontend
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-zeppelin/pull/611.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #611
----
commit 544a6f94ade344c24633dd42cb16bc8b864a2a41
Author: Lee moon soo <[email protected]>
Date: 2015-12-22T03:09:31Z
prepend interpreteroutputstream to interpreter result
commit 26abf9c2c9b5e5dd04a768df9e38f8bbb91a487e
Author: Lee moon soo <[email protected]>
Date: 2015-12-22T03:10:53Z
Add InterpreterOutput
commit 7f2517e3d3fe256e870596616b3e47511e799f48
Author: Lee moon soo <[email protected]>
Date: 2015-12-27T20:32:31Z
Implement InterpreterResult.toString
commit 07b2a8e89494e2c2c5ccd933d8db0b43c597a63e
Author: Lee moon soo <[email protected]>
Date: 2015-12-27T20:36:32Z
Update test
commit a2b5384bb6e7ec94a5fa6ec2c63b9106877c6854
Author: Lee moon soo <[email protected]>
Date: 2015-12-27T20:42:06Z
Update test
commit f38e7b377e25b0755104fee74fde987856a1e971
Author: Lee moon soo <[email protected]>
Date: 2016-01-03T16:10:10Z
Update test
commit 0ee6240b6386894bc9e77a20079d2ad144b53cca
Author: Lee moon soo <[email protected]>
Date: 2016-01-04T05:28:17Z
Render text output line by line
commit 1fc14f58b66ca0631a271743a28e5c22fa079f6b
Author: Lee moon soo <[email protected]>
Date: 2016-01-04T15:39:46Z
Add newline listener
commit 3f3dbd9c5b56c78c5657f725feadc2ee60c49d21
Author: Lee moon soo <[email protected]>
Date: 2016-01-05T04:39:17Z
Barely working
commit 47da89f3e4eb4f48e46ca2071c9bdb6f83651044
Author: Lee moon soo <[email protected]>
Date: 2016-01-05T17:52:34Z
update paragraph object after witing to outputstream
commit 93c48eacaa059c096ee661957085a320765e0cbc
Author: Lee moon soo <[email protected]>
Date: 2016-01-06T00:04:28Z
Clear before render text
commit 47b3731945c4a407569aeb2db9ce069a4211f5ec
Author: Lee moon soo <[email protected]>
Date: 2016-01-06T03:13:00Z
Delayed persist
commit f3cd79e0db5714f03919ca1ea0d3e2eb6f0455cc
Author: Lee moon soo <[email protected]>
Date: 2016-01-07T08:28:37Z
Handle update output correctly
commit b403866b83cfafe9de81f4ee5da98c9d8e96e34a
Author: Lee moon soo <[email protected]>
Date: 2016-01-07T08:52:04Z
Connect Spark interpreter Console.out to outputstream
commit efc43a49e0dbd68ac8819f424ea0bfd8745b5efc
Author: Lee moon soo <[email protected]>
Date: 2016-01-07T17:58:40Z
Add test
commit 0b6404f1d6f9c02c038a9a8e256d491fb8c72c1c
Author: Lee moon soo <[email protected]>
Date: 2016-01-07T20:17:20Z
Clear output correctly
commit e64216cb965fb970136a1b99d40a89e20fc43304
Author: Lee moon soo <[email protected]>
Date: 2016-01-08T02:17:17Z
Handle display system directive correctly
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---