Examples of TServerSocket


Examples of com.facebook.presto.hive.shaded.org.apache.thrift.transport.TServerSocket

      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) {
        // we are in secure mode.
View Full Code Here

Examples of com.facebook.thrift.transport.TServerSocket

    Log LOG = LogFactory.getLog("ThriftServer");
    LOG.info("starting HBase Thrift server on port " +
      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

Examples of com.facebook.thrift.transport.TServerSocket

    if(args.length > 0) {
      port = Integer.getInteger(args[0]);
    }
    try {
      TServerTransport serverTransport = new TServerSocket(port);
      Iface handler = new ThriftMetaStoreHandler("hello");
      FacebookService.Processor processor = new ThriftMetaStore.Processor(handler);

      TThreadPoolServer.Options options = new TThreadPoolServer.Options();
      options.minWorkerThreads = 100;
View Full Code Here

Examples of com.facebook.thrift.transport.TServerSocket

    try {
      int port = 10000;
      if (args.length >= 1) {
        port = Integer.parseInt(args[0]);
      }
      TServerTransport serverTransport = new TServerSocket(port);
      Iface handler = new HiveServerHandler();
      FacebookService.Processor processor = new ThriftHive.Processor(handler);
      TThreadPoolServer.Options options = new TThreadPoolServer.Options();
      TServer server = new TThreadPoolServer(processor, serverTransport,
          new TTransportFactory(), new TTransportFactory(),
View Full Code Here

Examples of com.facebook.thrift.transport.TServerSocket

    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

Examples of com.facebook.thrift.transport.TServerSocket

    Log LOG = LogFactory.getLog("ThriftServer");
    LOG.info("starting HBase Thrift server on port " +
      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

Examples of org.apache.thrift.transport.TServerSocket

          " 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.TServerSocket

        new TestHandler();
      ThriftTest.Processor testProcessor =
        new ThriftTest.Processor(testHandler);

      // Transport
      TServerSocket tServerSocket =
        new TServerSocket(port);

      // Protocol factory
      TProtocolFactory tProtocolFactory =
        new TBinaryProtocol.Factory();
View Full Code Here

Examples of org.apache.thrift.transport.TServerSocket

                servers.add(
                        new TThreadPoolServer(
                                new TThreadPoolServer
                                        .Args(

                                        new TServerSocket(
                                                Integer.parseInt(entry.getValue().get(".port"))
                                        ))
                                        .protocolFactory(new TCompactProtocol.Factory())
                                        .processor((TProcessor) processor.getConstructor(Class.forName(parent)).newInstance(clzz.newInstance()))
                                        .minWorkerThreads((Integer.parseInt(entry.getValue().get(".min_threads"))))
View Full Code Here

Examples of org.apache.thrift.transport.TServerSocket

    Configuration cfg = ConfigurationUtils.createFrom(configuration, properties);

    conf = new HiveConf(cfg, HiveServerHandler.class);

    ServerUtils.cleanUpScratchDir(conf);
    TServerTransport serverTransport = new TServerSocket(port);

    // Hive 0.8.0
    ThriftHiveProcessorFactory hfactory = new ThriftHiveProcessorFactory(null, conf);

    TThreadPoolServer.Args sargs = new TThreadPoolServer.Args(serverTransport).processorFactory(hfactory).
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.