code: public synchronized boolean startUpgrade() throws IOException {
      if(!upgradeState) {
        initializeUpgrade();
        if(!upgradeState) return false;
        // write new upgrade state into disk
        namesystem.getFSImage().storage.writeAll();
      }
      assert currentUpgrades != null : "currentUpgrades is null";
      this.broadcastCommand = currentUpgrades.first().startUpgrade();
      NameNode.LOG.info("\n   Distributed upgrade for NameNode version " 
          + getUpgradeVersion() + " to current LV " 
          + FSConstants.LAYOUT_VERSION + " is started.");
      return true;
    }
docs: Start distributed upgrade.
  Instantiates distributed upgrade objects.
  
  @return true if distributed upgrade is required or false otherwise
  @throws IOException