org.apache.accumulo.core.util
Class ThriftUtil

java.lang.Object
  extended by org.apache.accumulo.core.util.ThriftUtil

public class ThriftUtil
extends Object


Nested Class Summary
static class ThriftUtil.TraceProtocol
           
static class ThriftUtil.TraceProtocolFactory
           
 
Constructor Summary
ThriftUtil()
           
 
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 createTransport(InetSocketAddress address, AccumuloConfiguration conf)
          create a transport that is not pooled
static org.apache.thrift.transport.TTransport createTransport(String address, int port, AccumuloConfiguration conf)
          create a transport that is not pooled
static void execute(String address, AccumuloConfiguration conf, ClientExec<TabletClientService.Client> exec)
           
static
<T> T
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, InetSocketAddress address, AccumuloConfiguration conf)
           
static
<T extends org.apache.thrift.TServiceClient>
T
getClient(org.apache.thrift.TServiceClientFactory<T> factory, String address, Property property, AccumuloConfiguration configuration)
           
static
<T extends org.apache.thrift.TServiceClient>
T
getClient(org.apache.thrift.TServiceClientFactory<T> factory, String address, Property property, long timeout, AccumuloConfiguration configuration)
           
static
<T extends org.apache.thrift.TServiceClient>
T
getClient(org.apache.thrift.TServiceClientFactory<T> factory, String address, Property property, Property timeoutProperty, AccumuloConfiguration configuration)
           
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
 

Constructor Detail

ThriftUtil

public ThriftUtil()
Method Detail

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,
                                                                       InetSocketAddress address,
                                                                       AccumuloConfiguration conf)
                                                            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 property,
                                                                       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 property,
                                                                       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,
                                                                       Property property,
                                                                       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(String address,
                                                                     int port,
                                                                     AccumuloConfiguration conf)
                                                              throws org.apache.thrift.TException
create a transport that is not pooled

Throws:
org.apache.thrift.TException

createTransport

public static org.apache.thrift.transport.TTransport createTransport(InetSocketAddress 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()


Copyright © 2013 Apache Accumulo Project. All Rights Reserved.