今天想测试下hive文件存储格式为:SEQUENCEFILE的;
建表语句:
create table cm_subs_base_info_seqfile_table
(
servnumber string
,subsid string
,custid string
,acctid string
,applyoid string
,prodid string
,rec_time timestamp
)
COMMENT 'This is test load data seqfile_table'
ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t'
STORED AS sequencefile
LOCATION '/user/hive/warehouse/seqfile_table';
set hive.exec.compress.output=true;
set mapred.output.compress=true;
set mapred.output.compression.codec=org.apache.hadoop.io.compress.GzipCodec;
set io.compression.codecs=org.apache.hadoop.io.compress.GzipCodec;
SET io.seqfile.compression.type=BLOCK;
insert overwrite table cm_subs_base_info_seqfile_table select * from cm_subs_base_info;
1、插入数据的时候报错
如图片
特别发现我执行 insert overwrite table cm_subs_base_info_seqfile_table select * from cm_subs_base_info; 这个语句之后,hdfs上对应的/user/hive/warehouse/seqfile_table目录,用户由zhong变更为root。
如图片:
插入报错图片
用户变更
|