Examples of TBinaryProtocol


Examples of com.evernote.thrift.protocol.TBinaryProtocol

      for (Map.Entry<String, String> header : customHeaders.entrySet()) {
        transport.setCustomHeader(header.getKey(), header.getValue());
      }
    }

    TProtocol protocol = new TBinaryProtocol(transport);
    try {
      return clientClass.getDeclaredConstructor(TProtocol.class,
          TProtocol.class, String.class).newInstance(protocol, protocol, token);
    } catch (Throwable e) {
      throw new RuntimeException("Couldn't create " + clientClass.getName()
View Full Code Here

Examples of com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TBinaryProtocol

{
    private final TTransport transport;

    public HiveMetastoreClient(TTransport transport)
    {
        super(new TBinaryProtocol(transport));
        this.transport = transport;
    }
View Full Code Here

Examples of com.facebook.thrift.protocol.TBinaryProtocol

        port = Integer.parseInt(hostport[1]);
      }
      catch (Exception e) {
      }
      TTransport transport = new TSocket(host, port);
      TProtocol protocol = new TBinaryProtocol(transport);
      client = new HiveClient(protocol);
      transport.open();
    }
  }
View Full Code Here

Examples of com.facebook.thrift.protocol.TBinaryProtocol

  public void open(URI store) throws TException {
    this.open = false;
    if(store.getScheme().equals("thrift")) {
      transport = new TSocket(store.getHost(), store.getPort());
      ((TSocket)transport).setTimeout(2000);
      TProtocol protocol = new TBinaryProtocol(transport);
      client = new ThriftMetaStore.Client(protocol);

      for(int i = 0; i < retries && !this.open; ++i) {
        try {
          transport.open();
View Full Code Here

Examples of com.facebook.thrift.protocol.TBinaryProtocol

    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

Examples of com.facebook.thrift.protocol.TBinaryProtocol

  protected void setUp() throws Exception {
    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

Examples of com.facebook.thrift.protocol.TBinaryProtocol

  private void openStore(URI store) throws MetaException {
    open = false;
    transport = new TSocket(store.getHost(), store.getPort());
    ((TSocket)transport).setTimeout(20000);
    TProtocol protocol = new TBinaryProtocol(transport);
    client = new ThriftHiveMetastore.Client(protocol);

    for(int i = 0; i < retries && !this.open; ++i) {
      try {
        transport.open();
View Full Code Here

Examples of com.facebook.thrift.protocol.TBinaryProtocol

  }
 
  private void run() throws IOError, TException, NotFound, IllegalArgument,
      AlreadyExists {
    TTransport transport = new TSocket("localhost", port);
    TProtocol protocol = new TBinaryProtocol(transport, true, true);
    Hbase.Client client = new Hbase.Client(protocol);

    transport.open();

    byte[] t = bytes("demo_table");
View Full Code Here

Examples of org.apache.blur.thirdparty.thrift_0_9_0.protocol.TBinaryProtocol

    socket.setTcpNoDelay(true);
    socket.setSoTimeout(timeout);
    socket.connect(new InetSocketAddress(host, port), timeout);
    trans = new TSocket(socket);

    TProtocol proto = new TBinaryProtocol(new TFramedTransport(trans));
    Client client = new Client(proto);
    return client;
  }
View Full Code Here

Examples of org.apache.cassandra.thrift.TBinaryProtocol

        for (String seed : seeds_)
        {
            try
            {
                TSocket socket = new TSocket(seed, port_);
                TBinaryProtocol binaryProtocol = new TBinaryProtocol(new TFramedTransport(socket));
                Cassandra.Client client = new Cassandra.Client(binaryProtocol);
                socket.open();

                List<TokenRange> ring = client.describe_ring(keyspace);
                rangeMap = ArrayListMultimap.create();
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.