Java 类org.apache.hadoop.hbase.rest.filter.GzipFilter 实例源码

项目:LCIndex-HBase-0.94.16    文件:HBaseRESTTestingUtility.java   
public void startServletContainer(Configuration conf) throws Exception {
  if (server != null) {
    LOG.error("ServletContainer already running");
    return;
  }

  // Inject the conf for the test by being first to make singleton
  RESTServlet.getInstance(conf);

  // set up the Jersey servlet container for Jetty
  ServletHolder sh = new ServletHolder(ServletContainer.class);
  sh.setInitParameter(
    "com.sun.jersey.config.property.resourceConfigClass",
    ResourceConfig.class.getCanonicalName());
  sh.setInitParameter("com.sun.jersey.config.property.packages",
    "jetty");

  LOG.info("configured " + ServletContainer.class.getName());

  // set up Jetty and run the embedded server
  server = new Server(0);
  server.setSendServerVersion(false);
  server.setSendDateHeader(false);
    // set up context
  Context context = new Context(server, "/", Context.SESSIONS);
  context.addServlet(sh, "/*");
  context.addFilter(GzipFilter.class, "/*", 0);
    // start the server
  server.start();
    // get the port
  testServletPort = server.getConnectors()[0].getLocalPort();

  LOG.info("started " + server.getClass().getName() + " on port " + 
    testServletPort);
}
项目:IRIndex    文件:HBaseRESTTestingUtility.java   
public void startServletContainer(Configuration conf) throws Exception {
  if (server != null) {
    LOG.error("ServletContainer already running");
    return;
  }

  // Inject the conf for the test by being first to make singleton
  RESTServlet.getInstance(conf);

  // set up the Jersey servlet container for Jetty
  ServletHolder sh = new ServletHolder(ServletContainer.class);
  sh.setInitParameter(
    "com.sun.jersey.config.property.resourceConfigClass",
    ResourceConfig.class.getCanonicalName());
  sh.setInitParameter("com.sun.jersey.config.property.packages",
    "jetty");

  LOG.info("configured " + ServletContainer.class.getName());

  // set up Jetty and run the embedded server
  server = new Server(0);
  server.setSendServerVersion(false);
  server.setSendDateHeader(false);
    // set up context
  Context context = new Context(server, "/", Context.SESSIONS);
  context.addServlet(sh, "/*");
  context.addFilter(GzipFilter.class, "/*", 0);
    // start the server
  server.start();
    // get the port
  testServletPort = server.getConnectors()[0].getLocalPort();

  LOG.info("started " + server.getClass().getName() + " on port " + 
    testServletPort);
}
项目:HBase-Research    文件:HBaseRESTTestingUtility.java   
public void startServletContainer(Configuration conf) throws Exception {
  if (server != null) {
    LOG.error("ServletContainer already running");
    return;
  }

  // Inject the conf for the test by being first to make singleton
  RESTServlet.getInstance(conf);

  // set up the Jersey servlet container for Jetty
  ServletHolder sh = new ServletHolder(ServletContainer.class);
  sh.setInitParameter(
    "com.sun.jersey.config.property.resourceConfigClass",
    ResourceConfig.class.getCanonicalName());
  sh.setInitParameter("com.sun.jersey.config.property.packages",
    "jetty");

  LOG.info("configured " + ServletContainer.class.getName());

  // set up Jetty and run the embedded server
  server = new Server(0);
  server.setSendServerVersion(false);
  server.setSendDateHeader(false);
    // set up context
  Context context = new Context(server, "/", Context.SESSIONS);
  context.addServlet(sh, "/*");
  context.addFilter(GzipFilter.class, "/*", 0);
    // start the server
  server.start();
    // get the port
  testServletPort = server.getConnectors()[0].getLocalPort();

  LOG.info("started " + server.getClass().getName() + " on port " + 
    testServletPort);
}
项目:hbase-0.94.8-qod    文件:HBaseRESTTestingUtility.java   
public void startServletContainer(Configuration conf) throws Exception {
  if (server != null) {
    LOG.error("ServletContainer already running");
    return;
  }

  // Inject the conf for the test by being first to make singleton
  RESTServlet.getInstance(conf);

  // set up the Jersey servlet container for Jetty
  ServletHolder sh = new ServletHolder(ServletContainer.class);
  sh.setInitParameter(
    "com.sun.jersey.config.property.resourceConfigClass",
    ResourceConfig.class.getCanonicalName());
  sh.setInitParameter("com.sun.jersey.config.property.packages",
    "jetty");

  LOG.info("configured " + ServletContainer.class.getName());

  // set up Jetty and run the embedded server
  server = new Server(0);
  server.setSendServerVersion(false);
  server.setSendDateHeader(false);
    // set up context
  Context context = new Context(server, "/", Context.SESSIONS);
  context.addServlet(sh, "/*");
  context.addFilter(GzipFilter.class, "/*", 0);
    // start the server
  server.start();
    // get the port
  testServletPort = server.getConnectors()[0].getLocalPort();

  LOG.info("started " + server.getClass().getName() + " on port " + 
    testServletPort);
}
项目:hbase-0.94.8-qod    文件:HBaseRESTTestingUtility.java   
public void startServletContainer(Configuration conf) throws Exception {
  if (server != null) {
    LOG.error("ServletContainer already running");
    return;
  }

  // Inject the conf for the test by being first to make singleton
  RESTServlet.getInstance(conf);

  // set up the Jersey servlet container for Jetty
  ServletHolder sh = new ServletHolder(ServletContainer.class);
  sh.setInitParameter(
    "com.sun.jersey.config.property.resourceConfigClass",
    ResourceConfig.class.getCanonicalName());
  sh.setInitParameter("com.sun.jersey.config.property.packages",
    "jetty");

  LOG.info("configured " + ServletContainer.class.getName());

  // set up Jetty and run the embedded server
  server = new Server(0);
  server.setSendServerVersion(false);
  server.setSendDateHeader(false);
    // set up context
  Context context = new Context(server, "/", Context.SESSIONS);
  context.addServlet(sh, "/*");
  context.addFilter(GzipFilter.class, "/*", 0);
    // start the server
  server.start();
    // get the port
  testServletPort = server.getConnectors()[0].getLocalPort();

  LOG.info("started " + server.getClass().getName() + " on port " + 
    testServletPort);
}
项目:DominoHBase    文件:HBaseRESTTestingUtility.java   
public void startServletContainer(Configuration conf) throws Exception {
  if (server != null) {
    LOG.error("ServletContainer already running");
    return;
  }

  // Inject the conf for the test by being first to make singleton
  RESTServlet.getInstance(conf);

  // set up the Jersey servlet container for Jetty
  ServletHolder sh = new ServletHolder(ServletContainer.class);
  sh.setInitParameter(
    "com.sun.jersey.config.property.resourceConfigClass",
    ResourceConfig.class.getCanonicalName());
  sh.setInitParameter("com.sun.jersey.config.property.packages",
    "jetty");

  LOG.info("configured " + ServletContainer.class.getName());

  // set up Jetty and run the embedded server
  server = new Server(0);
  server.setSendServerVersion(false);
  server.setSendDateHeader(false);
    // set up context
  Context context = new Context(server, "/", Context.SESSIONS);
  context.addServlet(sh, "/*");
  context.addFilter(GzipFilter.class, "/*", 0);
    // start the server
  server.start();
    // get the port
  testServletPort = server.getConnectors()[0].getLocalPort();

  LOG.info("started " + server.getClass().getName() + " on port " + 
    testServletPort);
}
项目:hindex    文件:HBaseRESTTestingUtility.java   
public void startServletContainer(Configuration conf) throws Exception {
  if (server != null) {
    LOG.error("ServletContainer already running");
    return;
  }

  // Inject the conf for the test by being first to make singleton
  RESTServlet.getInstance(conf);

  // set up the Jersey servlet container for Jetty
  ServletHolder sh = new ServletHolder(ServletContainer.class);
  sh.setInitParameter(
    "com.sun.jersey.config.property.resourceConfigClass",
    ResourceConfig.class.getCanonicalName());
  sh.setInitParameter("com.sun.jersey.config.property.packages",
    "jetty");

  LOG.info("configured " + ServletContainer.class.getName());

  // set up Jetty and run the embedded server
  server = new Server(0);
  server.setSendServerVersion(false);
  server.setSendDateHeader(false);
    // set up context
  Context context = new Context(server, "/", Context.SESSIONS);
  context.addServlet(sh, "/*");
  context.addFilter(GzipFilter.class, "/*", 0);
    // start the server
  server.start();
    // get the port
  testServletPort = server.getConnectors()[0].getLocalPort();

  LOG.info("started " + server.getClass().getName() + " on port " + 
    testServletPort);
}