Examples of TServerTransport


Examples of org.apache.thrift.transport.TServerTransport

      sock.bind(new InetSocketAddress(port));
      port = sock.getLocalPort();
    } catch (IOException ex) {
      throw new TTransportException(ex);
    }
    TServerTransport transport = new TBufferedServerSocket(sock, 32 * 1024);
    TThreadPoolServer.Args options = new TThreadPoolServer.Args(transport);
    options.protocolFactory(ThriftUtil.protocolFactory());
    options.transportFactory(ThriftUtil.transportFactory());
    processor = new TServerUtils.TimedProcessor(processor, serverName, threadName);
    options.processorFactory(new ClientInfoProcessorFactory(processor));
View Full Code Here

Examples of org.apache.thrift.transport.TServerTransport

    }
    if (!registeredProcessor) {
      throw new IllegalStateException(
          "Failed to register any processors from " + processorFactories);
    }
    TServerTransport serverTransport = new TServerSocket(address);
    TTransportFactory transportFactory = null;
    if (kerberos) {
      TSaslServerTransport.Factory saslTransportFactory = new TSaslServerTransport.Factory();
      saslTransportFactory.addServerDefinition(AuthMethod.KERBEROS
          .getMechanismName(), principalParts[0], principalParts[1],
View Full Code Here

Examples of org.apache.thrift.transport.TServerTransport

            AiravataUtils.setExecutionAsServer();
            AppCatalogInitUtil.initializeDB();
            final int serverPort = Integer.parseInt(ServerSettings.getSetting(Constants.APP_CATALOG_SERVER_PORT,"8931"));
            final String serverHost = ServerSettings.getSetting(Constants.APP_CATALOG_SERVER_HOST, null);
           
      TServerTransport serverTransport;
     
      if(serverHost == null){
        serverTransport = new TServerSocket(serverPort);
      }else{
        InetSocketAddress inetSocketAddress = new InetSocketAddress(serverHost, serverPort);
View Full Code Here

Examples of org.apache.thrift.transport.TServerTransport

            RegistryInitUtil.initializeDB();
            AppCatalogInitUtil.initializeDB();
            final int serverPort = Integer.parseInt(ServerSettings.getSetting(Constants.API_SERVER_PORT,"8930"));
            final String serverHost = ServerSettings.getSetting(Constants.API_SERVER_HOST, null);
           
      TServerTransport serverTransport;
     
      if(serverHost == null){
        serverTransport = new TServerSocket(serverPort);
      }else{
        InetSocketAddress inetSocketAddress = new InetSocketAddress(serverHost, serverPort);
View Full Code Here

Examples of org.apache.thrift.transport.TServerTransport

        try {
            final int serverPort = Integer.parseInt(ServerSettings.getSetting(Constants.ORCHESTRATOT_SERVER_PORT,"8940"));

            final String serverHost = ServerSettings.getSetting(Constants.ORCHESTRATOT_SERVER_HOST, null);
           
      TServerTransport serverTransport;
     
      if(serverHost == null){
        serverTransport = new TServerSocket(serverPort);
      }else{
        InetSocketAddress inetSocketAddress = new InetSocketAddress(serverHost, serverPort);
View Full Code Here

Examples of org.apache.thrift.transport.TServerTransport

            final int serverPort = Integer.parseInt(ServerSettings.getSetting(Constants.GFAC_SERVER_PORT, "8950"));
            final String serverHost = ServerSettings.getSetting(Constants.GFAC_SERVER_HOST, null);

            InetSocketAddress inetSocketAddress = new InetSocketAddress(serverHost, serverPort);

      TServerTransport serverTransport = new TServerSocket(inetSocketAddress);

            server = new TThreadPoolServer(new TThreadPoolServer.Args(serverTransport).processor(gfacServerHandlerProcessor));

            new Thread() {
        public void run() {
View Full Code Here

Examples of org.apache.thrift.transport.TServerTransport

      int maxWorkerThreads = conf.getIntVar(HiveConf.ConfVars.METASTORESERVERMAXTHREADS);
      boolean tcpKeepAlive = conf.getBoolVar(HiveConf.ConfVars.METASTORE_TCP_KEEP_ALIVE);
      boolean useFramedTransport = conf.getBoolVar(ConfVars.METASTORE_USE_THRIFT_FRAMED_TRANSPORT);
      useSasl = conf.getBoolVar(HiveConf.ConfVars.METASTORE_USE_THRIFT_SASL);

      TServerTransport serverTransport = tcpKeepAlive ?
          new TServerSocketKeepAlive(port) : new TServerSocket(port);

      TProcessor processor;
      TTransportFactory transFactory;
      if (useSasl) {
View Full Code Here

Examples of org.apache.thrift.transport.TServerTransport

          " server on " + Integer.toString(listenPort));
    } else if (implType == ImplType.THREAD_POOL) {
      // Thread pool server. Get the IP address to bind to.
      InetAddress listenAddress = getBindAddress(conf);

      TServerTransport serverTransport = new TServerSocket(
          new InetSocketAddress(listenAddress, listenPort));

      TBoundedThreadPoolServer.Args serverArgs =
          new TBoundedThreadPoolServer.Args(serverTransport, conf);
      serverArgs.processor(processor)
View Full Code Here

Examples of org.apache.thrift.transport.TServerTransport

            Long.MAX_VALUE, TimeUnit.SECONDS, callQueue, tfb.build());
  }

  private static TServer getTThreadPoolServer(TProtocolFactory protocolFactory, THBaseService.Processor processor,
      TTransportFactory transportFactory, InetSocketAddress inetSocketAddress) throws TTransportException {
    TServerTransport serverTransport = new TServerSocket(inetSocketAddress);
    log.info("starting HBase ThreadPool Thrift server on " + inetSocketAddress.toString());
    TThreadPoolServer.Args serverArgs = new TThreadPoolServer.Args(serverTransport);
    serverArgs.processor(processor);
    serverArgs.transportFactory(transportFactory);
    serverArgs.protocolFactory(protocolFactory);
View Full Code Here

Examples of org.apache.thrift.transport.TServerTransport

      sock.bind(new InetSocketAddress(port));
      port = sock.getLocalPort();
    } catch (IOException ex) {
      throw new TTransportException(ex);
    }
    TServerTransport transport = new TBufferedServerSocket(sock, 32 * 1024);
    TThreadPoolServer.Args options = new TThreadPoolServer.Args(transport);
    options.protocolFactory(ThriftUtil.protocolFactory());
    options.transportFactory(ThriftUtil.transportFactory());
    processor = new TServerUtils.TimedProcessor(processor, serverName, threadName);
    options.processorFactory(new ClientInfoProcessorFactory(processor));
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.