Package org.apache.thrift.server

Examples of org.apache.thrift.server.TThreadPoolServer


    public void StartGfacServer(GfacService.Processor<GfacServerHandler> gfacServerHandlerProcessor)
            throws Exception {
        try {
            final int serverPort = Integer.parseInt(ServerSettings.getSetting(Constants.GFAC_SERVER_PORT, "8950"));
      TServerTransport serverTransport = new TServerSocket(serverPort);
            server = new TThreadPoolServer(new TThreadPoolServer.Args(serverTransport).processor(gfacServerHandlerProcessor));

            new Thread() {
        public void run() {
          server.serve();
          setStatus(IServer.ServerStatus.STOPPED);
View Full Code Here


     
            //server = new TSimpleServer(
              //      new TServer.Args(serverTransport).processor(orchestratorServerHandlerProcessor));
            TThreadPoolServer.Args options = new TThreadPoolServer.Args(serverTransport);
            options.minWorkerThreads = Integer.parseInt(ServerSettings.getSetting(Constants.ORCHESTRATOT_SERVER_MIN_THREADS, "30"));
            server = new TThreadPoolServer(options.processor(orchestratorServerHandlerProcessor));

            new Thread() {
        public void run() {
          server.serve();
          setStatus(ServerStatus.STOPPED);
View Full Code Here

    try {
      InetSocketAddress bindAddr = new InetSocketAddress(host, port);
      serverTransport = new TServerSocket(bindAddr);
      ThriftFlumeEventServer.Processor processor =
          new ThriftFlumeEventServer.Processor(new ThriftFlumeEventServerImpl());
      server = new TThreadPoolServer(new TThreadPoolServer.
          Args(serverTransport).processor(processor));
    } catch (TTransportException e) {
      e.printStackTrace();
      return;
    }
View Full Code Here

    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);
    return new TThreadPoolServer(serverArgs);
  }
View Full Code Here

      } else {
        transportFactory = new TTransportFactory();
      }

      LOG.info("starting HBase ThreadPool Thrift server on " + listenAddress + ":" + Integer.toString(listenPort));
      server = new TThreadPoolServer(processor, serverTransport, transportFactory, protocolFactory);
    }

    server.serve();
  }
View Full Code Here

    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);
    return new TThreadPoolServer(serverArgs);
  }
View Full Code Here

    try {
      InetSocketAddress bindAddr = new InetSocketAddress(host, port);
      serverTransport = new TServerSocket(bindAddr);
      ThriftFlumeEventServer.Processor processor =
          new ThriftFlumeEventServer.Processor(new ThriftFlumeEventServerImpl());
      server = new TThreadPoolServer(new TThreadPoolServer.
          Args(serverTransport).processor(processor));
    } catch (TTransportException e) {
      throw new FlumeException("Failed starting source", e);
    }
    ThriftHandler thriftHandler = new ThriftHandler(server);
View Full Code Here

      Integer.toString(port));
    HBaseHandler handler = new HBaseHandler();
    Hbase.Processor processor = new Hbase.Processor(handler);
    TServerTransport serverTransport = new TServerSocket(port);
    TProtocolFactory protFactory = new TBinaryProtocol.Factory(true, true);
    TServer server = new TThreadPoolServer(processor, serverTransport,
      protFactory);
    server.serve();
  }
View Full Code Here

        .transportFactory(new TTransportFactory())
        .protocolFactory(new TBinaryProtocol.Factory())
        .minWorkerThreads(cli.minWorkerThreads)
        .maxWorkerThreads(cli.maxWorkerThreads);

      TServer server = new TThreadPoolServer(sargs);

      String msg = "Starting hive server on port " + cli.port
        + " with " + cli.minWorkerThreads + " min worker threads and "
        + cli.maxWorkerThreads + " max worker threads";
      HiveServerHandler.LOG.info(msg);
      if (cli.isVerbose()) {
        System.err.println(msg);
      }

      server.serve();
    } catch (Exception x) {
      x.printStackTrace();
    }
  }
View Full Code Here

                    } else {
                        args.inputTransportFactory(new TFramedTransport.Factory(frame));
                        args.outputTransportFactory(new TFramedTransport.Factory(frame));
                    }

                    server = new TThreadPoolServer(args);
                } catch (Exception e) {
                    lastException.set(e);
                    return false;
                }
                return true;
View Full Code Here

TOP

Related Classes of org.apache.thrift.server.TThreadPoolServer

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.