@Override
        public boolean shouldHostBeRemoved(final String hostname)
            throws AmbariException {
          if (actionExecutionContext.isFutureCommand()) {
            return false;
          }

          return !maintenanceStateHelper.isOperationAllowed(
              cluster, actionExecutionContext.getOperationLevel(),
              resourceFilter, serviceName, componentName, hostname);
        }
Called during the start/stop/restart of services, plus custom commands during Stack Upgrade.
@param actionExecutionContext Execution Context
@param resourceFilter Resource Filter
@param stage Command stage
@param additionalCommandParams Additional command params to add the the stage
@param commandDetail String for the command detail
@throws AmbariException
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java