Examples of TServlet


Examples of org.apache.blur.thirdparty.thrift_0_9_0.server.TServlet

    shardServer.init();

    Iface iface = BlurUtil.recordMethodCallsAndAverageTimes(shardServer, Iface.class, false);
    if (httpServer != null) {
      WebAppContext context = httpServer.getContext();
      context.addServlet(new ServletHolder(new TServlet(new Blur.Processor<Blur.Iface>(iface),
          new TJSONProtocol.Factory())), "/blur");
      context.addServlet(new ServletHolder(new JSONReporterServlet()), "/livemetrics");
      if (enableJsonReporter) {
        JSONReporter.enable("json-reporter", 1, TimeUnit.SECONDS, 60);
      }
View Full Code Here

Examples of org.apache.blur.thirdparty.thrift_0_9_0.server.TServlet

      httpServer = null;
    }

    if (httpServer != null) {
      WebAppContext context = httpServer.getContext();
      context.addServlet(new ServletHolder(new TServlet(new Blur.Processor<Blur.Iface>(iface),
          new TJSONProtocol.Factory())), "/blur");
      context.addServlet(new ServletHolder(new JSONReporterServlet()), "/livemetrics");
    }

    // This will shutdown the server when the correct path is set in zk
View Full Code Here

Examples of org.apache.blur.thirdparty.thrift_0_9_0.server.TServlet

    iface = BlurUtil.runWithUser(iface, false);
    iface = BlurUtil.runTrace(iface, false);
    iface = BlurUtil.lastChanceErrorHandling(iface, Iface.class);
    if (httpServer != null) {
      WebAppContext context = httpServer.getContext();
      context.addServlet(new ServletHolder(new TServlet(new Blur.Processor<Blur.Iface>(iface),
          new TJSONProtocol.Factory())), "/blur");
      context.addServlet(new ServletHolder(new JSONReporterServlet()), "/livemetrics");
      if (enableJsonReporter) {
        JSONReporter.enable("json-reporter", 1, TimeUnit.SECONDS, 60);
      }
View Full Code Here

Examples of org.apache.thrift.server.TServlet

      // UGI for the hive/_HOST (kerberos) principal
      UserGroupInformation serviceUGI = cliService.getServiceUGI();
      // UGI for the http/_HOST (SPNego) principal
      UserGroupInformation httpUGI = cliService.getHttpUGI();
      String authType = hiveConf.getVar(ConfVars.HIVE_SERVER2_AUTHENTICATION);
      TServlet thriftHttpServlet = new ThriftHttpServlet(processor, protocolFactory, authType,
          serviceUGI, httpUGI);

      // Context handler
      final ServletContextHandler context = new ServletContextHandler(
          ServletContextHandler.SESSIONS);
View Full Code Here

Examples of org.apache.thrift.server.TServlet

        connector.setPort(0);
        httpServer.addConnector(connector);

        List<LogEntry> logEntries = new ArrayList<LogEntry>();
        com.facebook.swift.service.scribe.scribe.Iface handler = new TestThriftServletHandler(logEntries);
        TServlet servlet = new TestThriftServlet(handler, logEntries);

        ServletContextHandler contextHandler = new ServletContextHandler(ServletContextHandler.SESSIONS);
        contextHandler.setContextPath("/thrift");
        contextHandler.addServlet(new ServletHolder(servlet), "/*");

 
View Full Code Here

Examples of org.apache.thrift.server.TServlet

        connector.setPort(0);
        httpServer.addConnector(connector);

        List<LogEntry> logEntries = new ArrayList<LogEntry>();
        com.facebook.swift.service.scribe.scribe.Iface handler = new TestThriftServletHandler(logEntries);
        TServlet servlet = new TestThriftServlet(handler, logEntries);

        ServletContextHandler contextHandler = new ServletContextHandler(ServletContextHandler.SESSIONS);
        contextHandler.setContextPath("/thrift");
        contextHandler.addServlet(new ServletHolder(servlet), "/*");

 
View Full Code Here

Examples of org.apache.thrift.server.TServlet

      TProcessorFactory processorFactory = hiveAuthFactory.getAuthProcFactory(this);
      TProcessor processor = processorFactory.getProcessor(null);

      TProtocolFactory protocolFactory = new TBinaryProtocol.Factory();

      TServlet thriftHttpServlet = new ThriftHttpServlet(processor, protocolFactory,
          authType, serviceUGI, httpUGI);

      final ServletContextHandler context = new ServletContextHandler(
          ServletContextHandler.SESSIONS);
      context.setContextPath("/");
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.