org.apache.accumulo.core.util
Class ThriftUtil
java.lang.Object
org.apache.accumulo.core.util.ThriftUtil
public class ThriftUtil
- extends Object
Method Summary |
static
<T extends org.apache.thrift.TServiceClient>
T |
|
createClient(org.apache.thrift.TServiceClientFactory<T> factory,
org.apache.thrift.transport.TTransport transport)
|
static org.apache.thrift.transport.TTransport |
createClientTransport(com.google.common.net.HostAndPort address,
int timeout,
SslConnectionParams sslParams)
|
static org.apache.thrift.transport.TTransport |
createTransport(com.google.common.net.HostAndPort address,
AccumuloConfiguration conf)
create a transport that is not pooled |
static void |
execute(String address,
AccumuloConfiguration conf,
ClientExec<TabletClientService.Client> exec)
|
static
|
execute(String address,
AccumuloConfiguration conf,
ClientExecReturn<T,TabletClientService.Client> exec)
|
static
<T extends org.apache.thrift.TServiceClient>
T |
|
getClient(org.apache.thrift.TServiceClientFactory<T> factory,
com.google.common.net.HostAndPort address,
AccumuloConfiguration conf)
|
static
<T extends org.apache.thrift.TServiceClient>
T |
|
getClient(org.apache.thrift.TServiceClientFactory<T> factory,
String address,
long timeout,
AccumuloConfiguration configuration)
|
static
<T extends org.apache.thrift.TServiceClient>
T |
|
getClient(org.apache.thrift.TServiceClientFactory<T> factory,
String address,
Property timeoutProperty,
AccumuloConfiguration configuration)
|
static
<T extends org.apache.thrift.TServiceClient>
T |
|
getClientNoTimeout(org.apache.thrift.TServiceClientFactory<T> factory,
String address,
AccumuloConfiguration configuration)
|
static org.apache.thrift.transport.TServerSocket |
getServerSocket(int port,
int timeout,
InetAddress address,
SslConnectionParams params)
|
static TabletClientService.Client |
getTServerClient(String address,
AccumuloConfiguration conf)
|
static TabletClientService.Client |
getTServerClient(String address,
AccumuloConfiguration conf,
long timeout)
|
static org.apache.thrift.protocol.TProtocolFactory |
protocolFactory()
|
static void |
returnClient(org.apache.thrift.TServiceClient iface)
|
static org.apache.thrift.transport.TTransportFactory |
transportFactory()
|
static org.apache.thrift.transport.TTransportFactory |
transportFactory(int maxFrameSize)
|
static org.apache.thrift.transport.TTransportFactory |
transportFactory(long maxFrameSize)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ThriftUtil
public ThriftUtil()
createClient
public static <T extends org.apache.thrift.TServiceClient> T createClient(org.apache.thrift.TServiceClientFactory<T> factory,
org.apache.thrift.transport.TTransport transport)
getClient
public static <T extends org.apache.thrift.TServiceClient> T getClient(org.apache.thrift.TServiceClientFactory<T> factory,
com.google.common.net.HostAndPort address,
AccumuloConfiguration conf)
throws org.apache.thrift.transport.TTransportException
- Throws:
org.apache.thrift.transport.TTransportException
getClientNoTimeout
public static <T extends org.apache.thrift.TServiceClient> T getClientNoTimeout(org.apache.thrift.TServiceClientFactory<T> factory,
String address,
AccumuloConfiguration configuration)
throws org.apache.thrift.transport.TTransportException
- Throws:
org.apache.thrift.transport.TTransportException
getClient
public static <T extends org.apache.thrift.TServiceClient> T getClient(org.apache.thrift.TServiceClientFactory<T> factory,
String address,
Property timeoutProperty,
AccumuloConfiguration configuration)
throws org.apache.thrift.transport.TTransportException
- Throws:
org.apache.thrift.transport.TTransportException
getClient
public static <T extends org.apache.thrift.TServiceClient> T getClient(org.apache.thrift.TServiceClientFactory<T> factory,
String address,
long timeout,
AccumuloConfiguration configuration)
throws org.apache.thrift.transport.TTransportException
- Throws:
org.apache.thrift.transport.TTransportException
returnClient
public static void returnClient(org.apache.thrift.TServiceClient iface)
getTServerClient
public static TabletClientService.Client getTServerClient(String address,
AccumuloConfiguration conf)
throws org.apache.thrift.transport.TTransportException
- Throws:
org.apache.thrift.transport.TTransportException
getTServerClient
public static TabletClientService.Client getTServerClient(String address,
AccumuloConfiguration conf,
long timeout)
throws org.apache.thrift.transport.TTransportException
- Throws:
org.apache.thrift.transport.TTransportException
execute
public static void execute(String address,
AccumuloConfiguration conf,
ClientExec<TabletClientService.Client> exec)
throws AccumuloException,
AccumuloSecurityException
- Throws:
AccumuloException
AccumuloSecurityException
execute
public static <T> T execute(String address,
AccumuloConfiguration conf,
ClientExecReturn<T,TabletClientService.Client> exec)
throws AccumuloException,
AccumuloSecurityException
- Throws:
AccumuloException
AccumuloSecurityException
createTransport
public static org.apache.thrift.transport.TTransport createTransport(com.google.common.net.HostAndPort address,
AccumuloConfiguration conf)
throws org.apache.thrift.TException
- create a transport that is not pooled
- Throws:
org.apache.thrift.TException
transportFactory
public static org.apache.thrift.transport.TTransportFactory transportFactory()
transportFactory
public static org.apache.thrift.transport.TTransportFactory transportFactory(int maxFrameSize)
transportFactory
public static org.apache.thrift.transport.TTransportFactory transportFactory(long maxFrameSize)
protocolFactory
public static org.apache.thrift.protocol.TProtocolFactory protocolFactory()
getServerSocket
public static org.apache.thrift.transport.TServerSocket getServerSocket(int port,
int timeout,
InetAddress address,
SslConnectionParams params)
throws org.apache.thrift.transport.TTransportException
- Throws:
org.apache.thrift.transport.TTransportException
createClientTransport
public static org.apache.thrift.transport.TTransport createClientTransport(com.google.common.net.HostAndPort address,
int timeout,
SslConnectionParams sslParams)
throws org.apache.thrift.transport.TTransportException
- Throws:
org.apache.thrift.transport.TTransportException
Copyright © 2015 Apache Accumulo Project. All rights reserved.