You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by zjffdu <gi...@git.apache.org> on 2016/07/27 05:43:08 UTC

[GitHub] zeppelin pull request #1232: ZEPPELIN-1197. Should print output directly wit...

GitHub user zjffdu opened a pull request:

    https://github.com/apache/zeppelin/pull/1232

    ZEPPELIN-1197. Should print output directly without invoking function 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
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/zjffdu/zeppelin ZEPPELIN-1197

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zeppelin/pull/1232.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 #1232
    
----
commit 10182e695014911fd2bbdbbc9e59fc960d9c4b72
Author: Jeff Zhang <zj...@apache.org>
Date:   2016-07-27T05:29:17Z

    ZEPPELIN-1197. Should print output directly without invoking function print in pyspark interpreter

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1232: ZEPPELIN-1197. Should print output directly without in...

Posted by zjffdu <gi...@git.apache.org>.
Github user zjffdu commented on the issue:

    https://github.com/apache/zeppelin/pull/1232
  
    I also compare it with native python repl, the second case is consistent. So I think this behvior is fine, although it is different from jyputer. 
    ![2016-07-29_0746](https://cloud.githubusercontent.com/assets/164491/17233269/06ebec6e-5561-11e6-8d18-41b69e54fa44.png)
    
    



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1232: ZEPPELIN-1197. Should print output directly without in...

Posted by zjffdu <gi...@git.apache.org>.
Github user zjffdu commented on the issue:

    https://github.com/apache/zeppelin/pull/1232
  
    @Leemoonsoo  Thanks for the careful checking. I compare it with jupyter, only the second case is different. Let me investigate how to fix it. 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin pull request #1232: ZEPPELIN-1197. Should print output directly wit...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/zeppelin/pull/1232


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1232: ZEPPELIN-1197. Should print output directly without in...

Posted by zjffdu <gi...@git.apache.org>.
Github user zjffdu commented on the issue:

    https://github.com/apache/zeppelin/pull/1232
  
    Sure, let me do it for python interpreter as well. 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1232: ZEPPELIN-1197. Should print output directly without in...

Posted by zjffdu <gi...@git.apache.org>.
Github user zjffdu commented on the issue:

    https://github.com/apache/zeppelin/pull/1232
  
    Just take a look at python interpreter, it uses a different way with pyspark interpreter. Might need to take more time to investigate that. 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1232: ZEPPELIN-1197. Should print output directly without in...

Posted by Leemoonsoo <gi...@git.apache.org>.
Github user Leemoonsoo commented on the issue:

    https://github.com/apache/zeppelin/pull/1232
  
    Thanks you for explanation. LGTM


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1232: ZEPPELIN-1197. Should print output directly without in...

Posted by Leemoonsoo <gi...@git.apache.org>.
Github user Leemoonsoo commented on the issue:

    https://github.com/apache/zeppelin/pull/1232
  
    Merge into master if there're no more discussions.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1232: ZEPPELIN-1197. Should print output directly without in...

Posted by Leemoonsoo <gi...@git.apache.org>.
Github user Leemoonsoo commented on the issue:

    https://github.com/apache/zeppelin/pull/1232
  
    Thanks @zjffdu for great improvement.
    
    I have tested bit and i could see some inconsistent behavior.
    
    ![image](https://cloud.githubusercontent.com/assets/1540981/17216566/28bb964a-551c-11e6-98e8-659b9f34e04c.png)
    
    Is it expected result?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1232: ZEPPELIN-1197. Should print output directly without in...

Posted by Leemoonsoo <gi...@git.apache.org>.
Github user Leemoonsoo commented on the issue:

    https://github.com/apache/zeppelin/pull/1232
  
    @zjffdu @bzz How about bring this change to [python interpreter](https://github.com/apache/zeppelin/tree/master/python) as well?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---