diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES_HDFS-5535.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES_HDFS-5535.txt index 9cb03ed19f8..f01aada1305 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES_HDFS-5535.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES_HDFS-5535.txt @@ -85,3 +85,6 @@ HDFS-5535 subtasks: HDFS-5583. Make DN send an OOB Ack on shutdown before restarting. (kihwal) HDFS-5778. Add rolling upgrade user document. (szetszwo) + + HDFS-6003. Add the new -rollingUpgrade startup option to the namenode + usage message. (Vinayakumar B via szetszwo) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java index a3280107d37..6c2592dc03f 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java @@ -21,6 +21,7 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Joiner; import com.google.common.base.Preconditions; import com.google.common.collect.Lists; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.HadoopIllegalArgumentException; @@ -40,6 +41,7 @@ import org.apache.hadoop.hdfs.HdfsConfiguration; import org.apache.hadoop.hdfs.protocol.ClientProtocol; import org.apache.hadoop.hdfs.protocol.HdfsConstants; import org.apache.hadoop.hdfs.server.common.HdfsServerConstants.NamenodeRole; +import org.apache.hadoop.hdfs.server.common.HdfsServerConstants.RollingUpgradeStartupOption; import org.apache.hadoop.hdfs.server.common.HdfsServerConstants.StartupOption; import org.apache.hadoop.hdfs.server.namenode.ha.*; import org.apache.hadoop.hdfs.server.namenode.metrics.NameNodeMetrics; @@ -64,6 +66,7 @@ import org.apache.hadoop.util.ServicePlugin; import org.apache.hadoop.util.StringUtils; import javax.management.ObjectName; + import java.io.IOException; import java.io.PrintStream; import java.net.InetSocketAddress; @@ -205,6 +208,9 @@ public class NameNode implements NameNodeStatusMXBean { " [" + StartupOption.CLUSTERID.getName() + " cid]" + " [" + StartupOption.RENAMERESERVED.getName() + "] ] | [" + StartupOption.ROLLBACK.getName() + "] | [" + + StartupOption.ROLLINGUPGRADE.getName() + " <" + + RollingUpgradeStartupOption.DOWNGRADE.name().toLowerCase() + "|" + + RollingUpgradeStartupOption.ROLLBACK.name().toLowerCase() + "> ] | [" + StartupOption.FINALIZE.getName() + "] | [" + StartupOption.IMPORT.getName() + "] | [" + StartupOption.INITIALIZESHAREDEDITS.getName() + "] | ["