Package org.apache.thrift.protocol

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


    InetSocketAddress address = NetUtils.createSocketAddr(conf
        .getClusterManagerAddress());
    TFramedTransport transport = new TFramedTransport(
      new TSocket(address.getHostName(), address.getPort()));
    ClusterManagerService.Client client = new ClusterManagerService.Client(
        new TBinaryProtocol(transport));
    transport.open();
    return client;
  }
View Full Code Here


    InetSocketAddress address =
      NetUtils.createSocketAddr(conf.getProxyJobTrackerThriftAddress());
    TFramedTransport transport = new TFramedTransport(
      new TSocket(address.getHostName(), address.getPort()));
    CoronaProxyJobTrackerService.Client client =
      new CoronaProxyJobTrackerService.Client(new TBinaryProtocol(transport));
    try {
      transport.open();
    } catch (TException e) {
      LOG.info("Transport Exception: ", e);
    }
View Full Code Here

      LOG.info("Assigning session id " + sessionId + " to connection to " + host + ":" + port);

      try {
        TTransport transport = new TFramedTransport(new TSocket(host, port));
        transport.open();
        TProtocol protocol = new TBinaryProtocol(transport);
        ClientConsole.Client client = new ClientConsole.Client(protocol);

        // Store the info about this RPC connection in the active sessions table.
        UserSession session = new UserSession(sessionId, transport, client);
        session.subscribeToClose(this);
View Full Code Here

      // Establish the connection to the server.
      LOG.debug("Connecting to remote server.");
      mTransport = new TFramedTransport(new TSocket(mHost, mPort));
      mTransport.open();

      TProtocol protocol = new TBinaryProtocol(mTransport);
      mClient = new RemoteServer.Client(protocol);

      String consoleHost = null;
      int consolePort = 0;
      try {
View Full Code Here

      host = mConf.get(FLUME_MASTER_HOST_KEY, DEFAULT_FLUME_MASTER_HOST);
      port = mConf.getInt(FLUME_MASTER_PORT_KEY, DEFAULT_FLUME_MASTER_PORT);
    }
   
    TTransport masterTransport = new TSocket(host, port);
    TProtocol protocol = new TBinaryProtocol(masterTransport);
    masterTransport.open();
    mMasterClient = new Client(protocol);
  }
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

    try {
      TProtocol prot;
      if (specifyCompact) {
        prot = new TCompactProtocol(transport);
      } else {
        prot = new TBinaryProtocol(transport);
      }
      Hbase.Client client = new Hbase.Client(prot);
      TestThriftServer.doTestTableCreateDrop(client);
      TestThriftServer.doTestGetTableRegions(client);
      TestThriftServer.doTestTableMutations(client);
View Full Code Here

  /**
   * Connect to Hive Server
   */
  public void connect() throws TTransportException {
    transport = new TSocket(host, port);
    TProtocol protocol = new TBinaryProtocol(transport);
    client = new HiveClient(protocol);
    transport.open();
    remoteMode = true;
  }
View Full Code Here

    StorageDescriptor sd = new StorageDescriptor();
    try {
      // replace with THRIFT-138
      TMemoryBuffer buffer = new TMemoryBuffer(1024);
      TBinaryProtocol prot = new TBinaryProtocol(buffer);
      tbl.getTTable().getSd().write(prot);

      sd.read(prot);
    } catch (TException e) {
      LOG.error("Could not create a copy of StorageDescription");
View Full Code Here

          LOG.error("Couldn't create client transport", ioe);
          throw new MetaException(ioe.toString());
        }
     }

     TProtocol protocol = new TBinaryProtocol(transport);
     client = new ThriftHiveMetastore.Client(protocol);

     try {
        transport.open();
        isConnected = true;
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.