RE: LINES TERMINATED BY only supports newline '\n' right now

2016-06-02 Thread Loudongfeng
One quick way to solve this is setting textinputformat.record.delimiter=”US” before reading from that text table. But it has some limitations: 1,you cannot read multiple text tables with different line delimiters in the same query. 2,you cannot write to that text table with your own line delim

RE: Reduce number of Hadoop mappers for large number of GZ files

2016-04-04 Thread Loudongfeng
You can set hive.hadoop.supports.splittable.combineinputformat=true to combine your files. In fact ,this parameter should be set to true by default since MAPREDUCE-1597 was fixed is hadoop 0.22.0 long ago. From: Harshit Sharan [mailto:hsincredi...@gmail.com] Sent: Saturday, April 02, 2016 4:06 P

RE: Issue joining 21 HUGE Hive tables

2016-03-24 Thread Loudongfeng
Not sure if there's anything special in external tables. May be you can try Cost Based Optimizer in Hive 0.14 and above. analyze table your_table compute statistics; analyze table your_table compute statistics for columns col_1, col_2,...; or analyze table your_table compute statistics for columns

row_number() over skew partition by clolumns

2015-10-27 Thread Loudongfeng
The following SQL will run very slow due to skew values in skew_col column: select row_number() over (partition by skew_col) from some_table; Is there any way to optimize it? Thanks

答复: Create function using custom UDF

2015-04-24 Thread Loudongfeng
The using statement support multiple resources,so you can create function with “using jar HDFS://path/to/A.jar, jar HDFS://path/to/B.jar,…” 发件人: Buntu Dev [mailto:buntu...@gmail.com] 发送时间: 2015年4月24日 15:18 收件人: user@hive.apache.org 主题: Re: Create function using custom UDF Thanks Loudongfeng for

re: Create function using custom UDF

2015-04-23 Thread Loudongfeng
Referring to https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-Create/DropFunction You don’t need to add jar every time when using Permanent Functions. Make sure to create your function following this CREATE FUNCTION [db_name.]function_name AS class_name [USI

答复: Problem with Hive Authorization

2014-11-25 Thread Loudongfeng
Correction: The HiveServer2 using SQL Standards authorization with enable.doAs setting to true. 发件人: Loudongfeng [mailto:loudongf...@huawei.com] 发送时间: 2014年11月25日 20:14 收件人: user@hive.apache.org 抄送: Zhenghui; Zhaojun (Terry); Dengjinbo (FusionInsight . IT) 主题: Problem with Hive Authorization

Problem with Hive Authorization

2014-11-25 Thread Loudongfeng
Hello,list The background: Hive 0.13.1 with security enabled. The HiveServer2 using SQL Standards authorization with doAs setting to false. Remote Meta Store using storage based authorization. Impala has access to Hive Meta Store. The problem : MetaStore API such as grant_role, revoke_role, grant