You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-commits@hadoop.apache.org by ki...@apache.org on 2014/06/17 20:00:55 UTC
svn commit: r1603241 - in
/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs: CHANGES.txt
src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
Author: kihwal
Date: Tue Jun 17 18:00:54 2014
New Revision: 1603241
URL: http://svn.apache.org/r1603241
Log:
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.
Modified:
hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt?rev=1603241&r1=1603240&r2=1603241&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt Tue Jun 17 18:00:54 2014
@@ -192,6 +192,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)
Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java?rev=1603241&r1=1603240&r2=1603241&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java Tue Jun 17 18:00:54 2014
@@ -7638,14 +7638,20 @@ public class FSNamesystem implements Nam
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);