我使用janusgraph javaapi,hbase作为存储后端
我必须提到的一点是,我可以在janusgraph shell中成功地运行相同的命令, gremlin.sh
错误之前的日志如下,这发生在打开graph示例的过程中, JanusGraphFactory.open(jg.properties)
```
07:20:46.169 [main-SendThread(cdh-master1:2181)] DEBUG org.apache.zookeeper.ClientCnxn -
Reading reply sessionid:0x263f89ba9d56ce2,
packet:: clientPath:null serverPath:null finished:false header:: 3,8 replyHeader:: 3,55834924519,0
request:: '/hbase,F response:: v{'replication,'meta-region-server,'rs,'splitWAL,'backup-masters,
'table-lock,'flush-table-proc,'region-in-transition,'online-snapshot,'master,'running,'recovering-regions,'draining,'namespace,'hbaseid,'table}
07:20:46.182 [main] WARN o.j.d.hbase.HBaseStoreManager - Unexpected exception during getDeployment()
错误是
java.lang.RuntimeException: org.janusgraph.diskstorage.TemporaryBackendException: Temporary failure in storage backend
at org.janusgraph.diskstorage.hbase.HBaseStoreManager.getDeployment(HBaseStoreManager.java:364) ~[jar:rsrc:janusgraph-hbase-0.2.0.jar!/:na]
at org.janusgraph.diskstorage.hbase.HBaseStoreManager.getFeatures(HBaseStoreManager.java:403) ~[jar:rsrc:janusgraph-hbase-0.2.0.jar!/:na]
at org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration.(GraphDatabaseConfiguration.java:1377) [jar:rsrc:janusgraph-core-0.2.0.jar!/:na]
at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:164) [jar:rsrc:janusgraph-core-0.2.0.jar!/:na]
at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:133) [jar:rsrc:janusgraph-core-0.2.0.jar!/:na]
at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:80) [jar:rsrc:janusgraph-core-0.2.0.jar!/:na]
我对此一无所知 `TemporaryBackendException` ,有人见过这个吗?
janusgraph配置的一部分是
gremlin.graph=org.janusgraph.core.JanusGraphFactory
cluster.max-partitions=64
storage.backend=hbase
storage.batch-loading=true
storage.hostname=cdh-master1,cdh-master2,cdh-master3
哪里 `cdh-master1,2,3` 是zookeeper quorum、版本janusgraph 2.0、hbase 1.2吗
完整堆栈跟踪是
at my.graph.Graph.(Graph.java:7) [rsrc:./:na]
at my.graph.App.main(App.java:24) [rsrc:./:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_171]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_171]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_171]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_171]
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58) [janus.jar:na]
Caused by: org.janusgraph.diskstorage.TemporaryBackendException: Temporary failure in storage backend
at org.janusgraph.diskstorage.hbase.HBaseStoreManager.ensureTableExists(HBaseStoreManager.java:739) ~[jar:rsrc:janusgraph-hbase-0.2.0.jar!/:na]
at org.janusgraph.diskstorage.hbase.HBaseStoreManager.getLocalKeyPartition(HBaseStoreManager.java:524) ~[jar:rsrc:janusgraph-hbase-0.2.0.jar!/:na]
at org.janusgraph.diskstorage.hbase.HBaseStoreManager.getDeployment(HBaseStoreManager.java:361) ~[jar:rsrc:janusgraph-hbase-0.2.0.jar!/:na]
... 12 common frames omitted
Caused by: org.apache.hadoop.hbase.DoNotRetryIOException: java.lang.IllegalAccessError: tried to access method com.google.common.base.Stopwatch.()V from class org.apache.hadoop.hbase.zookeeper.MetaTableLocator
at org.apache.hadoop.hbase.client.RpcRetryingCaller.translateException(RpcRetryingCaller.java:229) ~[jar:rsrc:hbase-client-1.1.2.jar!/:na]
at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithoutRetries(RpcRetryingCaller.java:202) ~[jar:rsrc:hbase-client-1.1.2.jar!/:na]
at org.apache.hadoop.hbase.client.ClientScanner.call(ClientScanner.java:320) ~[jar:rsrc:hbase-client-1.1.2.jar!/:na]
at org.apache.hadoop.hbase.client.ClientScanner.nextScanner(ClientScanner.java:295) ~[jar:rsrc:hbase-client-1.1.2.jar!/:na]
at org.apache.hadoop.hbase.client.ClientScanner.initializeScannerInConstruction(ClientScanner.java:160) ~[jar:rsrc:hbase-client-1.1.2.jar!/:na]
at org.apache.hadoop.hbase.client.ClientScanner.(ClientScanner.java:155) ~[jar:rsrc:hbase-client-1.1.2.jar!/:na]
at org.apache.hadoop.hbase.client.HTable.getScanner(HTable.java:821) ~[jar:rsrc:hbase-client-1.1.2.jar!/:na]
at org.apache.hadoop.hbase.MetaTableAccessor.fullScan(MetaTableAccessor.java:602) ~[jar:rsrc:hbase-client-1.1.2.jar!/:na]
at org.apache.hadoop.hbase.MetaTableAccessor.tableExists(MetaTableAccessor.java:366) ~[jar:rsrc:hbase-client-1.1.2.jar!/:na]
at org.apache.hadoop.hbase.client.HBaseAdmin.tableExists(HBaseAdmin.java:303) ~[jar:rsrc:hbase-client-1.1.2.jar!/:na]
at org.janusgraph.diskstorage.hbase.HBaseAdmin1_0.tableExists(HBaseAdmin1_0.java:111) ~[jar:rsrc:janusgraph-hbase-0.2.0.jar!/:na]
at org.janusgraph.diskstorage.hbase.HBaseStoreManager.ensureTableExists(HBaseStoreManager.java:716) ~[jar:rsrc:janusgraph-hbase-0.2.0.jar!/:na]
... 14 common frames omitted
Caused by: java.lang.IllegalAccessError: tried to access method com.google.common.base.Stopwatch.()V from class org.apache.hadoop.hbase.zookeeper.MetaTableLocator
at org.apache.hadoop.hbase.zookeeper.MetaTableLocator.blockUntilAvailable(MetaTableLocator.java:596) ~[jar:rsrc:hbase-client-1.1.2.jar!/:na]
at org.apache.hadoop.hbase.zookeeper.MetaTableLocator.blockUntilAvailable(MetaTableLocator.java:580) ~[jar:rsrc:hbase-client-1.1.2.jar!/:na]
at org.apache.hadoop.hbase.zookeeper.MetaTableLocator.blockUntilAvailable(MetaTableLocator.java:559) ~[jar:rsrc:hbase-client-1.1.2.jar!/:na]
at org.apache.hadoop.hbase.client.ZooKeeperRegistry.getMetaRegionLocation(ZooKeeperRegistry.java:61) ~[jar:rsrc:hbase-client-1.1.2.jar!/:na]
at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.locateMeta(ConnectionManager.java:1185) ~[jar:rsrc:hbase-client-1.1.2.jar!/:na]
at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.locateRegion(ConnectionManager.java:1152) ~[jar:rsrc:hbase-client-1.1.2.jar!/:na]
at org.apache.hadoop.hbase.client.RpcRetryingCallerWithReadReplicas.getRegionLocations(RpcRetryingCallerWithReadReplicas.java:300) ~[jar:rsrc:hbase-client-1.1.2.jar!/:na]
at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:151) ~[jar:rsrc:hbase-client-1.1.2.jar!/:na]
at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:59) ~[jar:rsrc:hbase-client-1.1.2.jar!/:na]
at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithoutRetries(RpcRetryingCaller.java:200) ~[jar:rsrc:hbase-client-1.1.2.jar!/:na]
... 24 common frames omitted
我的一部分 `pom.mxl` 包括依赖信息是
1条答案
按热度按时间z4bn682m1#
我之前在这里发布了一个答案:
这是一个Guava版本冲突的问题。janusgraph hbase示例不会遇到guava版本错误,因为它列出了特定的依赖项以及这些依赖项的顺序。
注意
hbase-shaded-client
(已修复问题#512)而不是hbase-client
在你的pom.xml
它有一个阴影版的Guava与hbase一起使用。着色重命名一些依赖项的包名,这允许您在类路径上拥有不同版本的guava,而不会引起冲突。gremlin控制台使用
hbase-shaded-client
你也可以在盒子里找到那个jarlib
分发目录。