hbase批量加载异常

nhjlsmyf  于 2021-06-03  发布在  Hadoop
关注(0)|答案(1)|浏览(363)

我可以使用java程序生成hfiles,但是每当我试图将它们导入hbase表时,就会出现附加的错误。当我使用completebulkload而不是使用java程序时,也会出现同样的错误。
如果有人能帮我,那将是一个很大的帮助。我已经被困在这个问题上好几天了,现在开始变得非常沮丧。
代我问候,皮特扬
例外情况:

12/12/14 17:46:23 WARN mapreduce.LoadIncrementalHFiles: Skipping non-directory hdfs://localhost:9000/hadoopdir/user/data/output/hfiles/test/_SUCCESS
12/12/14 17:46:23 INFO hfile.CacheConfig: Allocating LruBlockCache with maximum size 241.7m
12/12/14 17:46:23 INFO util.ChecksumType: Checksum using org.apache.hadoop.util.PureJavaCrc32
12/12/14 17:46:23 INFO util.ChecksumType: org.apache.hadoop.util.PureJavaCrc32C not available. 
12/12/14 17:46:23 ERROR mapreduce.LoadIncrementalHFiles: Unexpected execution exception during splitting
java.util.concurrent.ExecutionException: java.lang.IllegalStateException: The value of the hbase.metrics.showTableName conf option has not been specified in SchemaMetrics
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)
at java.util.concurrent.FutureTask.get(FutureTask.java:111)
at org.apache.hadoop.hbase.mapreduce.LoadIncrementalHFiles.groupOrSplitPhase(LoadIncrementalHFiles.java:333)
at org.apache.hadoop.hbase.mapreduce.LoadIncrementalHFiles.doBulkLoad(LoadIncrementalHFiles.java:232)
at POC.HBaseTest.TestHBaseRun.run(TestHBaseRun.java:67)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at Main.Main.main(Main.java:27)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
Caused by: java.lang.IllegalStateException: The value of the hbase.metrics.showTableName conf option has not been specified in SchemaMetrics
at org.apache.hadoop.hbase.regionserver.metrics.SchemaMetrics.getEffectiveTableName(SchemaMetrics.java:607)
at org.apache.hadoop.hbase.regionserver.metrics.SchemaMetrics.getInstance(SchemaMetrics.java:333)
at org.apache.hadoop.hbase.regionserver.metrics.SchemaConfigured.getSchemaMetrics(SchemaConfigured.java:185)
at org.apache.hadoop.hbase.io.hfile.HFileReaderV2.close(HFileReaderV2.java:441)
at org.apache.hadoop.hbase.io.hfile.HFileReaderV2.close(HFileReaderV2.java:419)
at org.apache.hadoop.hbase.mapreduce.LoadIncrementalHFiles.groupOrSplit(LoadIncrementalHFiles.java:410)
at org.apache.hadoop.hbase.mapreduce.LoadIncrementalHFiles$2.call(LoadIncrementalHFiles.java:323)
at org.apache.hadoop.hbase.mapreduce.LoadIncrementalHFiles$2.call(LoadIncrementalHFiles.java:321)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Error: java.lang.IllegalStateException: The value of the hbase.metrics.showTableName conf option has not been specified in SchemaMetrics
zvms9eto

zvms9eto1#

终于找到了解决办法。
我确定他在下面 $HBASE_HOME/conf -文件夹位于我的java应用程序的类路径上,并且在我的代码中添加了 SchemaMetrics.configureGlobally(conf) 设置在度量名称中使用表名称的标志。
我希望这能对以后的人有所帮助。
编辑:我发现后一件事是我必须使用hbase 0.94.3做的。

相关问题