I expect to start posting patches for this feature on the sub-tasks later this week after additional testing. I am attaching several screenshots.
HDFS-4249-1.png: This shows a new section on dfshealth.jsp called Startup Progress. It displays overall elapsed time and percent complete. Below that, the NameNode startup sequence is divided into phases: loading fsimage, loading edits, saving a checkpoint, and safe mode. Phases are sub-divided into steps, which show more granular operations within each phase. We display counters, percent complete, and elapsed time per step, which is also aggregated at the phase level. Phases in progress display in italics. Phases not yet started display in gray text. Note that some information typically displayed on dfshealth.jsp is missing: RPC server address, cluster ID and block pool ID. This is because we are starting the HTTP server before initializing FSNamesystem and the RPC server, so that information isn't available yet.
HDFS-4249-2.png: Here we see that the saving checkpoint phase has begun. The interesting thing about this is that the phase is multi-threaded, one thread per dfs.namenode.name.dir, so we see steps related to 3 different paths simultaneously, with progress tracked separately for each one. This can help identify if namenode startup is blocked waiting on a particularly slow disk while saving the checkpoint.
HDFS-4249-3.png: Once the namenode reaches safe mode and the RPC server is available, we see more of the traditional output of dfshealth.jsp. At this point, we move the Startup Progress section to the bottom of the page. This keeps the focus on Cluster Summary, which is probably more useful than Startup Progress during normal operation.
HDFS-4249-4.png: This shows the same information exposed as JSON by making an HTTP call to a new relative URI: /startupProgress. This supports clients such as Ambari that may want to display the data in a different UI.
HDFS-4249-5.png: This is a jconsole screenshot showing that progress information at the phase level is available via JMX too in a new MBean named StartupProgress.