hbase批量加载异常(hfile版本)

2jcobegt  于 2021-06-09  发布在  Hbase
关注(0)|答案(1)|浏览(527)

我正在从hdfs向hbase加载数据。

FileOutputFormat.setOutputPath(job, output);

 HTable table = new HTable(conf, tableName);
 HFileOutputFormat.configureIncrementalLoad(job, table);        
 .......    
 LoadIncrementalHFiles loader = new LoadIncrementalHFiles(config);
 loader.doBulkLoad(new Path(inPath), hTable);

例外情况如下:

Caused by: java.lang.IllegalArgumentException: Invalid HFile version: 2099722 (expected to be between 2 and 3)
    at org.apache.hadoop.hbase.io.hfile.HFile.checkFormatVersion(HFile.java:888)
    at org.apache.hadoop.hbase.io.hfile.FixedFileTrailer.readFromStream(FixedFileTrailer.java:402)
    at org.apache.hadoop.hbase.io.hfile.HFile.pickReaderVersion(HFile.java:537)

Exception in thread "main" org.apache.hadoop.hbase.io.hfile.CorruptHFileException: Problem reading HFile Trailer from file hdfs:...
    at org.apache.hadoop.hbase.io.hfile.HFile.pickReaderVersion(HFile.java:552)
    at org.apache.hadoop.hbase.io.hfile.HFile.createReader(HFile.java:595)

你能给点建议吗?
提前谢谢!

dgtucam1

dgtucam11#

你试过跑步吗:
hbase org.apache.hadoop.hbase.mapreduce.loadincrementalhfiles路径到hfiles表名

相关问题