Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Hive >> mail # user >> hive comment in Chinese


+
NamasAmitabha 2012-08-22, 02:14
+
Joshi, Rekha 2012-08-23, 11:41
+
NamasAmitabha 2012-08-21, 05:30
+
Namas Amitabha 2012-08-23, 15:01
+
Edward Capriolo 2012-08-23, 15:09
Copy link to this message
-
Re: hive comment in Chinese
Well
 I create a issue here : https://issues.apache.org/jira/browse/HIVE-3914
the patch simpley use “outStream.writeUTF” instead of “
outStream.writeBytes ”
and  solved this problem
2012/8/23 Edward Capriolo <[EMAIL PROTECTED]>

> Currently what is a legal column or table name is a very limited set
> of ascii characters. This is because hive needs to pass this meta
> information between components, sometimes as XML sometimes as json,
> and these serializations are not able to deal with complex encoding.
> There is some flexibility with comments but different characters sets
> in the columns and table names is a large change.
>
> On Thu, Aug 23, 2012 at 11:01 AM, Namas Amitabha
> <[EMAIL PROTECTED]> wrote:
> > Hi Rekha,
> >
> >
> >
> > I’ve set the JDBC ConnectionURL like this
> > “?useUnicode=true&characterEncoding=UTF-8”,but it doesn’t work.
> >
> >
> >
> > And if my table content contains Chinese words, hive can display normally
> > when I exec select query, only table comments and column comments are
> > garbled when I tried to exec “desc table”.
> >
> > So I don’t know where is the problem. I even tried to modify some hive
> > source code in org.apache.hadoop.hive.jdbc to convert comment string to
> > “UTF-8” charset, but it still doesn’t work.
> >
> >
> >
> > But thanks all the same.
> >
> >
> >
> >
> >
> >
> >
> > Thanks & Regards
> >
> > Zhan
> >
> > 发件人: Joshi, Rekha [mailto:[EMAIL PROTECTED]]
> > 发送时间: 2012年8月23日 19:42
> > 收件人: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > 主题: Re: hive comment in Chinese
> >
> >
> >
> > Hi Zhan,
> >
> >
> >
> > Ideally there must be some 'hive.cli.print.charset' property in config
> xml
> > files somewhere which gets picked up by CliDriver (in say
> > HiveConf.ConfVars.HIVE_CLI_PRINT_CHARSET), but I don't see it.
> >
> >
> >
> > There is one in hive-site.xml to specify character set, but I am not
> sure if
> > it is picked by CliDriver.But try?
> >
> > <property>
> >
> >       <name>javax.jdo.option.ConnectionURL</name>
> >
> >
> > <value>jdbc:mysql://<your-db>:3306/hive?characterEncoding=UTF-8</value>
> >
> > </property>
> >
> >
> >
> > Thanks
> >
> > Rekha
> >
> >
> >
> > From: NamasAmitabha <[EMAIL PROTECTED]>
> > Reply-To: <[EMAIL PROTECTED]>
> > Date: Wed, 22 Aug 2012 10:14:07 +0800
> > To: <[EMAIL PROTECTED]>
> > Subject: hive comment in Chinese
> >
> >
> >
> > Hi, all
> >
> >
> >       I tried to use Chinese in hive column comment and table comment,and
> > the metadata in Mysql is regular,the charset of 'COMMENT' column in
> > 'columns_v2' table and 'PARAM_VALUE' column in 'table_params' table both
> are
> > 'utf8'.
> >       When I exec 'select * from columns_v2' with mysql client,the
> Chinese
> > comments display normally. But when I execute 'describe table' with hive
> > cli,the Chinese words are garbled.Why is it so? Please help me out.
> >
> >
> >
> >
> > Thanks & Regards
> > Zhan
> >
> >
>

--
Best wishs!
Fangkun.Cao