简体   繁体   English

HBase批量加载例外

[英]HBase bulk load exeception

I'm able to generate HFiles using a Java program but whenever I try to import them into my HBase table I get the attached error. 我能够使用Java程序生成HFile,但每当我尝试将它们导入我的HBase表时,我都会收到附加的错误。 I get the same error when, instead of using my Java program, I use completebulkload. 我得到了同样的错误,而不是使用我的Java程序,我使用completebulkload。

It would be a great help if someone could help me out here. 如果有人可以帮助我,这将是一个很大的帮助。 I'm stuck on this for some days now and it's starting to get really frustrating. 我现在已经坚持了好几天了,它开始变得非常令人沮丧。

Kind regards, Pieterjan 亲切的问候,Pieterjan

Exception: 例外:

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

Finally found a solution. 终于找到了解决方案。

I made sure the under $HBASE_HOME/conf -folder was on the classpath of my Java application and in my code I added SchemaMetrics.configureGlobally(conf) which sets the flag to use table names in metric names. 我确保$HBASE_HOME/conf -folder下面是我的Java应用程序的类路径,在我的代码中我添加了SchemaMetrics.configureGlobally(conf) ,它设置标志以在度量标准名称中使用表名。

I hope this can help someone later on. 我希望以后可以帮助别人。

EDIT: I found out this latter thing was something I had to do using HBase 0.94.3. 编辑:我发现后一个事情是我用HBase 0.94.3做的事情。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM