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

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

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

HttpServer.<init>介绍

[英]Same as this(name, bindAddress, port, findPort, null);
[中]与此相同(名称、bindAddress、端口、findPort、null);

代码示例

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

/**
 * Create an HttpServer instance for the given webapp
 * @param webapp the webapp to work with
 * @return the server
 * @throws IOException if it could not be created
 */
public static HttpServer createServer(String webapp) throws IOException {
 return new HttpServer(webapp, "0.0.0.0", 0, true);
}
/**

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

/**
 * Create an HttpServer instance for the given webapp
 * @param webapp the webapp to work with
 * @param conf the configuration to use for the server
 * @return the server
 * @throws IOException if it could not be created
 */
public static HttpServer createServer(String webapp, Configuration conf)
  throws IOException {
 return new HttpServer(webapp, "0.0.0.0", 0, true, conf);
}

代码示例来源: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: org.apache.hadoop/hadoop-common-test

assertTrue(!Level.ERROR.equals(log.getEffectiveLevel()));
HttpServer server = new HttpServer("..", "localhost", 22222, true);
server.start();
int port = server.getPort();

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

MyGroupsProvider.mapping.put("userB", Arrays.asList("groupB"));
HttpServer myServer = new HttpServer("test", "0.0.0.0", 0, true, conf);
myServer.setAttribute(HttpServer.CONF_CONTEXT_ATTRIBUTE, conf);
myServer.start();

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

MyGroupsProvider.mapping.put("userE", Arrays.asList("groupE"));
HttpServer myServer = new HttpServer("test", "0.0.0.0", 0, true, conf,
  new AccessControlList("userA,userB groupC,groupD"));
myServer.setAttribute(HttpServer.CONF_CONTEXT_ATTRIBUTE, conf);

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

String infoHost = infoSocAddr.getHostName();
int tmpInfoPort = infoSocAddr.getPort();
this.infoServer = new HttpServer("datanode", infoHost, tmpInfoPort,
  tmpInfoPort == 0, conf);
if (conf.getBoolean("dfs.https.enable", false)) {

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

infoBindAddress = infoSocAddr.getHostName();
int tmpInfoPort = infoSocAddr.getPort();
infoServer = new HttpServer("secondary", infoBindAddress, tmpInfoPort,
  tmpInfoPort == 0, conf);
infoServer.setAttribute("name.system.image", checkpointImage);

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

infoBindAddress = infoSocAddr.getHostName();
int tmpInfoPort = infoSocAddr.getPort();
infoServer = new HttpServer("secondary", infoBindAddress, tmpInfoPort,
  tmpInfoPort == 0, conf);
infoServer.setAttribute("name.system.image", checkpointImage);

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

String infoHost = infoSocAddr.getHostName();
int infoPort = infoSocAddr.getPort();
this.httpServer = new HttpServer("hdfs", infoHost, infoPort,
  infoPort == 0, conf);
if (conf.getBoolean("dfs.https.enable", false)) {

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

String infoHost = infoSocAddr.getHostName();
int tmpInfoPort = infoSocAddr.getPort();
this.infoServer = new HttpServer("datanode", infoHost, tmpInfoPort,
  tmpInfoPort == 0, conf);
InetSocketAddress secInfoSocAddr = NetUtils.createSocketAddr(

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

int tmpInfoPort = infoSocAddr.getPort();
this.infoServer = (secureResources == null) 
  ? new HttpServer("datanode", infoHost, tmpInfoPort, tmpInfoPort == 0, 
    conf, SecurityUtil.getAdminAcls(conf, DFSConfigKeys.DFS_ADMIN))
  : new HttpServer("datanode", infoHost, tmpInfoPort, tmpInfoPort == 0,
    conf, SecurityUtil.getAdminAcls(conf, DFSConfigKeys.DFS_ADMIN),
    secureResources.getListener());

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

int tmpInfoPort = infoSocAddr.getPort();
this.startTime = clock.getTime();
infoServer = new HttpServer("job", infoBindAddress, tmpInfoPort, 
  tmpInfoPort == 0, conf);
infoServer.setAttribute("job.tracker", this);

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

int tmpInfoPort = infoSocAddr.getPort();
this.startTime = getClock().getTime();
infoServer = new HttpServer("job", infoBindAddress, tmpInfoPort,
  tmpInfoPort == 0, conf);
infoServer.setAttribute("job.tracker", this);

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

int tmpInfoPort = infoSocAddr.getPort();
this.startTime = clock.getTime();
infoServer = new HttpServer("job", infoBindAddress, tmpInfoPort, 
  tmpInfoPort == 0, conf, aclsManager.getAdminsAcl());
infoServer.setAttribute("job.tracker", this);

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

String infoHost = infoSocAddr.getHostName();
int tmpInfoPort = infoSocAddr.getPort();
this.infoServer = new HttpServer("hdfs", infoHost, tmpInfoPort, 
  tmpInfoPort == 0, conf);
InetSocketAddress secInfoSocAddr = NetUtils.createSocketAddr(

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

String httpBindAddress = infoSocAddr.getHostName();
int httpPort = infoSocAddr.getPort();
server = new HttpServer("task", httpBindAddress, httpPort,
  httpPort == 0, conf);
workerThreads = conf.getInt("tasktracker.http.threads", 40);

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

String httpBindAddress = infoSocAddr.getHostName();
int httpPort = infoSocAddr.getPort();
this.server = new HttpServer("task", httpBindAddress, httpPort,
  httpPort == 0, conf, aclsManager.getAdminsAcl());
workerThreads = conf.getInt(TT_HTTP_THREADS, 40);

相关文章