Package org.apache.thrift7

Examples of org.apache.thrift7.TDeserializer


        public boolean process(final TProtocol inProt, final TProtocol outProt) throws TException {
            //populating request context
            ReqContext req_context = ReqContext.context();

            TTransport trans = inProt.getTransport();
            if (trans instanceof TMemoryInputTransport) {
                try {
                    req_context.setRemoteAddress(InetAddress.getLocalHost());
                } catch (UnknownHostException e) {
                    throw new RuntimeException(e);
View Full Code Here


            }           
            TSocket socket = new TSocket(host, port);
            if(timeout!=null) {
                socket.setTimeout(timeout);
            }
            final TTransport underlyingTransport = socket;

            //establish client-server transport via plugin
            _transport =  transportPlugin.connect(underlyingTransport, host);
        } catch (IOException ex) {
            throw new RuntimeException(ex);
View Full Code Here

        public boolean process(final TProtocol inProt, final TProtocol outProt) throws TException {
            //populating request context
            ReqContext req_context = ReqContext.context();

            TTransport trans = inProt.getTransport();
            //Sasl transport
            TSaslServerTransport saslTrans = (TSaslServerTransport)trans;

            //remote address
            TSocket tsocket = (TSocket)saslTrans.getUnderlyingTransport();
View Full Code Here

     * Connect to the specified server via framed transport
     * @param transport The underlying Thrift transport.
     */
    public TTransport connect(TTransport transport, String serverHost) throws TTransportException {
        //create a framed transport
        TTransport conn = new TFramedTransport(transport);

        //connect
        conn.open();
        LOG.debug("Simple client transport has been established");

        return conn;
    }
View Full Code Here

        public boolean process(final TProtocol inProt, final TProtocol outProt) throws TException {
            //populating request context
            ReqContext req_context = ReqContext.context();

            TTransport trans = inProt.getTransport();
            if (trans instanceof TMemoryInputTransport) {
                try {
                    req_context.setRemoteAddress(InetAddress.getLocalHost());
                } catch (UnknownHostException e) {
                    throw new RuntimeException(e);
View Full Code Here

            }           
            TSocket socket = new TSocket(host, port);
            if(timeout!=null) {
                socket.setTimeout(timeout);
            }
            final TTransport underlyingTransport = socket;

            //establish client-server transport via plugin
            _transport =  transportPlugin.connect(underlyingTransport, host);
        } catch (IOException ex) {
            throw new RuntimeException(ex);
View Full Code Here

   *            The underlying Thrift transport.
   */
  public TTransport connect(TTransport transport, String serverHost)
      throws TTransportException {
    // create a framed transport
    TTransport conn = new TFramedTransport(transport);

    // connect
    conn.open();
    LOG.debug("Simple client transport has been established");

    return conn;
  }
View Full Code Here

    public boolean process(final TProtocol inProt, final TProtocol outProt)
        throws TException {
      // populating request context
      ReqContext req_context = ReqContext.context();

      TTransport trans = inProt.getTransport();
      if (trans instanceof TMemoryInputTransport) {
        try {
          req_context.setRemoteAddress(InetAddress.getLocalHost());
        } catch (UnknownHostException e) {
          throw new RuntimeException(e);
View Full Code Here

//      /***************only test for daily *************/
      TSocket socket = new TSocket(host, port);
      if (timeout != null) {
        socket.setTimeout(timeout);
      }
      final TTransport underlyingTransport = socket;

      // establish client-server transport via plugin
      _transport = transportPlugin.connect(underlyingTransport, host);
    } catch (IOException ex) {
      throw new RuntimeException("Create transport error");
View Full Code Here

    public void prepare(Map storm_conf, Configuration login_conf) {       
        this.login_conf = login_conf;
    }

    public TServer getServer(int port, TProcessor processor) throws IOException, TTransportException {
        TTransportFactory serverTransportFactory = getServerTransportFactory();

        //define THsHaServer args
        //original: THsHaServer + TNonblockingServerSocket
        //option: TThreadPoolServer + TServerSocket
        TServerSocket serverTransport = new TServerSocket(port);
View Full Code Here

TOP

Related Classes of org.apache.thrift7.TDeserializer

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.