org.apache.hadoop.http.HttpServer.addServlet()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(6.2k)|赞(0)|评价(0)|浏览(137)

本文整理了Java中org.apache.hadoop.http.HttpServer.addServlet()方法的一些代码示例,展示了HttpServer.addServlet()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpServer.addServlet()方法的具体详情如下:
包路径:org.apache.hadoop.http.HttpServer
类名称:HttpServer
方法名:addServlet

HttpServer.addServlet介绍

[英]Add a servlet in the server.
[中]在服务器中添加servlet。

代码示例

代码示例来源:origin: io.hops/hadoop-common

/**
 * Add default servlets.
 */
protected void addDefaultServlets() {
 // set up default servlets
 addServlet("stacks", "/stacks", StackServlet.class);
 addServlet("logLevel", "/logLevel", LogLevel.Servlet.class);
 addServlet("metrics", "/metrics", MetricsServlet.class);
 addServlet("jmx", "/jmx", JMXJsonServlet.class);
 addServlet("conf", "/conf", ConfServlet.class);
}

代码示例来源:origin: com.github.jiayuhan-it/hadoop-common

/**
 * Add default servlets.
 */
protected void addDefaultServlets() {
 // set up default servlets
 addServlet("stacks", "/stacks", StackServlet.class);
 addServlet("logLevel", "/logLevel", LogLevel.Servlet.class);
 addServlet("metrics", "/metrics", MetricsServlet.class);
 addServlet("jmx", "/jmx", JMXJsonServlet.class);
 addServlet("conf", "/conf", ConfServlet.class);
}

代码示例来源:origin: com.facebook.hadoop/hadoop-core

/**
 * Add default servlets.
 */
protected void addDefaultServlets() {
 // set up default servlets
 addServlet("stacks", "/stacks", StackServlet.class);
 addServlet("logLevel", "/logLevel", LogLevel.Servlet.class);
 addServlet("metrics", "/metrics", MetricsServlet.class);
    addServlet("conf", "/conf", ConfServlet.class);
 }

代码示例来源:origin: io.prestosql.hadoop/hadoop-apache

/**
 * Add default servlets.
 */
protected void addDefaultServlets() {
 // set up default servlets
 addServlet("stacks", "/stacks", StackServlet.class);
 addServlet("logLevel", "/logLevel", LogLevel.Servlet.class);
 addServlet("metrics", "/metrics", MetricsServlet.class);
 addServlet("jmx", "/jmx", JMXJsonServlet.class);
 addServlet("conf", "/conf", ConfServlet.class);
}

代码示例来源:origin: org.jvnet.hudson.hadoop/hadoop-core

/**
 * Add default servlets.
 */
protected void addDefaultServlets() {
 // set up default servlets
 addServlet("stacks", "/stacks", StackServlet.class);
 addServlet("logLevel", "/logLevel", LogLevel.Servlet.class);
}

代码示例来源:origin: io.fabric8/fabric-hadoop

/**
 * Add default servlets.
 */
protected void addDefaultServlets() {
 // set up default servlets
 addServlet("stacks", "/stacks", StackServlet.class);
 addServlet("logLevel", "/logLevel", LogLevel.Servlet.class);
 addServlet("jmx", "/jmx", JMXJsonServlet.class);
 addServlet("conf", "/conf", ConfServlet.class);
}

代码示例来源:origin: ch.cern.hadoop/hadoop-common

/**
 * Add default servlets.
 */
protected void addDefaultServlets() {
 // set up default servlets
 addServlet("stacks", "/stacks", StackServlet.class);
 addServlet("logLevel", "/logLevel", LogLevel.Servlet.class);
 addServlet("metrics", "/metrics", MetricsServlet.class);
 addServlet("jmx", "/jmx", JMXJsonServlet.class);
 addServlet("conf", "/conf", ConfServlet.class);
}

代码示例来源:origin: org.apache.hadoop/hadoop-common-test

@BeforeClass public static void setup() throws Exception {
 server = createTestServer();
 server.addServlet("echo", "/echo", EchoServlet.class);
 server.addServlet("echomap", "/echomap", EchoMapServlet.class);
 server.addServlet("htmlcontent", "/htmlcontent", HtmlContentServlet.class);
 server.start();
 baseUrl = getServerURL(server);
}

代码示例来源:origin: org.apache.hadoop/hadoop-mapred-test

@Before
public void setUp() throws Exception {
 dir = new File(System.getProperty("build.webapps", "build/webapps") + "/test");
 System.out.println("dir="+dir.getAbsolutePath());
 if(!dir.exists()) {
  assertTrue(dir.mkdirs());
 }
 server = new HttpServer("test", "0.0.0.0", 0, true);
 server.addServlet("shuffle", "/mapOutput", TaskTracker.MapOutputServlet.class);
 server.start();
 int port = server.getPort();
 baseUrl = new URL("http://localhost:" + port + "/");
}

代码示例来源:origin: com.facebook.hadoop/hadoop-core

FileChecksumServlets.GetServlet.class);
this.infoServer.setAttribute("datanode", this);
this.infoServer.addServlet(null, "/blockScannerReport", 
              DataBlockScannerSet.Servlet.class);
this.infoServer.addServlet("dnConf", CONF_SERVLET_PATH, ReconfigurationServlet.class);
this.infoServer.start();

代码示例来源:origin: org.jvnet.hudson.hadoop/hadoop-core

FileChecksumServlets.GetServlet.class);
this.infoServer.setAttribute("datanode.blockScanner", blockScanner);
this.infoServer.addServlet(null, "/blockScannerReport", 
              DataBlockScanner.Servlet.class);
this.infoServer.start();

代码示例来源:origin: io.fabric8/fabric-hadoop

this.infoServer.setAttribute("datanode.blockScanner", blockScanner);
this.infoServer.setAttribute(JspHelper.CURRENT_CONF, conf);
this.infoServer.addServlet(null, "/blockScannerReport", 
              DataBlockScanner.Servlet.class);

代码示例来源:origin: org.apache.hadoop/hadoop-mapred

infoServer.addServlet("reducegraph", "/taskgraph", TaskGraphServlet.class);
infoServer.start();
this.infoPort = this.infoServer.getPort();

代码示例来源:origin: com.facebook.hadoop/hadoop-core

this.startTime);
infoServer.addServlet("reducegraph", "/taskgraph", TaskGraphServlet.class);

代码示例来源:origin: org.apache.hadoop/hadoop-mapred

jobHistory.init(this, conf, this.localMachine, this.startTime);
infoServer.addServlet("reducegraph", "/taskgraph", TaskGraphServlet.class);
infoServer.start();

代码示例来源:origin: org.apache.hadoop/hadoop-mapred

server.setAttribute("shuffleServerMetrics", shuffleServerMetrics);
server.addInternalServlet("mapOutput", "/mapOutput", MapOutputServlet.class);
server.addServlet("taskLog", "/tasklog", TaskLogServlet.class);
server.start();
this.httpPort = server.getPort();

相关文章