Package org.apache.thrift.transport

Examples of org.apache.thrift.transport.TServerTransport


    try {
      int port = 10000;
      if (args.length >= 1) {
        port = Integer.parseInt(args[0]);
      }
      TServerTransport serverTransport = new TServerSocket(port);
      ThriftHiveProcessorFactory hfactory = new ThriftHiveProcessorFactory(null);
      TThreadPoolServer.Options options = new TThreadPoolServer.Options();
      TServer server = new TThreadPoolServer(hfactory, serverTransport,
          new TTransportFactory(), new TTransportFactory(),
          new TBinaryProtocol.Factory(), new TBinaryProtocol.Factory(), options);
View Full Code Here


    if(args.length > 0) {
      port = Integer.getInteger(args[0]);
    }
    try {
      TServerTransport serverTransport = new TServerSocket(port);
      Iface handler = new HMSHandler("new db based metaserver");
      FacebookService.Processor processor = new ThriftHiveMetastore.Processor(handler);
      TThreadPoolServer.Options options = new TThreadPoolServer.Options();
      options.minWorkerThreads = 200;
      TServer server = new TThreadPoolServer(processor, serverTransport,
View Full Code Here

    }
  }
 
  private InetSocketAddress startStatsService() throws UnknownHostException {
    GCMonitorService.Processor processor = new GCMonitorService.Processor(TraceWrap.service(this));
    TServerTransport serverTransport = null;
    int port = AccumuloConfiguration.getSystemConfiguration().getPort(Property.GC_PORT);
    try {
      serverTransport = TServerUtils.openPort(port);
    } catch (Exception ex) {
      log.fatal(ex, ex);
View Full Code Here

   
    int port = conf.getPort(Property.TRACE_PORT);
    final ServerSocket sock = ServerSocketChannel.open().socket();
    sock.setReuseAddress(true);
    sock.bind(new InetSocketAddress(port));
    final TServerTransport transport = new TServerSocket(sock);
    TThreadPoolServer.Args options = new TThreadPoolServer.Args(transport);
    options.processor(new SpanReceiver.Processor(new Receiver()));
    server = new TThreadPoolServer(options);
    final InetSocketAddress address = new InetSocketAddress(Accumulo.getLocalAddress(args), sock.getLocalPort());
    registerInZooKeeper(AddressUtil.toString(address));
View Full Code Here

      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

    }
    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

            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

            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

        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

            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

TOP

Related Classes of org.apache.thrift.transport.TServerTransport

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.