Examples of TThreadPoolServer


Examples of com.facebook.presto.hive.shaded.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);

      if (startLock != null) {
        signalOtherThreadsToStart(tServer, startLock, startCondition, startedServing);
      }
      tServer.serve();
    } catch (Throwable x) {
      x.printStackTrace();
      HMSHandler.LOG.error(StringUtils.stringifyException(x));
      throw x;
    }
View Full Code Here

Examples of com.facebook.thrift.server.TThreadPoolServer

      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.server.TThreadPoolServer

      Iface handler = new ThriftMetaStoreHandler("hello");
      FacebookService.Processor processor = new ThriftMetaStore.Processor(handler);

      TThreadPoolServer.Options options = new TThreadPoolServer.Options();
      options.minWorkerThreads = 100;
      TServer server = new TThreadPoolServer(processor, serverTransport,
               new TTransportFactory(), new TTransportFactory(),
               new TBinaryProtocol.Factory(), new TBinaryProtocol.Factory(), options);

      ThriftMetaStoreHandler.LOG.info("Starting the metaserver on port [" + port + "]...");

      server.serve();

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

Examples of com.facebook.thrift.server.TThreadPoolServer

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

Examples of com.facebook.thrift.server.TThreadPoolServer

      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,
          new TTransportFactory(), new TTransportFactory(),
          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);
      server.serve();
    } catch (Exception x) {
      x.printStackTrace();
    }
  }
View Full Code Here

Examples of com.facebook.thrift.server.TThreadPoolServer

      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.server.example.TThreadPoolServer

    TThreadPoolServer.Options options = new TThreadPoolServer.Options();
    options.minWorkerThreads =
      options.maxWorkerThreads =
      parser.getNumberOfThreads();

    TServer server = new TThreadPoolServer(procfactory,
                                           transport,
                                           tfactory,
                                           tfactory,
                                           pfactory,
                                           pfactory,
View Full Code Here

Examples of org.apache.thrift.server.TThreadPoolServer

      // Simple Server
      //serverEngine = new TSimpleServer(new Args(tServerSocket).processor(testProcessor));

      // ThreadPool Server
      serverEngine = new TThreadPoolServer(new TThreadPoolServer.Args(tServerSocket).processor(testProcessor).protocolFactory(tProtocolFactory));

      // Run it
      System.out.println("Starting the server on port " + port + "...");
      serverEngine.serve();
View Full Code Here

Examples of org.apache.thrift.server.TThreadPoolServer

                    }

                }
                Class processor = Class.forName(parent.split("\\$")[0] + "$Processor");
                servers.add(
                        new TThreadPoolServer(
                                new TThreadPoolServer
                                        .Args(

                                        new TServerSocket(
                                                Integer.parseInt(entry.getValue().get(".port"))
View Full Code Here

Examples of org.apache.thrift.server.TThreadPoolServer

    TThreadPoolServer.Args sargs = new TThreadPoolServer.Args(serverTransport).processorFactory(hfactory).
        transportFactory(new TTransportFactory()).
        protocolFactory(new TBinaryProtocol.Factory()).
        minWorkerThreads(minThreads).
        maxWorkerThreads(maxThreads);
    server = new TThreadPoolServer(sargs);

    //  Hive 0.7.x (unfortunately it doesn't support passing a configuration object to it)
    //
    //    ThriftHiveProcessorFactory hfactory = new ThriftHiveProcessorFactory(null);
    //    TThreadPoolServer.Options options = new TThreadPoolServer.Options();
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.