Package org.apache.thrift.transport

Examples of org.apache.thrift.transport.TTransport.open()


   
    try {
      transport = TTimeoutTransport.create(org.apache.accumulo.core.util.AddressUtil.parseAddress(address, port),
          conf.getTimeInMillis(Property.GENERAL_RPC_TIMEOUT));
      transport = ThriftUtil.transportFactory().getTransport(transport);
      transport.open();
      TTransport tmp = transport;
      transport = null;
      return tmp;
    } catch (IOException ex) {
      throw new TTransportException(ex);
View Full Code Here


      } catch (IOException ex) {
        throw new TTransportException(ex);
      }
    }
    transport = ThriftUtil.transportFactory().getTransport(transport);
    transport.open();
   
    if (log.isTraceEnabled())
      log.trace("Creating new connection to connection to " + cacheKey.getLocation() + ":" + cacheKey.getPort());
   
    CachedTTransport tsc = new CachedTTransport(transport, cacheKey);
View Full Code Here

        TTransport transport = new TSocket(host, port);
        TProtocol protocol = new TBinaryProtocol(transport, true, true);
        Hbase.Client client = new Hbase.Client(protocol);

        transport.open();

        byte[] t = bytes("demo_table");

        //
        // Scan all tables, look for the demo table and delete it.
View Full Code Here

        TTransport transport = new TSocket(host, port);
        TProtocol protocol = new TBinaryProtocol(transport, true, true);
        Hbase.Client client = new Hbase.Client(protocol);

        transport.open();

        byte[] t = bytes("demo_table");

        //
        // Scan all tables, look for the demo table and delete it.
View Full Code Here

  }
 
  private void getScanner(InetAddress thriftAddress) throws Exception {
    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(HConstants.META_TABLE_NAME,
View Full Code Here

      TTransport transport;
      try {
        transport = new TSocket(host, port);
        TProtocol protocol = new TBinaryProtocol(transport);
        Client client = new Client(protocol);
        transport.open();
        client.append(evt);
        transport.close();
      } catch (TTransportException e) {
        e.printStackTrace();
      } catch (TException e) {
View Full Code Here

    {
        TSocket socket = new TSocket(host, port);
        TTransport trans = framed ? new TFramedTransport(socket) : socket;
        try
        {
            trans.open();
        }
        catch (TTransportException e)
        {
            throw new IOException("unable to connect to server", e);
        }
View Full Code Here

                                    200000);
        transport               = new TFramedTransport(transport);
        TProtocol  protocol     = new TBinaryProtocol(transport);

        Cassandra.Client client = new Cassandra.Client(protocol);
        transport.open();

        return client;
    }

    private void waitForClusterInitialization()
View Full Code Here

        /**
         * CONNECT TEST
         */
        System.out.println("Test #" + (test+1) + ", " + "connect " + host + ":" + port);
        try {
          transport.open();
        } catch (TTransportException ttx) {
          System.out.println("Connect failed: " + ttx.getMessage());
          continue;
        }

View Full Code Here

    try {
      TTransport transport;
      if (args[0].contains("simple")) {
        transport = new TSocket("localhost", 9090);
        transport.open();
      }
      else {
        /*
         * Similar to the server, you can use the parameters to setup client parameters or
         * use the default settings. On the client side, you will need a TrustStore which
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.