hbase-docker icon indicating copy to clipboard operation
hbase-docker copied to clipboard

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

Open ghost opened this issue 6 years ago • 3 comments

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!

ghost avatar Apr 24 '19 04:04 ghost

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

dajobe avatar Apr 27 '19 22:04 dajobe

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))
  2. 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)

ghost avatar Aug 15 '19 16:08 ghost

I have the same problem and I need to configure those parameters urgently

oitediresacajamarca avatar Aug 12 '22 05:08 oitediresacajamarca