Package org.apache.thrift.protocol

Examples of org.apache.thrift.protocol.TBinaryProtocol$Factory


    super.setUp();

    if (standAloneServer) {
      try {
        transport = new TSocket(host, port);
        TProtocol protocol = new TBinaryProtocol(transport);
        client = new HiveClient(protocol);
        transport.open();
      } catch (Throwable e) {
        e.printStackTrace();
      }
View Full Code Here


      try {
        port = Integer.parseInt(hostport[1]);
      } catch (Exception e) {
      }
      transport = new TSocket(host, port);
      TProtocol protocol = new TBinaryProtocol(transport);
      client = new HiveClient(protocol);
      try {
        transport.open();
      } catch (TTransportException e) {
        throw new SQLException("Could not establish connecton to "
View Full Code Here

    TTransport transport = new TSocket(thriftAddress.getHostName(),
        HBaseThriftServerClusterActionHandler.PORT);
    transport.open();
    LOG.info("Connected to thrift server.");
    LOG.info("Waiting for .META. table...");
    TProtocol protocol = new TBinaryProtocol(transport, true, true);
    Hbase.Client client = new Hbase.Client(protocol);
    int scannerId = client.scannerOpen(ByteBuffer.wrap(HConstants.META_TABLE_NAME),
                                       ByteBuffer.wrap(Bytes.toBytes("")), null, null);
    client.scannerClose(scannerId);
    thriftClient = client;
View Full Code Here

      try {
        port = Integer.parseInt(hostport[1]);
      } catch (Exception e) {
      }
      transport = new TSocket(host, port);
      TProtocol protocol = new TBinaryProtocol(transport);
      client = new HiveClient(protocol);
      try {
        transport.open();
      } catch (TTransportException e) {
        throw new SQLException("Could not establish connecton to "
View Full Code Here

     * @throws TTransportException
     */
    private Cassandra.Client getClient() throws TTransportException
    {
        TTransport tr = new TFramedTransport(new TSocket("localhost", DatabaseDescriptor.getRpcPort()));
        TProtocol proto = new TBinaryProtocol(tr);
        Cassandra.Client client = new Cassandra.Client(proto);
        tr.open();
        return client;
    }
View Full Code Here

public class JavaClient {
  public static void main(String [] args) {
    try {

      TTransport transport = new TSocket("localhost", 9090);
      TProtocol protocol = new TBinaryProtocol(transport);
      Calculator.Client client = new Calculator.Client(protocol);

      transport.open();

      client.ping();
View Full Code Here

        tserver.serve();
      }
    };
    t.start();
    TTransport clientTransport = new TSocket(new Socket("localhost", socket.getLocalPort()));
    TestService.Iface client = new TestService.Client(new TBinaryProtocol(clientTransport), new TBinaryProtocol(clientTransport));
    client = TraceWrap.client(client);
    assertFalse(client.checkTrace(null, "test"));
   
    Span start = Trace.on("start");
    assertTrue(client.checkTrace(null, "my test"));
View Full Code Here

                // Thrift boilerplate code
                logEntries = new ArrayList<LogEntry>(1);
                TSocket sock = new TSocket(new Socket(scribe_host, scribe_port));
                transport = new TFramedTransport(sock);
                TBinaryProtocol protocol = new TBinaryProtocol(transport, false, false);
                client = new Client(protocol, protocol);
            }
        } catch (TTransportException e) {
            System.err.println(e);
        } catch (UnknownHostException e) {
View Full Code Here

    {
        try
        {
            TSocket socket = new TSocket(currentNode, port);
            TTransport transport = new TFramedTransport(socket);
            CClient client = new CClient(socket, new TBinaryProtocol(transport), currentNode);
            transport.open();
            return client;
        }
        catch (Exception e)
        {
View Full Code Here

    private void connect() throws TTransportException {
        if (transport != null) {
            transport.close();
        }
        transport = new TFramedTransport(new TSocket(hostName, port, timeOut));
        final TProtocol protocol = new TBinaryProtocol(transport);
        client = new ZipkinCollector.Client(protocol);
        try {
            transport.open();
            sinkCounter.incrementConnectionCreatedCount();
        } catch (final TTransportException e) {
View Full Code Here

TOP

Related Classes of org.apache.thrift.protocol.TBinaryProtocol$Factory

Copyright © 2018 www.massapicom. 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.