Examples of TProtocol


Examples of com.evernote.thrift.protocol.TProtocol

      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.thrift.protocol.TProtocol

        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.TProtocol

  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.TProtocol

  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.TProtocol

  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.TProtocol

  }
 
  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 com.facebook.thrift.protocol.TProtocol

 
  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.TProtocol

    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.blur.thirdparty.thrift_0_9_0.protocol.TProtocol

    /**
     * Actually invoke the method signified by this FrameBuffer.
     */
    public void invoke() {
      TTransport inTrans = getInputTransport();
      TProtocol inProt = inputProtocolFactory_.getProtocol(inTrans);
      TProtocol outProt = outputProtocolFactory_.getProtocol(getOutputTransport());

      try {
        processorFactory_.getProcessor(inTrans).process(inProt, outProt);
        responseReady();
        return;
View Full Code Here

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

    while (!stopped_) {
      TTransport client = null;
      TProcessor processor = null;
      TTransport inputTransport = null;
      TTransport outputTransport = null;
      TProtocol inputProtocol = null;
      TProtocol outputProtocol = null;
      ServerContext connectionContext = null;
      try {
        client = serverTransport_.accept();
        if (client != null) {
          processor = processorFactory_.getProcessor(client);
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.