无法通过Hbase客户端从Titan连接到Google Bigtable [英] Cannot connect from Titan to Google Bigtable via Hbase client

查看:438
本文介绍了无法通过Hbase客户端从Titan连接到Google Bigtable的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用Hadoop 2(HBase 1.0.2客户端)连接到Titan 1.0.0(可在 https://github.com/thinkaurelius/titan/wiki/Downloads )与Google Cloud Bigtable服务,使用其HBase客户端。



我可以通过遵循此操作,从GCE实例中的HBase shell成功连接到Bigtable程序 hbase-site.xml 取决于模板,我已经为 ALPN_VERSION = 8.1.5.v20150921 (Oracle JDK SE 1.8.0_60)

< configuration>
<属性>
<名称> hbase.client.connection.impl< / name>
<值> com.google.cloud.bigtable.hbase1_0.BigtableConnection< /值>
< / property>
<属性>
<名称> google.bigtable.cluster.name< /名称>
<值> [YOUR-CLUSTER-ID]< /值>
< / property>
<属性>
< name> google.bigtable.project.id< / name>
<值> [YOUR-PROJECT-ID]< /值>
< / property>
<属性>
< name> google.bigtable.zone.name< / name>
<值> [YOUR-ZONE-NAME]< /值>
< / property>
< / configuration>

然后,我复制了 hbase-site.xml to titan-1.0.0-hadoop2 / conf 目录,Bigtable jar添加到 titan-1.0.0-hadoop2 / lib titan-1.0.0-hadoop2 文件夹中,运行<$ c $文件夹。

c> ./ run / gremlin.sh
并启动控制台。因此,当试图使用HBase客户端创建连接时(配置为指向Bigtable集群)...

  TitanGraph graph = TitanFactory.build()。set(storage.backend,hbase)。open(); 

... Gremlin控制台中出现以下异常:

  com.google.cloud.bigtable.hbase1_0.BigtableConnection无法转换为org.apache.hadoop.hbase.client.ClusterConnection 



以下是堆栈跟踪:

 
gremlin > TitanFactory.build()。set(storage.backend,hbase)。open();

SLF4J:类路径包含多个SLF4J绑定。
SLF4J:在[jar:file:/usr/lib/titan-1.0.0-hadoop2/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]中找到绑定
SLF4J:在[jar:file:/usr/lib/titan-1.0.0-hadoop2/lib/logback-classic-1.1.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]中找到绑定
SLF4J:请参阅http://www.slf4j.org/codes.html#multiple_bindings以获取解释。
SLF4J:实际绑定类型为[org.slf4j.impl.Log4jLoggerFactory] ​​
13:42:24 WARN org.apache.hadoop.util.NativeCodeLoader - 无法为您的平台加载native-hadoop库...在适用时使用builtin-java类
13:42:25 WARN com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager - getDeployment()期间的意外异常
java.lang.ClassCastException:com。 google.cloud.bigtable.hbase1_0.BigtableConnection无法转换为org.apache.hadoop.hbase.client.ClusterConnection
,位于org.apache.hadoop.hbase.client.HBaseAdmin。(HBaseAdmin.java:225)
at com.thinkaurelius.titan.diskstorage.hbase.HConnection1_0.getAdmin(HConnection1_0.java:28)
at com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager.getAdminInterface(HBaseStoreManager.java:960)
at com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager.ensureTableExists(HBaseStoreManager.java:747)
at com.thinkaurelius.titan.diskstorage.hbase.HBaseStore Manager.getLocalKeyPartition(HBaseStoreManager.java:556)
at com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager.getDeployment(HBaseStoreManager.java:347)
at com.thinkaurelius.titan.diskstorage.hbase。 HBaseStoreManager.getFeatures(HBaseStoreManager.java:389)
at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration。(GraphDatabaseConfiguration.java:1321)
at com.thinkaurelius.titan.core.TitanFactory.open (TitanFactory.java:94)
at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:84)
at com.thinkaurelius.titan.core.TitanFactory $ Builder.open(TitanFactory .java:139)
at com.thinkaurelius.titan.core.TitanFactory $ Builder $ open $ 0.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray .java:45)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:110)
at org.codehaus.groovy.runtime.callsite.Abstra ctCallSite.call(AbstractCallSite.java:114)
at groovysh_evaluate.run(groovysh_evaluate:3)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
在org.codehaus.groovy.tools.shell.Interpreter.evaluate(Interpreter.groovy:69)
在org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:185)
在org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:119)$ b在org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)

at org.codehaus.groovy.tools.shell.ShellRunner.work(ShellRunner.groovy:94)$ b在org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
$ b at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super $ 2 $ work(InteractiveShellRunner.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl .invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.groovy.reflection.CachedMethod。 invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)
在org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:130)
在org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:150)
在org.codehaus .groovy.tools.shell.InteractiveShellRunner.work(InteractiveShellRunner.groovy:123)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at org.codehaus .groovy.tools.shell.ShellRunner.run(ShellRunner.groovy:58)
在org.codehaus.groovy.tools.shell.InteractiveShellRunner.super $ 2 $ run(InteractiveShellRunner.groo VY)美元,sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)
在sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
在sun.reflect.DelegatingMethodAccessorImpl.invoke(B $ B DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)
at org.codehaus.groovy.runtime .ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:130)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:150)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner .run(InteractiveShellRunner.groovy:82)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at o rg.apache.tinkerpop.gremlin.console.Console。(Console.groovy:144)$ or $ $ b $ org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at org .apache.tinkerpop.gremlin.console.Console.main(Console.groovy:303)
13:42:25 WARN com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager - getDeployment()期间的意外异常
java.lang.ClassCastException:com.google.cloud.bigtable.hbase1_0.BigtableConnection无法在org.apache.hadoop.hbase.client.HBaseAdmin上转换为org.apache.hadoop.hbase.client.ClusterConnection
。 (HBaseAdmin.java:225)
at com.thinkaurelius.titan.diskstorage.hbase.HConnection1_0.getAdmin(HConnection1_0.java:28)
at com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager.getAdminInterface (HBaseStoreManager.java:960)
at com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager.ensureTableExists(HBaseStoreManager.java:747)
at com.thinkaurelius.titan.diskstorage.hbase.HBaseSt oreManager.getLocalKeyPartition(HBaseStoreManager.java:556)
at com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager.getDeployment(HBaseStoreManager.java:347)
at com.thinkaurelius.titan.diskstorage.hbase。 HBaseStoreManager.getFeatures(HBaseStoreManager.java:389)
at com.thinkaurelius.titan.diskstorage.Backend.getStandaloneGlobalConfiguration(Backend.java:438)
at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration。 (GraphDatabaseConfiguration.java:1322)
at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:94)
at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java :84)
at com.thinkaurelius.titan.core.TitanFactory $ Builder.open(TitanFactory.java:139)
at com.thinkaurelius.titan.core.TitanFactory $ Builder $ open $ 0.call(未知来源)
在org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
在org.codehaus.groovy.runtime.cal lsite.AbstractCallSite.call(AbstractCallSite.java:110)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:114)
at groovysh_evaluate.run(groovysh_evaluate:3)
at org.codehaus.groovy.tools.shell.Interpreter.evaluate(Interpreter.groovy:69)org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)

at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:185)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:119)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
在org.codehaus.groovy.tools.shell.ShellRunner.work(ShellRunner.groovy:94)
在org.codehaus.groovy.tools.shell.InteractiveShellRunner.super $ 2 $ work(InteractiveShellRunner.groovy )
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native方法)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect .Method.invoke(Method.java:497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java :324)在groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207
)中在org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:130

。在org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:150)
。在org.codehaus.groovy.tools.shell.InteractiveShellRunner.work(InteractiveShellRunner.groovy:123)
。在有机codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
在org.codehaus.groovy.tools.shell.ShellRunner.run(ShellRunner.groovy: 58)
在org.codehaus.groovy.tools.shell.InteractiveShellRunner.super $ 2 $ run(InteractiveShellRunner.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(本地方法)
在太阳.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
在java.lang.reflect.Method.invoke(Method.java :497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)
处org.codehaus.groovy.runtime org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:130)
。 ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:150)
在org.codehaus.groovy.tools.shell.InteractiveShellRunner.run(InteractiveShellRunner.groovy:82 )
在org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at org.apache.tinkerpop.gremlin.console.Console。(Console.groovy:144)
at org.apache.tinkerpop.gremlin.console.Console.main(Console.groovy:303)org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)

13:42:25 WARN com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager - getDeployment()期间出现意外异常
java.lang.ClassCastException:com.google.cloud.bigtable.hbase1_0.BigtableConnection can not将其转换为org.apache.hadoop.hbase.client.ClusterConnection
,位于org.apache.hadoop.hbase.client.HBaseAdmin。(HBaseAdmin.java:225)
at com.thinkaurelius.titan.diskstorage .hbase.HConnection1_0.getAdmin(HConnection1_0.java:28)
at com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager.getAdminInterface(HBaseStoreManager.java:960)
at com.thinkaurelius.titan.diskstorage .hbase.HBaseStoreManag er.ensureTableExists(HBaseStoreManager.java:747)
at com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager.getLocalKeyPartition(HBaseStoreManager.java:556)
at com.thinkaurelius.titan.diskstorage.hbase。 HBaseStoreManager.getDeployment(HBaseStoreManager.java:347)
at com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager.getFeatures(HBaseStoreManager.java:389)
at com.thinkaurelius.titan.diskstorage.common。 AbstractStoreManager.getMetaDataSchema(AbstractStoreManager.java:44)在com.thinkaurelius.titan.diskstorage.hbase.HBaseKeyColumnValueStore
。(HBaseKeyColumnValueStore.java:67)
在com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager .openDatabase(HBaseStoreManager.java:446)
在com.thinkaurelius.titan.diskstorage.keycolumnvalue.KeyColumnValueStoreManager.openDatabase(KeyColumnValueStoreManager.java:29)
在com.thinkaurelius.titan.diskstorage.Backend.getStandaloneGlobalConfiguration (Backend.java:449)
在com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration。(GraphDatabaseConfiguration.java:1322)
at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:94)
at com。 (com.thinkaurelius)
。 titan.core.TitanFactory $ Builder $ open $ 0.call(Unknown Source)
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus。 groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:110)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:114)
at groovysh_evaluate.run( groovysh_evaluate:3)
在org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
在org.codehaus.groovy.tools.shell.Interpreter.evaluate(Interpreter。 groovy:69)
在org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:185)
在org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:119)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
在org.codehaus.groovy.tools.shell.ShellRunner.work(ShellRunner.groovy:94)
在org.codehaus.groovy.tools.shell.InteractiveShellRunner.super $ 2 $ work(InteractiveShellRunner.groovy)
。在sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)
在sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43 )
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMeth od.java:324)美元,groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207 B $ B)
在org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:130)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:150)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.work(InteractiveShellRunner.groovy:123)
org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at org.codehaus.groovy.tools.shell.ShellRunner.run(ShellRunner.groovy:58)
在org.codehaus.groovy.tools.shell.InteractiveShellRunner.super $ 2 $ run(InteractiveShellRunner.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)$ b $ at java.lang.refl ect.Method.invoke(Method.java:497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod。的java:324)$在groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207 b $ b)
。在org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:130)
在org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:150)
在org.codehaus.groovy.tools.shell.InteractiveShellRunner.run(InteractiveShellRunner.groovy:82)
。在组织.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at org.apache.tinkerpop.gremlin.console.Console。(Console.groovy:144)
at org。 codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at org.apache.tinkerpop.gremlin.console.Console.main(Console.groovy:303)
com.google .cloud.bigtable.hbase1_0.Bigtable连接无法转换为org.apache.hadoop.hbase.client.ClusterConnection

我发现其他问题在其他情况下也是如此:无法连接到Google Bigtable使用HBase REST API
这个补丁是否也解决了我用Titan获得的这个异常? 解决方案 JanusGraph (Titan的一个分支)和 Bigtable ;有关配置详情,请参阅 JanusGraph + Bigtable文档



GitHub托管着 JanusGraph版本


I am trying to connect to Titan 1.0.0 with Hadoop 2 (HBase 1.0.2 client) (available in https://github.com/thinkaurelius/titan/wiki/Downloads) with Google Cloud Bigtable service, using its HBase client.

I could successfully connect to Bigtable from an HBase shell in a GCE instance, by following this procedure. The hbase-site.xml is according to the template, and I have downloaded Bigtable jars for ALPN_VERSION=8.1.5.v20150921 (Oracle JDK SE 1.8.0_60)

<configuration>
  <property>
    <name>hbase.client.connection.impl</name>
    <value>com.google.cloud.bigtable.hbase1_0.BigtableConnection</value>
  </property>
  <property>
    <name>google.bigtable.cluster.name</name>
    <value>[YOUR-CLUSTER-ID]</value>
  </property>
  <property>
    <name>google.bigtable.project.id</name>
    <value>[YOUR-PROJECT-ID]</value>
  </property>
  <property>
    <name>google.bigtable.zone.name</name>
    <value>[YOUR-ZONE-NAME]</value>
  </property>
</configuration>

Then, I copied hbase-site.xml to titan-1.0.0-hadoop2/conf directory, and Bigtable jars to titan-1.0.0-hadoop2/lib folder.

Then, on titan-1.0.0-hadoop2 folder, I run ./run/gremlin.sh and start the console.

Therefore, when trying to create a connection using HBase client (configured to point out to Bigtable cluster)...

TitanGraph graph = TitanFactory.build().set("storage.backend", "hbase").open();

...I get the following exception in the Gremlin console:

com.google.cloud.bigtable.hbase1_0.BigtableConnection cannot be cast to org.apache.hadoop.hbase.client.ClusterConnection

Here is the stack trace:

gremlin> TitanFactory.build().set("storage.backend", "hbase").open();

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/lib/titan-1.0.0-hadoop2/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/lib/titan-1.0.0-hadoop2/lib/logback-classic-1.1.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
13:42:24 WARN  org.apache.hadoop.util.NativeCodeLoader  - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
13:42:25 WARN  com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager  - Unexpected exception during getDeployment()
java.lang.ClassCastException: com.google.cloud.bigtable.hbase1_0.BigtableConnection cannot be cast to org.apache.hadoop.hbase.client.ClusterConnection
    at org.apache.hadoop.hbase.client.HBaseAdmin.(HBaseAdmin.java:225)
    at com.thinkaurelius.titan.diskstorage.hbase.HConnection1_0.getAdmin(HConnection1_0.java:28)
    at com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager.getAdminInterface(HBaseStoreManager.java:960)
    at com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager.ensureTableExists(HBaseStoreManager.java:747)
    at com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager.getLocalKeyPartition(HBaseStoreManager.java:556)
    at com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager.getDeployment(HBaseStoreManager.java:347)
    at com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager.getFeatures(HBaseStoreManager.java:389)
    at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.(GraphDatabaseConfiguration.java:1321)
    at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:94)
    at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:84)
    at com.thinkaurelius.titan.core.TitanFactory$Builder.open(TitanFactory.java:139)
    at com.thinkaurelius.titan.core.TitanFactory$Builder$open$0.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:110)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:114)
    at groovysh_evaluate.run(groovysh_evaluate:3)
    at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
    at org.codehaus.groovy.tools.shell.Interpreter.evaluate(Interpreter.groovy:69)
    at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:185)
    at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
    at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:119)
    at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
    at org.codehaus.groovy.tools.shell.ShellRunner.work(ShellRunner.groovy:94)
    at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$work(InteractiveShellRunner.groovy)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:130)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:150)
    at org.codehaus.groovy.tools.shell.InteractiveShellRunner.work(InteractiveShellRunner.groovy:123)
    at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
    at org.codehaus.groovy.tools.shell.ShellRunner.run(ShellRunner.groovy:58)
    at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$run(InteractiveShellRunner.groovy)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:130)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:150)
    at org.codehaus.groovy.tools.shell.InteractiveShellRunner.run(InteractiveShellRunner.groovy:82)
    at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
    at org.apache.tinkerpop.gremlin.console.Console.(Console.groovy:144)
    at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
    at org.apache.tinkerpop.gremlin.console.Console.main(Console.groovy:303)
13:42:25 WARN  com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager  - Unexpected exception during getDeployment()
java.lang.ClassCastException: com.google.cloud.bigtable.hbase1_0.BigtableConnection cannot be cast to org.apache.hadoop.hbase.client.ClusterConnection
    at org.apache.hadoop.hbase.client.HBaseAdmin.(HBaseAdmin.java:225)
    at com.thinkaurelius.titan.diskstorage.hbase.HConnection1_0.getAdmin(HConnection1_0.java:28)
    at com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager.getAdminInterface(HBaseStoreManager.java:960)
    at com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager.ensureTableExists(HBaseStoreManager.java:747)
    at com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager.getLocalKeyPartition(HBaseStoreManager.java:556)
    at com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager.getDeployment(HBaseStoreManager.java:347)
    at com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager.getFeatures(HBaseStoreManager.java:389)
    at com.thinkaurelius.titan.diskstorage.Backend.getStandaloneGlobalConfiguration(Backend.java:438)
    at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.(GraphDatabaseConfiguration.java:1322)
    at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:94)
    at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:84)
    at com.thinkaurelius.titan.core.TitanFactory$Builder.open(TitanFactory.java:139)
    at com.thinkaurelius.titan.core.TitanFactory$Builder$open$0.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:110)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:114)
    at groovysh_evaluate.run(groovysh_evaluate:3)
    at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
    at org.codehaus.groovy.tools.shell.Interpreter.evaluate(Interpreter.groovy:69)
    at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:185)
    at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
    at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:119)
    at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
    at org.codehaus.groovy.tools.shell.ShellRunner.work(ShellRunner.groovy:94)
    at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$work(InteractiveShellRunner.groovy)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:130)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:150)
    at org.codehaus.groovy.tools.shell.InteractiveShellRunner.work(InteractiveShellRunner.groovy:123)
    at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
    at org.codehaus.groovy.tools.shell.ShellRunner.run(ShellRunner.groovy:58)
    at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$run(InteractiveShellRunner.groovy)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:130)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:150)
    at org.codehaus.groovy.tools.shell.InteractiveShellRunner.run(InteractiveShellRunner.groovy:82)
    at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
    at org.apache.tinkerpop.gremlin.console.Console.(Console.groovy:144)
    at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
    at org.apache.tinkerpop.gremlin.console.Console.main(Console.groovy:303)
13:42:25 WARN  com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager  - Unexpected exception during getDeployment()
java.lang.ClassCastException: com.google.cloud.bigtable.hbase1_0.BigtableConnection cannot be cast to org.apache.hadoop.hbase.client.ClusterConnection
    at org.apache.hadoop.hbase.client.HBaseAdmin.(HBaseAdmin.java:225)
    at com.thinkaurelius.titan.diskstorage.hbase.HConnection1_0.getAdmin(HConnection1_0.java:28)
    at com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager.getAdminInterface(HBaseStoreManager.java:960)
    at com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager.ensureTableExists(HBaseStoreManager.java:747)
    at com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager.getLocalKeyPartition(HBaseStoreManager.java:556)
    at com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager.getDeployment(HBaseStoreManager.java:347)
    at com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager.getFeatures(HBaseStoreManager.java:389)
    at com.thinkaurelius.titan.diskstorage.common.AbstractStoreManager.getMetaDataSchema(AbstractStoreManager.java:44)
    at com.thinkaurelius.titan.diskstorage.hbase.HBaseKeyColumnValueStore.(HBaseKeyColumnValueStore.java:67)
    at com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager.openDatabase(HBaseStoreManager.java:446)
    at com.thinkaurelius.titan.diskstorage.keycolumnvalue.KeyColumnValueStoreManager.openDatabase(KeyColumnValueStoreManager.java:29)
    at com.thinkaurelius.titan.diskstorage.Backend.getStandaloneGlobalConfiguration(Backend.java:449)
    at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.(GraphDatabaseConfiguration.java:1322)
    at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:94)
    at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:84)
    at com.thinkaurelius.titan.core.TitanFactory$Builder.open(TitanFactory.java:139)
    at com.thinkaurelius.titan.core.TitanFactory$Builder$open$0.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:110)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:114)
    at groovysh_evaluate.run(groovysh_evaluate:3)
    at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
    at org.codehaus.groovy.tools.shell.Interpreter.evaluate(Interpreter.groovy:69)
    at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:185)
    at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
    at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:119)
    at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
    at org.codehaus.groovy.tools.shell.ShellRunner.work(ShellRunner.groovy:94)
    at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$work(InteractiveShellRunner.groovy)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:130)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:150)
    at org.codehaus.groovy.tools.shell.InteractiveShellRunner.work(InteractiveShellRunner.groovy:123)
    at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
    at org.codehaus.groovy.tools.shell.ShellRunner.run(ShellRunner.groovy:58)
    at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$run(InteractiveShellRunner.groovy)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:130)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:150)
    at org.codehaus.groovy.tools.shell.InteractiveShellRunner.run(InteractiveShellRunner.groovy:82)
    at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
    at org.apache.tinkerpop.gremlin.console.Console.(Console.groovy:144)
    at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
    at org.apache.tinkerpop.gremlin.console.Console.main(Console.groovy:303)
com.google.cloud.bigtable.hbase1_0.BigtableConnection cannot be cast to org.apache.hadoop.hbase.client.ClusterConnection

I've found other question with the same exception in other context: Unable to connect to Google Bigtable using HBase REST api .
Would that patch also solve this exception I am getting with Titan?

解决方案

Titan is no longer maintained; however, you can use JanusGraph (a fork of Titan) together with Bigtable; see JanusGraph + Bigtable docs for configuration details.

GitHub hosts the JanusGraph releases.

这篇关于无法通过Hbase客户端从Titan连接到Google Bigtable的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆