public final class ThriftUtils extends Object
Modifier and Type | Method and Description |
---|---|
static org.apache.thrift.protocol.TProtocol |
createThriftProtocol(org.apache.thrift.transport.TTransport transport,
String serviceName) |
static org.apache.thrift.protocol.TProtocolFactory |
createThriftProtocolFactory() |
static org.apache.thrift.transport.TServerSocket |
createThriftServerSocket(InetSocketAddress address)
Creates a new Thrift server socket that listen on the given address.
|
static org.apache.thrift.transport.TSocket |
createThriftSocket(InetSocketAddress address)
Creates a new Thrift socket that will connect to the given address.
|
static int |
getThriftPort(org.apache.thrift.transport.TServerSocket thriftSocket)
Gets the port for the underline socket.
|
static ServerSocket |
getThriftSocket(org.apache.thrift.transport.TServerSocket thriftSocket)
Extracts internal socket from the thrift socket.
|
public static org.apache.thrift.protocol.TProtocol createThriftProtocol(org.apache.thrift.transport.TTransport transport, String serviceName) throws UnauthenticatedException
transport
- a transport for communicating with an Alluxio Thrift serverserviceName
- the service to communicate withUnauthenticatedException
public static org.apache.thrift.protocol.TProtocolFactory createThriftProtocolFactory()
public static org.apache.thrift.transport.TSocket createThriftSocket(InetSocketAddress address)
address
- The given address to connectpublic static org.apache.thrift.transport.TServerSocket createThriftServerSocket(InetSocketAddress address) throws org.apache.thrift.transport.TTransportException
address
- The given address to listen onorg.apache.thrift.transport.TTransportException
public static int getThriftPort(org.apache.thrift.transport.TServerSocket thriftSocket)
thriftSocket
- the underline socketpublic static ServerSocket getThriftSocket(org.apache.thrift.transport.TServerSocket thriftSocket)
thriftSocket
- the underline thrift socketCopyright © 2023. All Rights Reserved.