You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by "heyang wang (JIRA)" <ji...@apache.org> on 2017/06/13 08:53:00 UTC
[jira] [Created] (ZEPPELIN-2641) Livy interpreter doesn't support
Chinese encoding
heyang wang created ZEPPELIN-2641:
-------------------------------------
Summary: Livy interpreter doesn't support Chinese encoding
Key: ZEPPELIN-2641
URL: https://issues.apache.org/jira/browse/ZEPPELIN-2641
Project: Zeppelin
Issue Type: Bug
Components: livy-interpreter
Affects Versions: 0.7.1, 0.8.0
Reporter: heyang wang
Priority: Critical
When using Livy to interact with spark. Spark sql with Chinese character always return empty result.
The reason is because Zeppelin use restTemplate.java from spring frame work. When sending restful request to Livy, the headers is defined as Content-Type:application/json. This setting doesn't specify the encoding of the charset and spring will use ISO-8895-1 by default. But ISO-8895-1 isn't compatible with Chinese. The code Livy receive from Zeppelin contain invalid Chinese encoding and will be interpret by spark as ?.
Change header from application/json to MediaType.APPLICATION_JSON_UTF8_VALUE in BaseLivyInterpreter.java and rebuild can solve this problem.
It seems encoding problem affect more than Chinese since ISO-8895-1's coverage is restricted. I think update the encoding to UTF-8 would be helpful.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)