Titan JAVA API连接错误?

时间:2016-10-20 09:22:21

标签: titan

我想将数据加载到titan中,后端是hbase。所以我从https://github.com/thinkaurelius/titan/blob/titan10/titan-core/src/main/java/com/thinkaurelius/titan/example/GraphOfTheGodsFactory.java更改了示例  一点点。但是当我连接时它会引发很多例外。

  

线程中的异常" main" com.thinkaurelius.titan.core.TitanException:无法打开全局配置       在com.thinkaurelius.titan.diskstorage.Backend.getStandaloneGlobalConfiguration(Backend.java:451)       at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration。(GraphDatabaseConfiguration.java:1322)       在com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:94)       在com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:84)       在com.thinkaurelius.titan.core.TitanFactory $ Builder.open(TitanFactory.java:139)       在titantest.TitanLoad.main(TitanLoad.java:106)   引起:com.thinkaurelius.titan.diskstorage.TemporaryBackendException:存储后端暂时失败       在com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager.ensureTableExists(HBaseStoreManager.java:759)       在com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager.ensureColumnFamilyExists(HBaseStoreManager.java:831)       at com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager.openDatabase(HBaseStoreManager.java:456)       at com.thinkaurelius.titan.diskstorage.keycolumnvalue.KeyColumnValueStoreManager.openDatabase(KeyColumnValueStoreManager.java:29)       在com.thinkaurelius.titan.diskstorage.Backend.getStandaloneGlobalConfiguration(Backend.java:449)       ......还有5个   引起:org.apache.hadoop.hbase.DoNotRetryIOException:java.lang.IllegalAccessError:尝试从类org.apache.hadoop.hbase.zookeeper.MetaTableLocator访问方法com.google.common.base.Stopwatch。()V       at org.apache.hadoop.hbase.client.RpcRetryingCaller.translateException(RpcRetryingCaller.java:229)       在org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithoutRetries(RpcRetryingCaller.java:202)       在org.apache.hadoop.hbase.client.ClientScanner.call(ClientScanner.java:299)       在org.apache.hadoop.hbase.client.ClientScanner.nextScanner(ClientScanner.java:278)       在org.apache.hadoop.hbase.client.ClientScanner.initializeScannerInConstruction(ClientScanner.java:140)       在org.apache.hadoop.hbase.client.ClientScanner。(ClientScanner.java:135)       在org.apache.hadoop.hbase.client.HTable.getScanner(HTable.java:845)       在org.apache.hadoop.hbase.MetaTableAccessor.fullScan(MetaTableAccessor.java:600)       在org.apache.hadoop.hbase.MetaTableAccessor.tableExists(MetaTableAccessor.java:364)       在org.apache.hadoop.hbase.client.HBaseAdmin.tableExists(HBaseAdmin.java:281)       在com.thinkaurelius.titan.diskstorage.hbase.HBaseAdmin1_0.tableExists(HBaseAdmin1_0.java:70)       在com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager.ensureTableExists(HBaseStoreManager.java:753)       ......还有9个   引起:java.lang.IllegalAccessError:尝试从类org.apache.hadoop.hbase.zookeeper.MetaTableLocator访问方法com.google.common.base.Stopwatch。()V       在org.apache.hadoop.hbase.zookeeper.MetaTableLocator.blockUntilAvailable(MetaTableLocator.java:434)       在org.apache.hadoop.hbase.client.ZooKeeperRegistry.getMetaRegionLocation(ZooKeeperRegistry.java:60)       在org.apache.hadoop.hbase.client.ConnectionManager $ HConnectionImplementation.locateMeta(ConnectionManager.java:1139)       at org.apache.hadoop.hbase.client.ConnectionManager $ HConnectionImplementation.locateRegion(ConnectionManager.java:1106)       at org.apache.hadoop.hbase.client.RpcRetryingCallerWithReadReplicas.getRegionLocations(RpcRetryingCallerWithReadReplicas.java:293)       在org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:147)       at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:56)       at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithoutRetries(RpcRetryingCaller.java:200)       ......还有19个

以下是代码:

TitanGraph g = TitanFactory.build().set("storage.backend","hbase").set("storage.hostname","192.168.200.121,192.168.200.115")
            .set("storage.hbase.table","mytitan").set("storage.hbase.ext.zookeeper.znode.parent","/hbase-unsecure").set("storage.port",2181).open();

BTW,我可以连接到Hbase集群,看起来很不错。

0 个答案:

没有答案