本文整理了Java中org.apache.hadoop.http.HttpServer.stop()
方法的一些代码示例,展示了HttpServer.stop()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpServer.stop()
方法的具体详情如下:
包路径:org.apache.hadoop.http.HttpServer
类名称:HttpServer
方法名:stop
[英]stop the server
[中]停止服务器
代码示例来源:origin: org.apache.hadoop/hadoop-common-test
/**
* If the server is non null, stop it
* @param server to stop
* @throws Exception on any failure
*/
public static void stop(HttpServer server) throws Exception {
if (server != null) {
server.stop();
}
}
代码示例来源:origin: org.apache.hadoop/hadoop-mapred-test
@After
public void tearDown() throws Exception {
if(dir.exists())
dir.delete();
if(server!=null)
server.stop();
}
代码示例来源:origin: org.apache.hadoop/hadoop-mapred
public synchronized void shutdown() throws IOException {
shuttingDown = true;
close();
if (this.server != null) {
try {
LOG.info("Shutting down StatusHttpServer");
this.server.stop();
} catch (Exception e) {
LOG.warn("Exception shutting down TaskTracker", e);
}
}
}
/**
代码示例来源:origin: org.apache.hadoop/hadoop-common-test
@AfterClass public static void cleanup() throws Exception {
server.stop();
}
代码示例来源:origin: com.facebook.hadoop/hadoop-core
/**
* Shut down this instance of the datanode.
* Returns only after shutdown is complete.
*/
public void shutdown() {
shouldRun = false;
try {
if (infoServer != null) infoServer.stop();
} catch (Exception e) {
LOG.warn("Exception shutting down SecondaryNameNode", e);
}
try {
if (checkpointImage != null) checkpointImage.close();
} catch(IOException e) {
LOG.warn(StringUtils.stringifyException(e));
}
}
代码示例来源:origin: org.jvnet.hudson.hadoop/hadoop-core
/**
* Shut down this instance of the datanode.
* Returns only after shutdown is complete.
*/
public void shutdown() {
shouldRun = false;
try {
if (infoServer != null) infoServer.stop();
} catch(InterruptedException ie) {
LOG.warn(StringUtils.stringifyException(ie));
}
try {
if (checkpointImage != null) checkpointImage.close();
} catch(IOException e) {
LOG.warn(StringUtils.stringifyException(e));
}
}
代码示例来源:origin: org.apache.hadoop/hadoop-mapred
LOG.info("Stopping infoServer");
try {
this.infoServer.stop();
} catch (Exception ex) {
LOG.warn("Exception shutting down JobTracker", ex);
代码示例来源:origin: org.apache.hadoop/hadoop-common-test
myServer.stop();
代码示例来源:origin: org.apache.hadoop/hadoop-common-test
serverURL + servlet, "userE"));
myServer.stop();
代码示例来源:origin: org.apache.hadoop/hadoop-common-test
http.stop();
代码示例来源:origin: com.facebook.hadoop/hadoop-core
void close() throws IOException {
if (this.infoServer != null) {
LOG.info("Stopping infoServer");
try {
this.infoServer.stop();
} catch (Exception ex) {
LOG.warn("Exception shutting down JobTracker", ex);
}
}
if (this.interTrackerServer != null) {
LOG.info("Stopping interTrackerServer");
this.interTrackerServer.stop();
}
shutdown = true;
closeThread(this.expireTrackersThread);
closeThread(this.retireJobsThread);
closeThread(this.jobUpdaterThread);
if (taskScheduler != null) {
taskScheduler.terminate();
}
closeThread(this.expireLaunchingTaskThread);
closeThread(this.completedJobsStoreThread);
if (versionBeanName != null) {
MBeanUtil.unregisterMBean(versionBeanName);
}
LOG.info("stopped all jobtracker services");
return;
}
代码示例来源:origin: com.facebook.hadoop/hadoop-core
/**
* Stop all NameNode threads and wait for all to finish.
*/
public void stop() {
if (stopRequested)
return;
stopRequested = true;
try {
if (httpServer != null) httpServer.stop();
} catch (Exception e) {
LOG.error(StringUtils.stringifyException(e));
}
if(namesystem != null) namesystem.close();
if(emptier != null) emptier.interrupt();
if(server != null) server.stop();
if (dnProtocolServer != null) dnProtocolServer.stop();
if (myMetrics != null) {
myMetrics.shutdown();
}
if (namesystem != null) {
namesystem.shutdown();
}
}
代码示例来源:origin: org.apache.hadoop/hadoop-common-test
http.stop();
代码示例来源:origin: com.facebook.hadoop/hadoop-core
infoServer.stop();
} catch (Exception e) {
LOG.warn("Exception shutting down DataNode", e);
代码示例来源:origin: io.fabric8/fabric-hadoop
if (infoServer != null) {
try {
infoServer.stop();
} catch (Exception e) {
LOG.warn("Exception shutting down DataNode", e);
代码示例来源:origin: org.jvnet.hudson.hadoop/hadoop-core
if (infoServer != null) {
try {
infoServer.stop();
} catch (Exception e) {
代码示例来源:origin: org.jvnet.hudson.hadoop/hadoop-core
/**
* Close down this file system manager.
* Causes heartbeat and lease daemons to stop; waits briefly for
* them to finish, but a short timeout returns control back to caller.
*/
public void close() {
fsRunning = false;
try {
if (pendingReplications != null) pendingReplications.stop();
if (infoServer != null) infoServer.stop();
if (hbthread != null) hbthread.interrupt();
if (replthread != null) replthread.interrupt();
if (dnthread != null) dnthread.interrupt();
if (smmthread != null) smmthread.interrupt();
} catch (InterruptedException ie) {
} finally {
// using finally to ensure we also wait for lease daemon
try {
if (lmthread != null) {
lmthread.interrupt();
lmthread.join(3000);
}
dir.close();
} catch (InterruptedException ie) {
} catch (IOException ie) {
LOG.error("Error closing FSDirectory", ie);
IOUtils.cleanup(LOG, dir);
}
}
}
代码示例来源:origin: com.facebook.hadoop/hadoop-core
try {
LOG.info("Shutting down StatusHttpServer");
this.server.stop();
LOG.info("Shutting down Netty MapOutput Server");
if (this.nettyMapOutputServer != null) {
内容来源于网络,如有侵权,请联系作者删除!