无法使用hbase rest api连接到google bigtable

uplii1fm  于 2021-06-09  发布在  Hbase
关注(0)|答案(1)|浏览(370)

在本例中,运行测试脚本“pythonput\u get\u with \u client.py”会导致400错误(错误请求)。
错误的请求java.lang.classcastexception:org.apache.hadoop.hbase.client.bigtableconnection无法转换为org.apache.hadoop.hbase.client.clusterconnection,位于org.apache.hadoop.hbase.client.connectionmanager.createconnection(connectionmanager)。java:410)在org.apache.hadoop.hbase.client.connectionmanager.createconnection(connectionmanager。java:370)在org.apache.hadoop.hbase.client.hconnectionmanager.createconnection(hconnectionmanager。java:197)在org.apache.hadoop.hbase.util.connectioncache.getcurrentconnection(connectioncache。java:170)在org.apache.hadoop.hbase.util.connectioncache.getadmin(连接缓存。java:124)在org.apache.hadoop.hbase.rest.restservlet.getadmin(restservlet。java:102)在org.apache.hadoop.hbase.rest.rootresource.gettablelist(rootresource。java:64)在org.apache.hadoop.hbase.rest.rootresource.get(rootresource。java:80)在sun.reflect.nativemethodaccessorimpl.invoke0(本机方法)位于sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl)。java:57)在sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl。java:43)在java.lang.reflect.method.invoke(方法。java:606)在com.sun.jersey.spi.container.javamethodinvokerfactory$1.invoke(javamethodinvokerfactory)。java:60)位于com.sun.jersey.server.impl.model.method.dispatch.abstractresourcemethoddispatchprovider$responseoutinvoker.\u dispatch(abstractresourcemethoddispatchprovider)。java:205)在com.sun.jersey.server.impl.model.method.dispatch.resourcejavamethoddispatcher.dispatch(resourcejavamethoddispatcher)。java:75)在com.sun.jersey.server.impl.uri.rules.httpmethodrule.accept(httpmethodrule。java:288)在com.sun.jersey.server.impl.uri.rules.resourceclassrule.accept(resourceclassrule。java:108)在com.sun.jersey.server.impl.uri.rules.righthandpathrule.accept(righthandpathrule。java:147)在com.sun.jersey.server.impl.uri.rules.rootresourceClasseRule.accept(rootresourceClasseRule。java:84)在com.sun.jersey.server.impl.application.webapplicationimpl.\u handlerequest(webapplicationimpl。java:1469)在com.sun.jersey.server.impl.application.webapplicationimpl.\u handlerequest(webapplicationimpl。java:1400)在com.sun.jersey.server.impl.application.webapplicationimpl.handlerequest(webapplicationimpl。java:1349)在com.sun.jersey.server.impl.application.webapplicationimpl.handlerequest(webapplicationimpl。java:1339)在com.sun.jersey.spi.container.servlet.webcomponent.service(网络组件。java:416)在com.sun.jersey.spi.container.servlet.servletcontainer.service(servletcontainer。java:537)在com.sun.jersey.spi.container.servlet.servletcontainer.service(servletcontainer。java:699)在javax.servlet.http.httpservlet.service(httpservlet。java:820)在org.mortbay.jetty.servlet.servletholder.handle(servletholder。java:511)位于org.mortbay.jetty.servlet.servlethandler$cachedchain.dofilter(servlethandler。java:1221)在org.apache.hadoop.hbase.rest.filter.gzipfilter.dofilter(gzipfilter。java:76)位于org.mortbay.jetty.servlet.servlethandler$cachedchain.dofilter(servlethandler。java:1212)在org.mortbay.jetty.servlet.servlethandler.handle(servlethandler。java:399)位于org.mortbay.jetty.servlet.sessionhandler.handle(sessionhandler。java:182)在org.mortbay.jetty.security.securityhandler.handle(securityhandler。java:216)在org.mortbay.jetty.handler.contexthandler.handle(contexthandler。java:766)在org.mortbay.jetty.handler.handlerwrapper.handle(handlerwrapper。java:152)在org.mortbay.jetty.server.handle(server。java:326)在org.mortbay.jetty.httpconnection.handlerequest(httpconnection。java:542)在org.mortbay.jetty.httpconnection$requesthandler.headercomplete(httpconnection。java:928)在org.mortbay.jetty.httpparser.parsenext(httpparser。java:549)在org.mortbay.jetty.httpparser.parseavailable(httpparser。java:212)位于org.mortbay.jetty.httpconnection.handle(httpconnection。java:404)在org.mortbay.io.nio.selectchannelendpoint.run(selectchannelendpoint。java:410)在org.mortbay.thread.queuedthreadpool$poolthread.run(queuedthreadpool。java:582)
所以,我猜bigtableconnection没有实现clusterconnection接口?这个例子正确吗?

gmol1639

gmol16391#

正如上面的评论所提到的,我们已经向ApacheHBase项目提交了修补程序来修复rest和thrift——它们也已经被接受和集成。当我们等待一个包含它们的版本发布时,我们发布了一个1.0.1的临时fork来帮助您处理这个问题。我们将删除这个叉一旦这些变化是合并。

相关问题