hbase-python
hbase-python copied to clipboard
hbase.exceptions.RequestError: org.apache.hadoop.hbase.exceptions.UnknownProtocolException
hbase 2.1.0 python 3.6
my code
import hbase
zk = '172.25.33.230:2181,172.25.33.231:2181,172.25.33.232:2181'
def test():
with hbase.ConnectionPool( zk ).connect() as conn:
table = conn['hbase']['TraceV2']
table.count()
exit()
if __name__ == '__main__':
test()
Exception as below :
Traceback (most recent call last):
File "D:/wehotel_product/untitled/test-hbase/main.py", line 18, in <module>
test()
File "D:/wehotel_product/untitled/test-hbase/main.py", line 13, in test
table.count()
File "D:\wehotel_product\untitled\venv\lib\site-packages\hbase\table.py", line 204, in count
batch_size=500
File "D:\wehotel_product\untitled\venv\lib\site-packages\hbase\table.py", line 477, in __next__
batch = self._client.iter_scanner(self.scanner)
File "D:\wehotel_product\untitled\venv\lib\site-packages\hbase\client\client.py", line 1259, in iter_scanner
region = self._region_manager.get_region(scanner.__table__, start_key)
File "D:\wehotel_product\untitled\venv\lib\site-packages\hbase\client\region.py", line 199, in get_region
region = self._region_lookup(meta_key)
File "D:\wehotel_product\untitled\venv\lib\site-packages\hbase\client\region.py", line 258, in _region_lookup
resp = self._meta_service.request(req)
File "D:\wehotel_product\untitled\venv\lib\site-packages\hbase\services\services.py", line 61, in request
return self._request.call(pb_req)
File "D:\wehotel_product\untitled\venv\lib\site-packages\hbase\services\request.py", line 192, in call
raise exceptions.RequestError(error)
hbase.exceptions.RequestError: org.apache.hadoop.hbase.exceptions.UnknownProtocolException
when I check the response , find header error info
call_id: 0
exception {
exception_class_name: "org.apache.hadoop.hbase.exceptions.UnknownProtocolException"
stack_trace: "org.apache.hadoop.hbase.exceptions.UnknownProtocolException: Is this a pre-hbase-1.0.0 or asynchbase client? Client is invoking getClosestRowBefore removed in hbase-2.0.0 replaced by reverse Scan.\n\tat org.apache.hadoop.hbase.regionserver.RSRpcServices.get(RSRpcServices.java:2445)\n\tat org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:41998)\n\tat org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:409)\n\tat org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:130)\n\tat org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:324)\n\tat org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:304)\n"
do_not_retry: true
}
there any problem ? please help me