ZEPPELIN-1197. Should print output directly without invoking function print in pyspark interpreter#1232
Closed
zjffdu wants to merge 2 commits intoapache:masterfrom
Closed
ZEPPELIN-1197. Should print output directly without invoking function print in pyspark interpreter#1232zjffdu wants to merge 2 commits intoapache:masterfrom
zjffdu wants to merge 2 commits intoapache:masterfrom
Conversation
… print in pyspark interpreter
Member
|
Thanks @zjffdu for great improvement. I have tested bit and i could see some inconsistent behavior. Is it expected result? |
Contributor
Author
|
@Leemoonsoo Thanks for the careful checking. I compare it with jupyter, only the second case is different. Let me investigate how to fix it. |
Contributor
Author
Member
|
Thanks you for explanation. LGTM |
Member
|
Merge into master if there're no more discussions. |
Member
|
@zjffdu @bzz How about bring this change to python interpreter as well? |
Contributor
Author
|
Sure, let me do it for python interpreter as well. |
Contributor
Author
|
Just take a look at python interpreter, it uses a different way with pyspark interpreter. Might need to take more time to investigate that. |
PhilippGrulich
pushed a commit
to SWC-SENSE/zeppelin
that referenced
this pull request
Aug 8, 2016
… print in pyspark interpreter ### What is this PR for? For now, user need to invoke print to make the output displayed on the notebook. This behavior is not natural and consistent with other notebooks. This PR is to make the pyspark interpreter in zeppelin behave the same as other notebook. 2 main changes * use single mode to compile the last statement, so that the evaluation result of the last statement will be printed to stdout, this is consistent with other notebooks (like jupyter) * Make SparkOutputStream extends LogOutputStream so that we can see the output of inner process (Python/R), it is helpful for diagnosing. ### What type of PR is it? [Bug Fix] ### What is the Jira issue? * https://issues.apache.org/jira/browse/ZEPPELIN-1197 ### How should this be tested? Tested it manually. Input the following text in pyspark paragraph, ``` 1+1 sc.version ``` And get the following output ``` u'1.6.1' ``` ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? User don't need to call print explicitly. * Does this needs documentation? Yes Author: Jeff Zhang <zjffdu@apache.org> Closes apache#1232 from zjffdu/ZEPPELIN-1197 and squashes the following commits: 3771245 [Jeff Zhang] fix and add test 10182e6 [Jeff Zhang] ZEPPELIN-1197. Should print output directly without invoking function print in pyspark interpreter
1 task
asfgit
pushed a commit
that referenced
this pull request
Aug 10, 2016
… print in pyspark interpreter ### What is this PR for? For now, user need to invoke print to make the output displayed on the notebook. This behavior is not natural and consistent with other notebooks. This PR is to make the pyspark interpreter in zeppelin behave the same as other notebook. 2 main changes * use single mode to compile the last statement, so that the evaluation result of the last statement will be printed to stdout, this is consistent with other notebooks (like jupyter) * Make SparkOutputStream extends LogOutputStream so that we can see the output of inner process (Python/R), it is helpful for diagnosing. ### What type of PR is it? [Bug Fix] ### What is the Jira issue? * https://issues.apache.org/jira/browse/ZEPPELIN-1197 ### How should this be tested? Tested it manually. Input the following text in pyspark paragraph, ``` 1+1 sc.version ``` And get the following output ``` u'1.6.1' ``` ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? User don't need to call print explicitly. * Does this needs documentation? Yes Author: Jeff Zhang <zjffdu@apache.org> Closes #1232 from zjffdu/ZEPPELIN-1197 and squashes the following commits: 3771245 [Jeff Zhang] fix and add test 10182e6 [Jeff Zhang] ZEPPELIN-1197. Should print output directly without invoking function print in pyspark interpreter (cherry picked from commit b885f43) Signed-off-by: Mina Lee <minalee@apache.org>
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


What is this PR for?
For now, user need to invoke print to make the output displayed on the notebook. This behavior is not natural and consistent with other notebooks. This PR is to make the pyspark interpreter in zeppelin behave the same as other notebook. 2 main changes
What type of PR is it?
[Bug Fix]
What is the Jira issue?
How should this be tested?
Tested it manually. Input the following text in pyspark paragraph,
And get the following output
Questions: