svn merge -c 1489634 Merging from trunk to branch-2 to fix HDFS-4840.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1489642 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Kihwal Lee 2013-06-04 21:49:09 +00:00
parent 0b97dc1cd3
commit eb0707983b
2 changed files with 10 additions and 3 deletions

View File

@ -340,6 +340,8 @@ Release 2.1.0-beta - UNRELEASED
HDFS-4382. Fix typo MAX_NOT_CHANGED_INTERATIONS. (Ted Yu via suresh) HDFS-4382. Fix typo MAX_NOT_CHANGED_INTERATIONS. (Ted Yu via suresh)
HDFS-4840. ReplicationMonitor gets NPE during shutdown. (kihwal)
BREAKDOWN OF HDFS-347 SUBTASKS AND RELATED JIRAS BREAKDOWN OF HDFS-347 SUBTASKS AND RELATED JIRAS
HDFS-4353. Encapsulate connections to peers in Peer and PeerServer classes. HDFS-4353. Encapsulate connections to peers in Peer and PeerServer classes.

View File

@ -3078,10 +3078,15 @@ assert storedBlock.findDatanode(dn) < 0 : "Block " + block
computeDatanodeWork(); computeDatanodeWork();
processPendingReplications(); processPendingReplications();
Thread.sleep(replicationRecheckInterval); Thread.sleep(replicationRecheckInterval);
} catch (InterruptedException ie) {
LOG.warn("ReplicationMonitor thread received InterruptedException.", ie);
break;
} catch (Throwable t) { } catch (Throwable t) {
if (!namesystem.isRunning()) {
LOG.info("Stopping ReplicationMonitor.");
if (!(t instanceof InterruptedException)) {
LOG.info("ReplicationMonitor received an exception"
+ " while shutting down.", t);
}
break;
}
LOG.fatal("ReplicationMonitor thread received Runtime exception. ", t); LOG.fatal("ReplicationMonitor thread received Runtime exception. ", t);
terminate(1, t); terminate(1, t);
} }