HDFS-6545. Finalizing rolling upgrade can make NN unavailable for a long duration. Contributed by Kihwal Lee.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1603239 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6e37dd331b
commit
2298f3d241
@ -449,6 +449,9 @@ Release 2.5.0 - UNRELEASED
|
||||
|
||||
HDFS-6528. Add XAttrs to TestOfflineImageViewer. (Stephen Chu via wang)
|
||||
|
||||
HDFS-6545. Finalizing rolling upgrade can make NN unavailable for a long
|
||||
duration. (kihwal)
|
||||
|
||||
OPTIMIZATIONS
|
||||
|
||||
HDFS-6214. Webhdfs has poor throughput for files >2GB (daryn)
|
||||
|
@ -7639,14 +7639,20 @@ RollingUpgradeInfo finalizeRollingUpgrade() throws IOException {
|
||||
|
||||
returnInfo = finalizeRollingUpgradeInternal(now());
|
||||
getEditLog().logFinalizeRollingUpgrade(returnInfo.getFinalizeTime());
|
||||
getFSImage().saveNamespace(this);
|
||||
if (haEnabled) {
|
||||
// roll the edit log to make sure the standby NameNode can tail
|
||||
getFSImage().rollEditLog();
|
||||
}
|
||||
getFSImage().renameCheckpoint(NameNodeFile.IMAGE_ROLLBACK,
|
||||
NameNodeFile.IMAGE);
|
||||
} finally {
|
||||
writeUnlock();
|
||||
}
|
||||
|
||||
// getEditLog().logSync() is not needed since it does saveNamespace
|
||||
if (!haEnabled) {
|
||||
// Sync not needed for ha since the edit was rolled after logging.
|
||||
getEditLog().logSync();
|
||||
}
|
||||
|
||||
if (auditLog.isInfoEnabled() && isExternalInvocation()) {
|
||||
logAuditEvent(true, "finalizeRollingUpgrade", null, null, null);
|
||||
|
Loading…
Reference in New Issue
Block a user