@InterfaceAudience.LimitedPrivate(value="Tools") public class ThriftServer extends org.apache.hadoop.conf.Configured implements org.apache.hadoop.util.Tool
Modifier and Type | Field and Description |
---|---|
(package private) static String |
BACKLOG_CONF_KEY |
static int |
DEFAULT_LISTEN_PORT |
private static org.slf4j.Logger |
log |
private static String |
READ_TIMEOUT_OPTION |
(package private) static String |
THRIFT_QOP_KEY
Thrift quality of protection configuration key.
|
static int |
THRIFT_SERVER_SOCKET_READ_TIMEOUT_DEFAULT |
static String |
THRIFT_SERVER_SOCKET_READ_TIMEOUT_KEY
Amount of time in milliseconds before a server thread will timeout
waiting for client to send data on a connected socket.
|
Constructor and Description |
---|
ThriftServer() |
Modifier and Type | Method and Description |
---|---|
private static InetSocketAddress |
bindToPort(String bindValue,
int listenPort) |
private static ExecutorService |
createExecutor(int workerThreads,
int maxCallQueueSize,
ThriftMetrics metrics) |
private static org.apache.hbase.thirdparty.org.apache.commons.cli.Options |
getOptions() |
private static org.apache.thrift.server.TServer |
getTHsHaServer(org.apache.thrift.protocol.TProtocolFactory protocolFactory,
org.apache.thrift.TProcessor processor,
org.apache.thrift.transport.TTransportFactory transportFactory,
int workerThreads,
int maxCallQueueSize,
InetSocketAddress inetSocketAddress,
ThriftMetrics metrics) |
private static org.apache.thrift.server.TServer |
getTNonBlockingServer(org.apache.thrift.protocol.TProtocolFactory protocolFactory,
org.apache.thrift.TProcessor processor,
org.apache.thrift.transport.TTransportFactory transportFactory,
InetSocketAddress inetSocketAddress) |
private static org.apache.thrift.protocol.TProtocolFactory |
getTProtocolFactory(boolean isCompact) |
private static org.apache.thrift.server.TServer |
getTThreadedSelectorServer(org.apache.thrift.protocol.TProtocolFactory protocolFactory,
org.apache.thrift.TProcessor processor,
org.apache.thrift.transport.TTransportFactory transportFactory,
int workerThreads,
int selectorThreads,
int maxCallQueueSize,
InetSocketAddress inetSocketAddress,
ThriftMetrics metrics) |
private static org.apache.thrift.server.TServer |
getTThreadPoolServer(org.apache.thrift.protocol.TProtocolFactory protocolFactory,
org.apache.thrift.TProcessor processor,
org.apache.thrift.transport.TTransportFactory transportFactory,
int workerThreads,
InetSocketAddress inetSocketAddress,
int backlog,
int clientTimeout,
ThriftMetrics metrics) |
private static org.apache.thrift.transport.TTransportFactory |
getTTransportFactory(SaslUtil.QualityOfProtection qop,
String name,
String host,
boolean framed,
int frameSize) |
static void |
main(String[] args)
Start up the Thrift2 server.
|
private static org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine |
parseArguments(org.apache.hadoop.conf.Configuration conf,
org.apache.hbase.thirdparty.org.apache.commons.cli.Options options,
String[] args) |
private static void |
printUsage() |
protected static void |
registerFilters(org.apache.hadoop.conf.Configuration conf)
Adds the option to pre-load filters at startup.
|
int |
run(String[] args) |
private static final org.slf4j.Logger log
static final String THRIFT_QOP_KEY
static final String BACKLOG_CONF_KEY
public static final int DEFAULT_LISTEN_PORT
private static final String READ_TIMEOUT_OPTION
public static final String THRIFT_SERVER_SOCKET_READ_TIMEOUT_KEY
public static final int THRIFT_SERVER_SOCKET_READ_TIMEOUT_DEFAULT
public ThriftServer()
private static void printUsage()
private static org.apache.hbase.thirdparty.org.apache.commons.cli.Options getOptions()
private static org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine parseArguments(org.apache.hadoop.conf.Configuration conf, org.apache.hbase.thirdparty.org.apache.commons.cli.Options options, String[] args) throws org.apache.hbase.thirdparty.org.apache.commons.cli.ParseException, IOException
org.apache.hbase.thirdparty.org.apache.commons.cli.ParseException
IOException
private static org.apache.thrift.protocol.TProtocolFactory getTProtocolFactory(boolean isCompact)
private static org.apache.thrift.transport.TTransportFactory getTTransportFactory(SaslUtil.QualityOfProtection qop, String name, String host, boolean framed, int frameSize)
private static InetSocketAddress bindToPort(String bindValue, int listenPort) throws UnknownHostException
UnknownHostException
private static org.apache.thrift.server.TServer getTNonBlockingServer(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.TProcessor processor, org.apache.thrift.transport.TTransportFactory transportFactory, InetSocketAddress inetSocketAddress) throws org.apache.thrift.transport.TTransportException
org.apache.thrift.transport.TTransportException
private static org.apache.thrift.server.TServer getTHsHaServer(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.TProcessor processor, org.apache.thrift.transport.TTransportFactory transportFactory, int workerThreads, int maxCallQueueSize, InetSocketAddress inetSocketAddress, ThriftMetrics metrics) throws org.apache.thrift.transport.TTransportException
org.apache.thrift.transport.TTransportException
private static org.apache.thrift.server.TServer getTThreadedSelectorServer(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.TProcessor processor, org.apache.thrift.transport.TTransportFactory transportFactory, int workerThreads, int selectorThreads, int maxCallQueueSize, InetSocketAddress inetSocketAddress, ThriftMetrics metrics) throws org.apache.thrift.transport.TTransportException
org.apache.thrift.transport.TTransportException
private static ExecutorService createExecutor(int workerThreads, int maxCallQueueSize, ThriftMetrics metrics)
private static org.apache.thrift.server.TServer getTThreadPoolServer(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.TProcessor processor, org.apache.thrift.transport.TTransportFactory transportFactory, int workerThreads, InetSocketAddress inetSocketAddress, int backlog, int clientTimeout, ThriftMetrics metrics) throws org.apache.thrift.transport.TTransportException
org.apache.thrift.transport.TTransportException
protected static void registerFilters(org.apache.hadoop.conf.Configuration conf)
conf
- The current configuration instance.public static void main(String[] args) throws Exception
Exception
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.