Search in sources :

Example 1 with TFramedTransport

use of org.apache.storm.thrift.transport.TFramedTransport in project storm by apache.

the class SimpleTransportPlugin method connect.

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

Aggregations

TFramedTransport (org.apache.storm.thrift.transport.TFramedTransport)1 TTransport (org.apache.storm.thrift.transport.TTransport)1