ORC文件格式错误

3

将Hive外部表从RC格式升级为ORC格式,并在其上运行MSCK REPAIR TABLE时,当我从表中选择全部时,会出现以下错误-

Failed with exception java.io.IOException:java.io.IOException: Malformed ORC file hdfs://myServer:port/my_table/prtn_date=yyyymm/part-m-00000__xxxxxxxxxxxxx Invalid postscript length 1

如果有一个表格,需要将RC格式的历史数据迁移到ORC格式的新定义,那么需要遵循哪些过程?

2个回答

4

Hive在添加分区时不会自动重新格式化数据。你有两个选择:

  1. 将旧的分区保留为RC文件,将新的分区设置为ORC文件。
  2. 将数据移动到临时表中,并使用insert overwrite将数据重新写入为ORC文件。

-2

引用

在创建语句中添加行格式、输入格式和输出格式以解决问题:

创建外部表 xyz ( a string, b string) PARTITIONED BY ( c string)

ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' STORED AS INPUTFORMAT 'org.apache.hadoop.mapred.SequenceFileInputFormat' OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat'

位置 "hdfs 路径";


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接