1、my file format is GB,why hive will have difficulty in convertion them to Unicode? 2、there is any difference between (select* in hive Console) and (insert into local dir select *) Hope your expainlation and help,thanks
-----邮件原件----- 发件人: Zheng Shao [mailto:[email protected]] 发送时间: 2009年12月28日 8:55 收件人: [email protected] 主题: Re: 答复: chinese word display wrong in hive console,can somebody help me? How was the Chinese words encoded in the file? Is it UTF-8 or GB? If it's GB, then Hive will have difficulty in converting them to unicode. Please take a look at Driver.java. There is a method to get the results as List<String>. If we get the result as Text (byte array) instead, you can get the data in the original encoding. Zheng 2009/12/27 luocanrao <[email protected]>: > Sorry ,There were some spelling mistake in my last Email, so I am trying to > describe it again. > > Looking forward to hearing from you soon! Thank you in advance! > > when I use select command in hive Console > SELECT pv_gender_sum.* FROM pv_gender_sum , all Chinese words displayed is > wrong. > I guess it is the Character coding problem. Can anybody give me some help? > > but if i use command > INSERT OVERWRITE LOCAL DIRECTORY '/tmp/pv_gender_sum' SELECT pv_gender_sum.* > FROM pv_gender_sum; > Chinese words in /tmp/pv_gender file look correct. > > my hive version hive-0.3.99.1+0 > hadoop version hadoop-0.20.1+152 > linux 2.6 > > > > 发件人: luocanrao [mailto:[email protected]] > 发送时间: 2009年12月27日 16:03 > 收件人: [email protected] > 主题: chinese word display wrong in hive cosole,can somebody help me? > > > > when I use select command in hive cosole > SELECT pv_gender_sum.* FROM pv_gender_sum , all chinese words display wrong > I guess is Character coding problem. Any body can give me some help? > > but if i use > INSERT OVERWRITE LOCAL DIRECTORY '/tmp/pv_gender_sum' SELECT pv_gender_sum.* > FROM pv_gender_sum; > chinese words in /tmp/pv_gender file looks file. > > my hive version hive-0.3.99.1+0 > hadoop version hadoop-0.20.1+152 > linux 2.6 > > > > -- Yours, Zheng
