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
This commit is contained in:
Andrew Kyle Purtell 2009-05-05 21:44:25 +00:00
parent 6d5cbbdc25
commit 1a2a1764ad
1 changed files with 7 additions and 9 deletions

View File

@ -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.TCell;
import org.apache.hadoop.hbase.thrift.generated.TRowResult; import org.apache.hadoop.hbase.thrift.generated.TRowResult;
import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.hbase.util.Bytes;
import org.apache.thrift.TException; 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.protocol.TProtocolFactory;
import org.apache.thrift.server.THsHaServer;
import org.apache.thrift.server.TServer; import org.apache.thrift.server.TServer;
import org.apache.thrift.transport.TNonblockingServerSocket; import org.apache.thrift.server.TThreadPoolServer;
import org.apache.thrift.transport.TNonblockingServerTransport; import org.apache.thrift.transport.TServerSocket;
import org.apache.thrift.transport.TServerTransport;
/** /**
* ThriftServer - this class starts up a Thrift server which implements the * ThriftServer - this class starts up a Thrift server which implements the
@ -613,10 +612,9 @@ public class ThriftServer {
Integer.toString(port)); Integer.toString(port));
HBaseHandler handler = new HBaseHandler(); HBaseHandler handler = new HBaseHandler();
Hbase.Processor processor = new Hbase.Processor(handler); Hbase.Processor processor = new Hbase.Processor(handler);
TNonblockingServerTransport serverTransport = TServerTransport serverTransport = new TServerSocket(port);
new TNonblockingServerSocket(port); TProtocolFactory protFactory = new TBinaryProtocol.Factory(true, true);
TProtocolFactory protFactory = new TCompactProtocol.Factory(); TServer server = new TThreadPoolServer(processor, serverTransport,
TServer server = new THsHaServer(processor, serverTransport,
protFactory); protFactory);
server.serve(); server.serve();
} }