Package org.apache.thrift.transport

Examples of org.apache.thrift.transport.TServerTransport


      int minWorkerThreads = conf.getIntVar(HiveConf.ConfVars.METASTORESERVERMINTHREADS);
      int maxWorkerThreads = conf.getIntVar(HiveConf.ConfVars.METASTORESERVERMAXTHREADS);
      boolean tcpKeepAlive = conf.getBoolVar(HiveConf.ConfVars.METASTORE_TCP_KEEP_ALIVE);
      useSasl = conf.getBoolVar(HiveConf.ConfVars.METASTORE_USE_THRIFT_SASL);

      TServerTransport serverTransport = tcpKeepAlive ?
          new TServerSocketKeepAlive(port) : new TServerSocket(port);

      TProcessor processor;
      TTransportFactory transFactory;
      if (useSasl) {
View Full Code Here


        HiveServerHandler.LOG.warn(e.getMessage());
      }

      HiveConf conf = new HiveConf(HiveServerHandler.class);
      ServerUtils.cleanUpScratchDir(conf);
      TServerTransport serverTransport = new TServerSocket(cli.port);

      // set all properties specified on the command line
      for (Map.Entry<Object, Object> item : hiveconf.entrySet()) {
        conf.set((String) item.getKey(), (String) item.getValue());
      }
View Full Code Here

    }
  }

  public static void simple(Calculator.Processor processor) {
    try {
      TServerTransport serverTransport = new TServerSocket(9090);
      TServer server = new TSimpleServer(new Args(serverTransport).processor(processor));

      // Use this for a multithreaded server
      // TServer server = new TThreadPoolServer(new TThreadPoolServer.Args(serverTransport).processor(processor));
View Full Code Here

       * Ex: -Djavax.net.ssl.keyStore=.keystore and -Djavax.net.ssl.keyStorePassword=thrift
       *
       * Note: You need not explicitly call open(). The underlying server socket is bound on return
       * from the factory class.
       */
      TServerTransport serverTransport = TSSLTransportFactory.getServerSocket(9091, 0, null, params);
      TServer server = new TSimpleServer(new Args(serverTransport).processor(processor));

      // Use this for a multi threaded server
      // TServer server = new TThreadPoolServer(new TThreadPoolServer.Args(serverTransport).processor(processor));

View Full Code Here

            AiravataUtils.setExecutionAsServer();
            RegistryInitUtil.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 {
            AiravataUtils.setExecutionAsServer();
            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

    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();
View Full Code Here

    public static class Factory implements TServerFactory
    {
        public TServer buildTServer(Args args)
        {
            final InetSocketAddress addr = args.addr;
            TServerTransport serverTransport;
            try
            {
                final ClientEncryptionOptions clientEnc = DatabaseDescriptor.getClientEncryptionOptions();
                if (clientEnc.enabled)
                {
View Full Code Here

            throws Exception {
        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

            TTransportFactory outTransportFactory = new TFramedTransport.Factory(tFramedTransportSize);
            logger.info("Using TFastFramedTransport with a max frame size of {} bytes.", tFramedTransportSize);
           
            if (DatabaseDescriptor.getRpcServerType().equalsIgnoreCase(SYNC))
            {               
                TServerTransport serverTransport;
                try
                {
                    serverTransport = new TCustomServerSocket(new InetSocketAddress(listenAddr, listenPort),
                                                              DatabaseDescriptor.getRpcKeepAlive(),
                                                              DatabaseDescriptor.getRpcSendBufferSize(),
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.