HBASE-8826 Ensure HBASE-8695 is covered in Thrift 2

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1501968 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Lars George 2013-07-10 20:28:44 +00:00
parent d390841912
commit 552932953f
1 changed files with 4 additions and 2 deletions

View File

@ -260,14 +260,16 @@ public class ThriftServer {
registerFilters(conf); registerFilters(conf);
// Construct correct ProtocolFactory // Construct correct ProtocolFactory
boolean compact = cmd.hasOption("compact"); boolean compact = cmd.hasOption("compact") ||
conf.getBoolean("hbase.regionserver.thrift.compact", false);
TProtocolFactory protocolFactory = getTProtocolFactory(compact); TProtocolFactory protocolFactory = getTProtocolFactory(compact);
THBaseService.Iface handler = THBaseService.Iface handler =
ThriftHBaseServiceHandler.newInstance(conf, metrics); ThriftHBaseServiceHandler.newInstance(conf, metrics);
THBaseService.Processor processor = new THBaseService.Processor(handler); THBaseService.Processor processor = new THBaseService.Processor(handler);
conf.setBoolean("hbase.regionserver.thrift.compact", compact); conf.setBoolean("hbase.regionserver.thrift.compact", compact);
boolean framed = cmd.hasOption("framed") || nonblocking || hsha; boolean framed = cmd.hasOption("framed") ||
conf.getBoolean("hbase.regionserver.thrift.framed", false) || nonblocking || hsha;
TTransportFactory transportFactory = getTTransportFactory(framed); TTransportFactory transportFactory = getTTransportFactory(framed);
InetSocketAddress inetSocketAddress = bindToPort(cmd.getOptionValue("bind"), listenPort); InetSocketAddress inetSocketAddress = bindToPort(cmd.getOptionValue("bind"), listenPort);
conf.setBoolean("hbase.regionserver.thrift.framed", framed); conf.setBoolean("hbase.regionserver.thrift.framed", framed);