Caution: The steps described below are a hack! It is not recommended that we go about making changes to upgrade XML files based on our needs. Please exercise caution and measure your risks before following the steps.

You can increase the timeouts for namenode restart using the following steps before you start the upgrade process:

Step 1: Locate the upgrade file on Ambari server host. If we are upgrading from HDP-2.5 to HDP-2.6 then :

Just to add to the details mentioned in the blog here, the property ("upgrade.parameter.nn-restart.timeout") change during the upgrade may not take effect even if Ambari servers are restarted. So have the property in place before the upgrade starts.