dajobe / hbase-docker

HBase running in Docker
https://hub.docker.com/r/dajobe/hbase/
328 stars 189 forks source link

Change hbase.regionserver.thrift.framed and hbase.regionserver.thrift.compact to True? #27

Open ghost opened 5 years ago

ghost commented 5 years ago

Thanks for providing the container! After pulling the image we notice that hbase.regionserver.thrift.framed is set to False in the configuration file.

However, the HBase official document and Cloudera troubleshooting page recommends to set hbase.regionserver.thrift.framed and hbase.regionserver.thrift.compact to True :

Maybe it's better to enable these two parameters? Thank you!

dajobe commented 5 years ago

I could do this but would this make any other clients fail to connect to the dockerized hbase?

ghost commented 5 years ago

Thank you for your response! Yes. As the Cloudera troubleshooting page says, it may require changes to your client code. This answer gives an example:

  1. If framed transport is enabled We need to modify FROM: from thrift.transport import TTransport transport = TTransport.TBufferedTransport(TSocket.TSocket(host, port)) TO: from thrift.transport.TTransport import TFramedTransport transport = TFramedTransport(TSocket.TSocket(host, port))
    1. If compact protocol is enabled We need to modify FROM: from thrift.protocol import TBinaryProtocol protocol = TBinaryProtocol.TBinaryProtocolAccelerated(transport) TO: from thrift.protocol import TCompactProtocol protocol = TCompactProtocol.TCompactProtocol(transport)