From 1a2a1764adad96d79b678f047c5960b8b72f8810 Mon Sep 17 00:00:00 2001 From: Andrew Kyle Purtell Date: Tue, 5 May 2009 21:44:25 +0000 Subject: [PATCH] HBASE-1367 Get rid of Thrift Exception 'NotFound'; revert handler/processor/server to prior combination git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@771977 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/hadoop/hbase/thrift/ThriftServer.java | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java b/src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java index c948a77ae08..6526ca9d88a 100644 --- a/src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java +++ b/src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java @@ -51,14 +51,13 @@ import org.apache.hadoop.hbase.thrift.generated.TRegionInfo; import org.apache.hadoop.hbase.thrift.generated.TCell; import org.apache.hadoop.hbase.thrift.generated.TRowResult; import org.apache.hadoop.hbase.util.Bytes; - import org.apache.thrift.TException; -import org.apache.thrift.protocol.TCompactProtocol; +import org.apache.thrift.protocol.TBinaryProtocol; import org.apache.thrift.protocol.TProtocolFactory; -import org.apache.thrift.server.THsHaServer; import org.apache.thrift.server.TServer; -import org.apache.thrift.transport.TNonblockingServerSocket; -import org.apache.thrift.transport.TNonblockingServerTransport; +import org.apache.thrift.server.TThreadPoolServer; +import org.apache.thrift.transport.TServerSocket; +import org.apache.thrift.transport.TServerTransport; /** * ThriftServer - this class starts up a Thrift server which implements the @@ -613,10 +612,9 @@ public class ThriftServer { Integer.toString(port)); HBaseHandler handler = new HBaseHandler(); Hbase.Processor processor = new Hbase.Processor(handler); - TNonblockingServerTransport serverTransport = - new TNonblockingServerSocket(port); - TProtocolFactory protFactory = new TCompactProtocol.Factory(); - TServer server = new THsHaServer(processor, serverTransport, + TServerTransport serverTransport = new TServerSocket(port); + TProtocolFactory protFactory = new TBinaryProtocol.Factory(true, true); + TServer server = new TThreadPoolServer(processor, serverTransport, protFactory); server.serve(); }