[GitHub] zeppelin pull request #2412: [ZEPPELIN-2641] Change encoding to UTF-8 when s...

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] zeppelin pull request #2412: [ZEPPELIN-2641] Change encoding to UTF-8 when s...

prabhjyotsingh
GitHub user qwemicheal opened a pull request:

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

    [ZEPPELIN-2641] Change encoding to UTF-8 when sending request to Livy

    ### What is this PR for?
    Change encoding of the request sent from Zeppelin to Livy to UTF-8. In this way, Zeppelin can support many more language than using ISO-8895-1 by default.
   
   
    ### What type of PR is it?
    Bug Fix
   
   
    ### What is the Jira issue?
    [ZEPPELIN-2641](https://issues.apache.org/jira/browse/ZEPPELIN-2641)
   
    ### How should this be tested?
    Build from source.
    Open a Livy note book.
    Run some simple print command with Chinese or Korean, see whether the return can show the character correctly
   
    ### Screenshots (if appropriate)
    before
    ![image](https://user-images.githubusercontent.com/14201792/27174528-11d45216-51ef-11e7-8f46-2f2e8347a3de.png)
   
    after
    ![image](https://user-images.githubusercontent.com/14201792/27174517-08cdba04-51ef-11e7-989c-88e516b2d265.png)
   
    ### 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/qwemicheal/zeppelin utf-8

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

    https://github.com/apache/zeppelin/pull/2412.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 #2412
   
----
commit f689a7e26dd79112b3669fe9a6c987384a219256
Author: 汪赫扬 <[hidden email]>
Date:   2017-06-15T09:08:32Z

    add utf-8 encoding

commit 8f144bcda8d170746762572d37cb504b9353f0b4
Author: 汪赫扬 <[hidden email]>
Date:   2017-06-15T09:09:37Z

    add unit test

----


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] zeppelin issue #2412: [ZEPPELIN-2641] Change encoding to UTF-8 when sending ...

prabhjyotsingh
Github user qwemicheal commented on the issue:

    https://github.com/apache/zeppelin/pull/2412
 
    @zjffdu @felixcheung  After putting Chinese "你你你你你你好" directly inside test code, I got the following log in Travis CI test. May be use UTF8 byte to create inexplicit Chinese string  would be better?
   
    DEBUG [2017-06-19 05:17:11,258] ({main} BaseLivyInterpreter.java[callRestAPI]:522) - Call rest api in http://testing-gce-d7875447-863b-4719-82c2-fb072d36b0b2.c.travis-ci-prod-5.internal:8998/sessions/3/statements, method: POST, jsonData: {
      "code": "print(\"ä½ ä½ ä½ ä½ ä½ ä½ 好\")"
    }
    DEBUG [2017-06-19 05:17:11,372] ({main} BaseLivyInterpreter.java[callRestAPI]:557) - Get response, StatusCode: 201, responseBody: {"id":1,"state":"running","output":null}
    DEBUG [2017-06-19 05:17:12,373] ({main} BaseLivyInterpreter.java[callRestAPI]:522) - Call rest api in http://testing-gce-d7875447-863b-4719-82c2-fb072d36b0b2.c.travis-ci-prod-5.internal:8998/sessions/3/statements/1, method: GET, jsonData:
    DEBUG [2017-06-19 05:17:12,379] ({main} BaseLivyInterpreter.java[callRestAPI]:557) - Get response, StatusCode: 200, responseBody: {"id":1,"state":"available","output":{"status":"ok","execution_count":1,"data":{"text/plain":"ä½ ä½ ä½ ä½ ä½ ä½ 好"}}}


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] zeppelin issue #2412: [ZEPPELIN-2641] Change encoding to UTF-8 when sending ...

prabhjyotsingh
In reply to this post by prabhjyotsingh
Github user felixcheung commented on the issue:

    https://github.com/apache/zeppelin/pull/2412
 
    did it fail? livy seems to be responding with 2xx


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] zeppelin issue #2412: [ZEPPELIN-2641] Change encoding to UTF-8 when sending ...

prabhjyotsingh
In reply to this post by prabhjyotsingh
Github user qwemicheal commented on the issue:

    https://github.com/apache/zeppelin/pull/2412
 
    @felixcheung It didn't fail. But when using byte to encode to  UTF-8 byte, CI log can show Chinese 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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] zeppelin issue #2412: [ZEPPELIN-2641] Change encoding to UTF-8 when sending ...

prabhjyotsingh
In reply to this post by prabhjyotsingh
Github user zjffdu commented on the issue:

    https://github.com/apache/zeppelin/pull/2412
 
    @qwemicheal sorry for late response, would you mind to update the PR ?


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] zeppelin issue #2412: [ZEPPELIN-2641] Change encoding to UTF-8 when sending ...

prabhjyotsingh
In reply to this post by prabhjyotsingh
Github user qwemicheal commented on the issue:

    https://github.com/apache/zeppelin/pull/2412
 
    @zjffdu Update the PR to what state?  


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] zeppelin issue #2412: [ZEPPELIN-2641] Change encoding to UTF-8 when sending ...

prabhjyotsingh
In reply to this post by prabhjyotsingh
Github user zjffdu commented on the issue:

    https://github.com/apache/zeppelin/pull/2412
 
    Sorry, I thought there was code conflict. I will merge it soon


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] zeppelin pull request #2412: [ZEPPELIN-2641] Change encoding to UTF-8 when s...

prabhjyotsingh
In reply to this post by prabhjyotsingh
Github user asfgit closed the pull request at:

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


---