@Override
      public void run() {
        try {
          RequestDAO requestDAO = injector.getInstance(RequestDAO.class);
          StageFactory stageFactory = injector.getInstance(StageFactory.class);
          EntityManager em = getEntityManagerProvider().get();
          List<RequestEntity> requestEntities = requestDAO.findAll();
          for (RequestEntity requestEntity : requestEntities) {
            Collection<StageEntity> stageEntities = requestEntity.getStages();
            List<HostRoleStatus> stageDisplayStatuses = new ArrayList<>();
            List<HostRoleStatus> stageStatuses = new ArrayList<>();
            for (StageEntity stageEntity : stageEntities) {
              Stage stage = stageFactory.createExisting(stageEntity);
              List<HostRoleCommand> hostRoleCommands = stage.getOrderedHostRoleCommands();
              Map<HostRoleStatus, Integer> statusCount = CalculatedStatus.calculateStatusCountsForTasks(hostRoleCommands);
              HostRoleStatus stageDisplayStatus = CalculatedStatus.calculateSummaryDisplayStatus(statusCount, hostRoleCommands.size(), stage.isSkippable());
              HostRoleStatus stageStatus = CalculatedStatus.calculateStageStatus(hostRoleCommands, statusCount, stage.getSuccessFactors(), stage.isSkippable());
              stageEntity.setStatus(stageStatus);
              stageStatuses.add(stageStatus);
              stageEntity.setDisplayStatus(stageDisplayStatus);
              stageDisplayStatuses.add(stageDisplayStatus);
              em.merge(stageEntity);
            }
            HostRoleStatus requestStatus = CalculatedStatus.getOverallStatusForRequest(stageStatuses);
            requestEntity.setStatus(requestStatus);
            HostRoleStatus requestDisplayStatus = CalculatedStatus.getOverallDisplayStatusForRequest(stageDisplayStatuses);
            requestEntity.setDisplayStatus(requestDisplayStatus);
            em.merge(requestEntity);
          }
        } catch (Exception e) {
          LOG.warn("Setting status for stages and Requests threw exception. ", e);
        }
      }
Updates the Hive/WebHCat Kerberos descriptor stored in the user-supplied Kerberos Descriptor.
<p>
Any updates will be performed on the supplied Kerberos Descriptor.
<p>
The following changes may be made:
<ul>
<li>some command json elements were modified from ..._host to ..._hosts, kerberos related properties must be adjusted accordingly</li>
</ul>

@param kerberosDescriptor the user-supplied Kerberos descriptor used to perform the in-place update
@return <code>true</code> if changes were made; otherwise <code>false</code>
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog270.java