svn merge -c 1603239 merging from trunk to branch-2 to fix:HDFS-6545. Finalizing rolling upgrade can make NN unavailable for a long duration.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1603241 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
51dba744bd
commit
97d57ff1f4
|
@ -192,6 +192,9 @@ Release 2.5.0 - UNRELEASED
|
||||||
|
|
||||||
HDFS-6528. Add XAttrs to TestOfflineImageViewer. (Stephen Chu via wang)
|
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
|
OPTIMIZATIONS
|
||||||
|
|
||||||
HDFS-6214. Webhdfs has poor throughput for files >2GB (daryn)
|
HDFS-6214. Webhdfs has poor throughput for files >2GB (daryn)
|
||||||
|
|
|
@ -7638,14 +7638,20 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
||||||
|
|
||||||
returnInfo = finalizeRollingUpgradeInternal(now());
|
returnInfo = finalizeRollingUpgradeInternal(now());
|
||||||
getEditLog().logFinalizeRollingUpgrade(returnInfo.getFinalizeTime());
|
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,
|
getFSImage().renameCheckpoint(NameNodeFile.IMAGE_ROLLBACK,
|
||||||
NameNodeFile.IMAGE);
|
NameNodeFile.IMAGE);
|
||||||
} finally {
|
} finally {
|
||||||
writeUnlock();
|
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()) {
|
if (auditLog.isInfoEnabled() && isExternalInvocation()) {
|
||||||
logAuditEvent(true, "finalizeRollingUpgrade", null, null, null);
|
logAuditEvent(true, "finalizeRollingUpgrade", null, null, null);
|
||||||
|
|
Loading…
Reference in New Issue