Examples of TFramedTransport


Examples of org.apache.thrift.transport.TFramedTransport

    public static Cassandra.Client createConnection(String host, Integer port, boolean framed)
            throws IOException
    {
        TSocket socket = new TSocket(host, port);
        TTransport trans = framed ? new TFramedTransport(socket) : socket;
        try
        {
            trans.open();
        }
        catch (TTransportException e)
View Full Code Here

Examples of org.apache.thrift.transport.TFramedTransport

  private void talkToThriftServer() throws Exception {
    TSocket sock = new TSocket(InetAddress.getLocalHost().getHostName(),
        port);
    TTransport transport = sock;
    if (specifyFramed || implType.isAlwaysFramed) {
      transport = new TFramedTransport(transport);
    }

    sock.open();
    try {
      TProtocol prot;
View Full Code Here

Examples of org.apache.thrift.transport.TFramedTransport

    public static final int DEFAULT_MAX_FRAME_SIZE = 15 * 1024 * 1024; // 15 MiB

    public TTransport getTransport(TTransport base)
    {
        return new TFramedTransport(base, DEFAULT_MAX_FRAME_SIZE);
    }
View Full Code Here

Examples of org.apache.thrift.transport.TFramedTransport

                return;

            // create connection using thrift
            String location = getLocation();
            socket = new TSocket(location, ConfigHelper.getInputRpcPort(conf));
            TBinaryProtocol binaryProtocol = new TBinaryProtocol(new TFramedTransport(socket));
            client = new Cassandra.Client(binaryProtocol);
            socket.open();

            // log in
            client.set_keyspace(keyspace);
View Full Code Here

Examples of org.apache.thrift.transport.TFramedTransport

        if (transport != null)
            transport.close();

        if (sessionState.framed)
        {
            transport = new TFramedTransport(socket);
        }
        else
        {
            transport = socket;
        }
View Full Code Here

Examples of org.apache.thrift.transport.TFramedTransport

                return;

            // create connection using thrift
            String location = getLocation();
            socket = new TSocket(location, ConfigHelper.getRpcPort(conf));
            TBinaryProtocol binaryProtocol = new TBinaryProtocol(new TFramedTransport(socket));
            client = new Cassandra.Client(binaryProtocol);
            socket.open();

            // log in
            client.set_keyspace(keyspace);
View Full Code Here

Examples of org.apache.thrift.transport.TFramedTransport

                return;

            // create connection using thrift
            String location = getLocation();
            socket = new TSocket(location, ConfigHelper.getInputRpcPort(conf));
            TBinaryProtocol binaryProtocol = new TBinaryProtocol(new TFramedTransport(socket));
            client = new Cassandra.Client(binaryProtocol);
            socket.open();

            // log in
            client.set_keyspace(keyspace);
View Full Code Here

Examples of org.apache.thrift.transport.TFramedTransport

    public static Cassandra.Client createConnection(String host, Integer port, boolean framed)
            throws IOException
    {
        TSocket socket = new TSocket(host, port);
        TTransport trans = framed ? new TFramedTransport(socket) : socket;
        try
        {
            trans.open();
        }
        catch (TTransportException e)
View Full Code Here

Examples of org.apache.thrift.transport.TFramedTransport

        }

        private static Cassandra.Client createThriftClient(String host, int port) throws TTransportException
        {
            TSocket socket = new TSocket(host, port);
            TTransport trans = new TFramedTransport(socket);
            trans.open();
            TProtocol protocol = new TBinaryProtocol(trans);
            return new Cassandra.Client(protocol);
        }
View Full Code Here

Examples of org.apache.thrift.transport.TFramedTransport

        if (transport != null)
            transport.close();

        if (sessionState.framed)
        {
            transport = new TFramedTransport(socket);
        }
        else
        {
            transport = socket;
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.