创建orc表无法正常工作

时间:2016-05-08 22:01:43

标签: hadoop hive

我有存储在hdfs中的.tbl文件。我试图使用.tbl文件在hive中创建表,但是采用orc格式。

我开始在文本文件中创建一个表:

create external table partsupp (PS_PARTKEY BIGINT,
 PS_SUPPKEY BIGINT,
 PS_AVAILQTY INT,
 PS_SUPPLYCOST DOUBLE,
 PS_COMMENT STRING)
ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' STORED AS TEXTFILE;

然后以orc格式创建:

 create table if not exists partsupporc (PS_PARTKEY BIGINT,
     PS_SUPPKEY BIGINT,
     PS_AVAILQTY INT,
     PS_SUPPLYCOST DOUBLE,
     PS_COMMENT STRING)
    STORED AS ORC TBLPROPERTIES ("orc.compress"="SNAPPY");

然后加载文本表:

LOAD DATA LOCAL INPATH '/tables/partsupp/partsupp.tbl' INTO TABLE partsupp;

然后将文件复制到partsupporc表中:

INSERT INTO TABLE partsupporc SELECT * FROM partsupp;

但它没有用,我得到了这个错误:

It appears Number of reduce tasks is set to 0 since there´s no reduce operator而不是停止。

你明白为什么它不起作用吗?

0 个答案:

没有答案