从Java API连接时出现Hbase错误

时间:2016-07-22 10:15:48

标签: hbase hortonworks-sandbox

当我使用下面的代码

执行JAVA API代码连接Hbase表时,我遇到了以下错误

Java代码

        HBaseConfiguration.addHbaseResources(configuration);    
        LoadIncrementalHFiles loadFfiles = new LoadIncrementalHFiles(configuration);    
        HTable hTable = new HTable(configuration, tableName);   
        loadFfiles.doBulkLoad(new Path(pathToHFile), hTable);   
        System.out.println("Bulk Load Completed..");

错误

6/07/22 10:08:02 ERROR zookeeper.ZooKeeperNodeTracker:检查'zookeeper.znode.parent'中配置的值。可能存在错误 ch与主机配置的一个。
java.lang.IllegalArgumentException:检查'zookeeper.znode.parent'中配置的值。可能与一个conf不匹配 在主人中配置。
        在org.apache.hadoop.hbase.zookeeper.RootRegionTracker.waitRootRegionLocation(RootRegionTracker.java:81)
        在org.apache.hadoop.hbase.client.HConnectionManager $ HConnectionImplementation.locateRegion(HConnectionManager.java:849)
        at org.apache.hadoop.hbase.client.HConnectionManager $ HConnectionImplementation.locateRegionInMeta(HConnectionManager.java:962)         在org.apache.hadoop.hbase.client.HConnectionManager $ HConnectionImplementation.locateRegion(HConnectionManager.java:860)
        at org.apache.hadoop.hbase.client.HConnectionManager $ HConnectionImplementation.locateRegionInMeta(HConnectionManager.java:962)         在org.apache.hadoop.hbase.client.HConnectionManager $ HConnectionImplementation.locateRegion(HConnectionManager.java:864)
        在org.apache.hadoop.hbase.client.HConnectionManager $ HConnectionImplementation.locateRegion(HConnectionManager.java:821)
        在org.apache.hadoop.hbase.client.HTable.finishSetup(HTable.java:234)
        在org.apache.hadoop.hbase.client.HTable。(HTable.java:174)
        在org.apache.hadoop.hbase.client.HTable。(HTable.java:133)
        在com.HBase.BulkLoad.HbaseBulkLoadDriver.run(HbaseBulkLoadDriver.java:71)
        在org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
        在com.HBase.BulkLoad.HbaseBulkLoadDriver.main(HbaseBulkLoadDriver.java:34)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        在java.lang.reflect.Method.invoke(Method.java:606)
        在org.apache.hadoop.util.RunJar.run(RunJar.java:221)
        在org.apache.hadoop.util.RunJar.main(RunJar.java:136)

0 个答案:

没有答案