我能够使用Java程序生成HFile但是每当我尝试将它们导入我的HBase表时,我都会收到附加的错误。我得到了同样的错误,而不是使用我的Java程序,我使用completebulkload。
如果有人可以帮助我,这将是一个很大的帮助。我现在已经坚持了好几天了,而且它开始变得非常令人沮丧。
亲切的问候, Pieterjan
例外:
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
答案 0 :(得分:4)
终于找到了解决方案。
我确保under $HBASE_HOME/conf
- 文件夹位于我的Java应用程序的类路径中,并且在我的代码中我添加了SchemaMetrics.configureGlobally(conf)
,它设置标志以在度量标准名称中使用表名。
我希望以后可以帮助别人。
编辑:我发现后一个事情是我必须使用HBase 0.94.3做的事情。