hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "JaySenSharma (JIRA)" <>
Subject [jira] [Created] (HIVE-15927) HIve does not insert UTF-8 characters properly when insert query is triggered.
Date Wed, 15 Feb 2017 11:56:41 GMT
JaySenSharma created HIVE-15927:

             Summary: HIve does not insert UTF-8 characters properly when insert query is
                 Key: HIVE-15927
             Project: Hive
          Issue Type: Bug
          Components: Hive
    Affects Versions: 1.2.1, 1.2.0
         Environment: All
            Reporter: JaySenSharma

If we create a table as following from Ambari Hive View (or using any other approach)

CREATE TABLE IF NOT EXISTS currency2 (id int, name string) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
WITH SERDEPROPERTIES("serialization.encoding"='UTF-8','store.charset'='UTF-8', 'retrieve.charset'='UTF-8');

INSERT INTO currency2 VALUES (1, "£€₡");

SELECT * FROM currency2;

- Output from ambari side is attached as "Result.png"

Here we see that the queries were sent to the "hive" correctly as we see the following entries
appear in the "hiveserver2.log"
ssh root@hiveserevr2host
cd /var/log/hive
tail -f hiveserver2.log

Output of the log shows that hiveserver2 received the proper insert query statements from
Ambari Hive View.

2017-01-25 09:25:27,589 INFO  [HiveServer2-Handler-Pool: Thread-60]: parse.ParseDriver (
- Parsing command: INSERT INTO currency2 VALUES (1, "£€₡")

2017-01-25 09:25:28,337 INFO  [HiveServer2-Background-Pool: Thread-244]: exec.Task (
- Dag name: INSERT INTO currency2 VALUES (1, "£€₡")(Stage-1)

2017-01-25 09:25:28,694 INFO  [HiveServer2-Background-Pool: Thread-244]: client.TezClient
( - Submitted dag to TezSession, sessionName=HIVE-bf038f08-853a-4850-80bc-7a6eaded3c2d,
applicationId=application_1485333705258_0007, dagName=INSERT INTO c
urrency1 VALUES (1, "£€₡")(Stage-1)

- Even the beeline fails to show the correct entry:
[root@erie3 ~]# su - hive

[hive@erie3 root]$ beeline
Beeline version 1.2.1000. by Apache Hive

beeline> !connect jdbc:hive2://,,,;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2

0: jdbc:hive2://,erie1.> SELECT * FROM currency2;
|  |  |
| 1             | ���             |


This message was sent by Atlassian JIRA

View raw message