hbase-docker
hbase-docker copied to clipboard
Change hbase.regionserver.thrift.framed and hbase.regionserver.thrift.compact to True?
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 :
-
This is the recommended transport for thrift servers and requires a similar setting on the client side. Changing this to false will select the default transport, vulnerable to DoS when malformed requests are issued due to THRIFT-601.
-
To prevent the possibility of crashes due to buffer overruns, use the framed and compact transport protocols by setting hbase.regionserver.thrift.framed and hbase.regionserver.thrift.compact to true in hbase-site.xml.
Maybe it's better to enable these two parameters? Thank you!
I could do this but would this make any other clients fail to connect to the dockerized hbase?
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:
- 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)) - 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)
I have the same problem and I need to configure those parameters urgently