Search in sources :

Example 1 with TFramedTransport

use of org.apache.thrift7.transport.TFramedTransport in project storm by nathanmarz.

the class SimpleTransportPlugin method connect.

/**
     * Connect to the specified server via framed transport 
     * @param transport The underlying Thrift transport.
     */
public TTransport connect(TTransport transport, String serverHost) throws TTransportException {
    //create a framed transport
    TTransport conn = new TFramedTransport(transport);
    //connect
    conn.open();
    LOG.debug("Simple client transport has been established");
    return conn;
}
Also used : TFramedTransport(org.apache.thrift7.transport.TFramedTransport) TTransport(org.apache.thrift7.transport.TTransport)

Example 2 with TFramedTransport

use of org.apache.thrift7.transport.TFramedTransport in project storm by nathanmarz.

the class DRPCInvocationsClient method connect.

private void connect() throws TException {
    conn = new TFramedTransport(new TSocket(host, port));
    client = new DistributedRPCInvocations.Client(new TBinaryProtocol(conn));
    conn.open();
}
Also used : TBinaryProtocol(org.apache.thrift7.protocol.TBinaryProtocol) TFramedTransport(org.apache.thrift7.transport.TFramedTransport) DistributedRPCInvocations(backtype.storm.generated.DistributedRPCInvocations) TSocket(org.apache.thrift7.transport.TSocket)

Example 3 with TFramedTransport

use of org.apache.thrift7.transport.TFramedTransport in project storm by nathanmarz.

the class DRPCClient method connect.

private void connect() throws TException {
    TSocket socket = new TSocket(host, port);
    if (timeout != null) {
        socket.setTimeout(timeout);
    }
    conn = new TFramedTransport(socket);
    client = new DistributedRPC.Client(new TBinaryProtocol(conn));
    conn.open();
}
Also used : TBinaryProtocol(org.apache.thrift7.protocol.TBinaryProtocol) DistributedRPC(backtype.storm.generated.DistributedRPC) TFramedTransport(org.apache.thrift7.transport.TFramedTransport) TSocket(org.apache.thrift7.transport.TSocket)

Aggregations

TFramedTransport (org.apache.thrift7.transport.TFramedTransport)3 TBinaryProtocol (org.apache.thrift7.protocol.TBinaryProtocol)2 TSocket (org.apache.thrift7.transport.TSocket)2 DistributedRPC (backtype.storm.generated.DistributedRPC)1 DistributedRPCInvocations (backtype.storm.generated.DistributedRPCInvocations)1 TTransport (org.apache.thrift7.transport.TTransport)1