Hive表文件格式ORC导数

如果数据存储在文本文件中,将数据导入fileformat为ORC的Hive表orc_table中,解决方法:

1 新建一个结构和orctabel相同的表,fileformat为textfile,表名txttable

create table txt_table like orc_table;

2 文本文件导入txt_table中

load data local inpath 'path\to\text\file' into table txt_table;

3 通过insert select命令将txt_tabel数据导入orc_table中

Hadoop 2.2 配合 Hive 0.12 使用ORC引发的BUG

编译hadoop-2.2.0时用的protobuf-2.5.0版本,而编译hive-0.12.0时用的protobuf-2.4.1版本,从而造成了冲突。

posted on 2015-07-23 17:03  onesteng  阅读(418)  评论(0编辑  收藏  举报