HDFS-8173. NPE thrown at DataNode shutdown when HTTP server was not able to create (Contributed by surendra singh lilhore)

This commit is contained in:
Vinayakumar B 2015-04-20 14:58:04 +05:30
parent 5c97db07fb
commit c17cd4f7c1
2 changed files with 9 additions and 4 deletions

View File

@ -526,6 +526,9 @@ Release 2.8.0 - UNRELEASED
HDFS-8043. NPE in MiniDFSCluster teardown. (Brahma Reddy Battula via ozawa) HDFS-8043. NPE in MiniDFSCluster teardown. (Brahma Reddy Battula via ozawa)
HDFS-8173. NPE thrown at DataNode shutdown when HTTP server was not able to
create (surendra singh lilhore via vinayakumarb)
Release 2.7.1 - UNRELEASED Release 2.7.1 - UNRELEASED
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -1721,10 +1721,12 @@ public void shutdown() {
LOG.warn("Exception shutting down DataNode", e); LOG.warn("Exception shutting down DataNode", e);
} }
} }
try { if (httpServer != null) {
httpServer.close(); try {
} catch (Exception e) { httpServer.close();
LOG.warn("Exception shutting down DataNode HttpServer", e); } catch (Exception e) {
LOG.warn("Exception shutting down DataNode HttpServer", e);
}
} }
if (pauseMonitor != null) { if (pauseMonitor != null) {