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 <edlinuxg...@gmail.com>

> 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
> <hyacinth...@hotmail.com> wrote:
> > Hi Rekha,
> >
> >
> >
> > I’ve set the JDBC ConnectionURL like this
> > “?useUnicode=true&amp;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:rekha_jo...@intuit.com]
> > 发送时间: 2012年8月23日 19:42
> > 收件人: user@hive.apache.org; hyacinth...@hotmail.com
> > 主题: 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 <hyacinth...@hotmail.com>
> > Reply-To: <user@hive.apache.org>
> > Date: Wed, 22 Aug 2012 10:14:07 +0800
> > To: <user@hive.apache.org>
> > 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

Reply via email to