Examples of TThreadPoolServer


Examples of org.apache.thrift.server.TThreadPoolServer

      TServerSocket socket = new TServerSocket(port);
      Classifier.Processor processor = new Classifier.Processor(
          modelHandler);

      TProtocolFactory protocol = new TBinaryProtocol.Factory(true, true);
      server = new TThreadPoolServer(
          new TThreadPoolServer.Args(socket).processor(processor));

      log.warn("Starting server on port {}", port);
      server.serve();
    } finally {
View Full Code Here

Examples of org.apache.thrift.server.TThreadPoolServer

        TProtocolFactory tProtocolFactory = new TBinaryProtocol.Factory();

        // ThreadPool Server
        TThreadPoolServer.Options options = new TThreadPoolServer.Options();
        options.minWorkerThreads = 64;
        serverEngine = new TThreadPoolServer(new TProcessorFactory(processor),
                                             tServerSocket,
                                             new TTransportFactory(),
                                             new TTransportFactory(),
                                             tProtocolFactory,
                                             tProtocolFactory,
View Full Code Here

Examples of org.apache.thrift.server.TThreadPoolServer

                protocolFactory(new TBinaryProtocol.Factory());           
        if (serverTransportFactory != null)
            server_args.transportFactory(serverTransportFactory);

        //construct THsHaServer
        return new TThreadPoolServer(server_args);
    }
View Full Code Here

Examples of org.apache.thrift.server.TThreadPoolServer

    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

Examples of org.apache.thrift.server.TThreadPoolServer

    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

Examples of org.apache.thrift.server.TThreadPoolServer

      }

      TThreadPoolServer.Options options = new TThreadPoolServer.Options();
      options.minWorkerThreads = minWorkerThreads;
      options.maxWorkerThreads = maxWorkerThreads;
      TServer tServer = new TThreadPoolServer(processor, serverTransport,
          transFactory, transFactory,
          new TBinaryProtocol.Factory(), new TBinaryProtocol.Factory(), options);
      HMSHandler.LOG.info("Started the new metaserver on port [" + port
          + "]...");
      HMSHandler.LOG.info("Options.minWorkerThreads = "
          + options.minWorkerThreads);
      HMSHandler.LOG.info("Options.maxWorkerThreads = "
          + options.maxWorkerThreads);
      HMSHandler.LOG.info("TCP keepalive = " + tcpKeepAlive);
      tServer.serve();
    } catch (Throwable x) {
      x.printStackTrace();
      HMSHandler.LOG.error(StringUtils.stringifyException(x));
      throw x;
    }
View Full Code Here

Examples of org.apache.thrift.server.TThreadPoolServer

        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);
      HiveServerHandler.LOG.info("Starting hive server on port " + port);
      server.serve();
    } catch (Exception x) {
      x.printStackTrace();
    }
  }
View Full Code Here

Examples of org.apache.thrift.server.TThreadPoolServer

          .transportFactory(transFactory)
          .protocolFactory(new TBinaryProtocol.Factory())
          .minWorkerThreads(minWorkerThreads)
          .maxWorkerThreads(maxWorkerThreads);

      TServer tServer = new TThreadPoolServer(args);
      HMSHandler.LOG.info("Started the new metaserver on port [" + port
          + "]...");
      HMSHandler.LOG.info("Options.minWorkerThreads = "
          + minWorkerThreads);
      HMSHandler.LOG.info("Options.maxWorkerThreads = "
          + maxWorkerThreads);
      HMSHandler.LOG.info("TCP keepalive = " + tcpKeepAlive);
      tServer.serve();
    } catch (Throwable x) {
      x.printStackTrace();
      HMSHandler.LOG.error(StringUtils.stringifyException(x));
      throw x;
    }
View Full Code Here

Examples of org.apache.thrift.server.TThreadPoolServer

        }

        // ThreadPool Server
        TThreadPoolServer.Options options = new TThreadPoolServer.Options();
        options.minWorkerThreads = 64;
        serverEngine = new TThreadPoolServer(new TProcessorFactory(processor),
                                             tServerSocket,
                                             inTransportFactory,
                                             outTransportFactory,
                                             tProtocolFactory,
                                             tProtocolFactory,
View Full Code Here

Examples of org.apache.thrift.server.TThreadPoolServer

        }

        // ThreadPool Server
        TThreadPoolServer.Options options = new TThreadPoolServer.Options();
        options.minWorkerThreads = 64;
        serverEngine = new TThreadPoolServer(new TProcessorFactory(processor),
                                             tServerSocket,
                                             inTransportFactory,
                                             outTransportFactory,
                                             tProtocolFactory,
                                             tProtocolFactory,
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.