You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jo...@apache.org on 2017/05/25 17:24:44 UTC
[34/35] ambari git commit: Merge branch 'trunk' into
branch-feature-AMBARI-12556
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/annotations/Experimental.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/annotations/ExperimentalFeature.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/StateRecoveryManager.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/Stage.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/agent/ExecutionCommand.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatMonitor.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatProcessor.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/alerts/ComponentVersionAlertRunnable.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/DistributeRepositoriesStructuredOutput.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/checks/HardcodedStackVersionPropertiesCheck.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/controller/ActionExecutionContext.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
----------------------------------------------------------------------
diff --cc ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
index 0b507fb,0739a2a..cd75e53
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
@@@ -76,8 -73,9 +76,7 @@@ import org.apache.ambari.server.control
import org.apache.ambari.server.controller.internal.RequestResourceFilter;
import org.apache.ambari.server.controller.spi.Resource;
import org.apache.ambari.server.metadata.ActionMetadata;
-import org.apache.ambari.server.orm.dao.ClusterVersionDAO;
import org.apache.ambari.server.orm.dao.HostRoleCommandDAO;
- import org.apache.ambari.server.orm.dao.RequestDAO;
-import org.apache.ambari.server.orm.entities.ClusterVersionEntity;
import org.apache.ambari.server.orm.entities.OperatingSystemEntity;
import org.apache.ambari.server.orm.entities.RepositoryEntity;
import org.apache.ambari.server.orm.entities.RepositoryVersionEntity;
@@@ -176,9 -173,9 +174,6 @@@ public class AmbariCustomCommandExecuti
private OsFamily os_family;
@Inject
- private RequestDAO requestDAO;
- private ClusterVersionDAO clusterVersionDAO;
--
-- @Inject
private HostRoleCommandDAO hostRoleCommandDAO;
private Map<String, Map<String, Map<String, String>>> configCredentialsForService = new HashMap<>();
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/controller/ResourceProviderFactory.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostResponse.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentResponse.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceRequest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceResponse.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/CompatibleRepositoryVersionResourceProvider.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ComponentResourceProvider.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostStackVersionResourceProvider.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ReadOnlyResourceProvider.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryResourceProvider.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java
----------------------------------------------------------------------
diff --cc ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java
index e6c50fb,4a9223f..0600159
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java
@@@ -422,19 -362,10 +422,19 @@@ public class ServiceResourceProvider ex
for (ServiceRequest request : requests) {
Cluster cluster = clusters.getCluster(request.getClusterName());
- // Already checked that service does not exist
- Service s = cluster.addService(request.getServiceName());
+ String desiredStack = request.getDesiredStack();
+
+ RepositoryVersionEntity repositoryVersion = request.getResolvedRepository();
+
+ if (null == repositoryVersion) {
+ throw new AmbariException(String.format("Could not find any repositories defined by %s", desiredStack));
+ } else {
+ desiredStack = repositoryVersion.getStackId().toString();
+ }
+
+ Service s = cluster.addService(request.getServiceName(), repositoryVersion);
- /**
+ /*
* Get the credential_store_supported field only from the stack definition.
* Not possible to update the value through a request.
*/
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackDefinedPropertyProvider.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
----------------------------------------------------------------------
diff --cc ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
index 4e6fa61,97da150..6f452b0
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
@@@ -649,23 -818,13 +649,23 @@@ public class UpgradeResourceProvider ex
}
List<UpgradeGroupEntity> groupEntities = new ArrayList<>();
- RequestStageContainer req = createRequest(direction, version);
-
- // the upgrade context calculated these for us based on direction
- StackId sourceStackId = upgradeContext.getOriginalStackId();
- StackId targetStackId = upgradeContext.getTargetStackId();
+ RequestStageContainer req = createRequest(upgradeContext);
+
+ UpgradeEntity upgrade = new UpgradeEntity();
+ upgrade.setRepositoryVersion(upgradeContext.getRepositoryVersion());
+ upgrade.setClusterId(cluster.getClusterId());
+ upgrade.setDirection(direction);
+ upgrade.setUpgradePackage(pack.getName());
+ upgrade.setUpgradeType(pack.getType());
+ upgrade.setAutoSkipComponentFailures(upgradeContext.isComponentFailureAutoSkipped());
+ upgrade.setAutoSkipServiceCheckFailures(upgradeContext.isServiceCheckFailureAutoSkipped());
+ upgrade.setDowngradeAllowed(upgradeContext.isDowngradeAllowed());
+
+ // create to/from history for this upgrade - this should be done before any
+ // possible changes to the desired version for components
+ addComponentHistoryToUpgrade(cluster, upgrade, upgradeContext);
- /**
+ /*
During a Rolling Upgrade, change the desired Stack Id if jumping across
major stack versions (e.g., HDP 2.2 -> 2.3), and then set config changes
so they are applied on the newer stack.
@@@ -674,14 -833,13 +674,14 @@@
stopping all services), and the configs are applied immediately before starting the services.
The Upgrade Pack is responsible for calling {@link org.apache.ambari.server.serveraction.upgrades.UpdateDesiredStackAction}
at the appropriate moment during the orchestration.
- **/
+ */
if (pack.getType() == UpgradeType.ROLLING) {
- // Desired configs must be set before creating stages because the config tag
- // names are read and set on the command for filling in later
- applyStackAndProcessConfigurations(targetStackId.getStackName(), cluster, version, direction, pack, userName);
+ s_upgradeHelper.updateDesiredRepositoriesAndConfigs(upgradeContext);
}
+ @Experimental(feature = ExperimentalFeature.PATCH_UPGRADES, comment = "This is wrong")
+ StackId configurationPackSourceStackId = upgradeContext.getSourceVersions().values().iterator().next().getStackId();
+
// resolve or build a proper config upgrade pack - always start out with the config pack
// for the current stack and merge into that
//
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LoggingSearchPropertyProvider.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProvider.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/PropertyHelper.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/state/DefaultServiceCalculatedState.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/state/HBaseServiceCalculatedState.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/state/HDFSServiceCalculatedState.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/state/HiveServiceCalculatedState.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/state/OozieServiceCalculatedState.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/state/YARNServiceCalculatedState.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/events/listeners/upgrade/DistributeRepositoriesActionListener.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/events/listeners/upgrade/HostVersionOutOfSyncListener.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/events/listeners/upgrade/StackVersionListener.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/metadata/RoleCommandOrder.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentStateDAO.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostVersionDAO.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/RepositoryVersionDAO.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceComponentDesiredStateDAO.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/StackDAO.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentDesiredStateEntity.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentStateEntity.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostVersionEntity.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RepositoryVersionEntity.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceComponentDesiredStateEntity.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceDesiredStateEntity.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/UpgradeEntity.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/AbstractUpgradeServerAction.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/AutoSkipFailedSummaryAction.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ComponentVersionCheckAction.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/FinalizeUpgradeAction.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/UpdateDesiredStackAction.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/stack/MasterHostResolver.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/stack/RepoUtil.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartup.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/state/Clusters.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigFactory.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigImpl.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/state/RepositoryVersionState.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/state/Service.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponent.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHost.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentImpl.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceFactory.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeContext.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeContextFactory.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeHelper.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClustersImpl.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/state/configgroup/ConfigGroup.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/state/configgroup/ConfigGroupFactory.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/state/configgroup/ConfigGroupImpl.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/state/services/RetryUpgradeActionService.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/Direction.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/HostOrderGrouping.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/RepositoryVersionHelper.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ServiceCheckGrouping.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/UpgradeScope.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostSummary.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/topology/validators/RequiredConfigPropertiesValidator.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/FinalUpgradeCatalog.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/StateRecoveryManagerTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/TestActionSchedulerThreading.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/agent/AgentResourceTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/agent/HeartbeatProcessorTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/agent/HeartbeatTestHelper.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/agent/TestHeartbeatHandler.java
----------------------------------------------------------------------
diff --cc ambari-server/src/test/java/org/apache/ambari/server/agent/TestHeartbeatHandler.java
index 78c3640,b54f64a..7d95ed2
--- a/ambari-server/src/test/java/org/apache/ambari/server/agent/TestHeartbeatHandler.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/agent/TestHeartbeatHandler.java
@@@ -455,9 -458,9 +455,9 @@@ public class TestHeartbeatHandler
HeartBeatHandler handler = new HeartBeatHandler(fsm, new ActionQueue(), am,
injector);
Cluster cluster = heartbeatTestHelper.getDummyCluster();
- Service hdfs = cluster.addService(HDFS);
+ Service hdfs = addService(cluster, HDFS);
- /**
+ /*
* Add three service components enabled for auto start.
*/
hdfs.addServiceComponent(DATANODE).setRecoveryEnabled(true);
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/agent/TestHeartbeatMonitor.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/alerts/ComponentVersionAlertRunnableTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/api/resources/BaseResourceDefinitionTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/configuration/RecoveryConfigHelperTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelperTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
----------------------------------------------------------------------
diff --cc ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
index eb82ba3,fcf99ba..ec19724
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
@@@ -1943,9 -1921,9 +1943,8 @@@ public class AmbariManagementController
} catch (Exception e) {
// Expected
}
-
}
- @Test
/**
* Create a cluster with a service, and verify that the request tasks have the correct output log and error log paths.
*/
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/controller/BackgroundCustomCommandExecutionTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/controller/RefreshYarnCapacitySchedulerReleaseConfigTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProviderTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractResourceProviderTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProviderTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProviderTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CompatibleRepositoryVersionResourceProviderTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ComponentResourceProviderTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostComponentResourceProviderTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostStackVersionResourceProviderTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/JMXHostProviderTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProviderTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestImplTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ServiceResourceProviderTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackDefinedPropertyProviderTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackUpgradeConfigurationMergeTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeSummaryResourceProviderTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProviderTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProviderTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/state/GeneralServiceCalculatedStateTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/events/EventsTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/events/listeners/upgrade/HostVersionOutOfSyncListenerTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/events/listeners/upgrade/StackVersionListenerTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/metadata/RoleCommandOrderTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/metadata/RoleGraphTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/orm/OrmTestHelper.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/HostVersionDAOTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/RepositoryVersionDAOTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/ServiceConfigDAOTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/UpgradeDAOTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/AutoSkipFailedSummaryActionTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/ComponentVersionCheckActionTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/ConfigureActionTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/UpgradeActionTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/stack/UpdateActiveRepoVersionOnStartupTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/stageplanner/TestStagePlanner.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/state/CheckHelperTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigGroupTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigHelperTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/state/ServiceComponentTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/state/ServiceTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertEventPublisherTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/InitialAlertEventTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterDeadlockTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterImplTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java
----------------------------------------------------------------------
diff --cc ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java
index b2fad16,883eff5..336db36
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java
@@@ -1917,6 -2271,92 +1917,11 @@@ public class ClusterTest
}
/**
+ * Checks case when there are 2 cluster stack versions present (CURRENT and OUT_OF_SYNC),
+ * and we add a new host to cluster. On a new host, both CURRENT and OUT_OF_SYNC host
+ * versions should be present
+ */
- @Test
- public void testTransitionHostVersionState_OutOfSync_BlankCurrent() throws Exception {
- StackId stackId = new StackId("HDP-2.0.5");
- String clusterName = "c1";
- clusters.addCluster(clusterName, stackId);
- final Cluster c1 = clusters.getCluster(clusterName);
- Assert.assertEquals(clusterName, c1.getClusterName());
-
- clusters.addHost("h-1");
- clusters.addHost("h-2");
- String h3 = "h-3";
- clusters.addHost(h3);
-
- for (String hostName : new String[] { "h-1", "h-2", h3}) {
- Host h = clusters.getHost(hostName);
- h.setIPv4("ipv4");
- h.setIPv6("ipv6");
-
- Map<String, String> hostAttributes = new HashMap<>();
- hostAttributes.put("os_family", "redhat");
- hostAttributes.put("os_release_version", "5.9");
- h.setHostAttributes(hostAttributes);
- }
-
- String v1 = "2.0.5-1";
- String v2 = "2.0.5-2";
- c1.setDesiredStackVersion(stackId);
- RepositoryVersionEntity rve1 = helper.getOrCreateRepositoryVersion(stackId,
- v1);
- RepositoryVersionEntity rve2 = helper.getOrCreateRepositoryVersion(stackId,
- v2);
-
- c1.setCurrentStackVersion(stackId);
- c1.createClusterVersion(stackId, v1, "admin",
- RepositoryVersionState.INSTALLING);
- c1.transitionClusterVersion(stackId, v1, RepositoryVersionState.CURRENT);
-
- clusters.mapHostToCluster("h-1", clusterName);
- clusters.mapHostToCluster("h-2", clusterName);
-
- ClusterVersionDAOMock.failOnCurrentVersionState = false;
-
- Service service = c1.addService("ZOOKEEPER");
- ServiceComponent sc = service.addServiceComponent("ZOOKEEPER_SERVER");
- sc.addServiceComponentHost("h-1");
- sc.addServiceComponentHost("h-2");
-
- c1.createClusterVersion(stackId, v2, "admin",
- RepositoryVersionState.INSTALLING);
- c1.transitionClusterVersion(stackId, v2, RepositoryVersionState.INSTALLED);
- c1.transitionClusterVersion(stackId, v2, RepositoryVersionState.OUT_OF_SYNC);
-
- clusters.mapHostToCluster(h3, clusterName);
-
- // This method is usually called when we receive heartbeat from new host
- HostEntity hostEntity3 = mock(HostEntity.class);
- when(hostEntity3.getHostName()).thenReturn(h3);
-
- // HACK: to workaround issue with NullPointerException at
- // org.eclipse.persistence.internal.sessions.MergeManager.registerObjectForMergeCloneIntoWorkingCopy(MergeManager.java:1037)
- // during hostVersionDAO.merge()
- HostVersionDAO hostVersionDAOMock = mock(HostVersionDAO.class);
- Field field = ClusterImpl.class.getDeclaredField("hostVersionDAO");
- field.setAccessible(true);
- field.set(c1, hostVersionDAOMock);
-
- ArgumentCaptor<HostVersionEntity> hostVersionCaptor = ArgumentCaptor.forClass(HostVersionEntity.class);
-
- ClusterVersionDAOMock.mockedClusterVersions = new ArrayList<ClusterVersionEntity>() {{
- addAll(c1.getAllClusterVersions());
- }};
-
- c1.transitionHostVersionState(hostEntity3, rve1, stackId);
-
- // Revert fields of static instance
- ClusterVersionDAOMock.mockedClusterVersions = null;
-
- verify(hostVersionDAOMock).merge(hostVersionCaptor.capture());
- assertEquals(hostVersionCaptor.getValue().getState(), RepositoryVersionState.CURRENT);
- }
-
+ /**
* Tests that an existing configuration can be successfully updated without
* creating a new version.
*
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersDeadlockTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ConcurrentServiceConfigVersionTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ServiceComponentHostConcurrentWriteDeadlockTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/state/host/HostTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/state/services/RetryUpgradeActionServiceTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/state/stack/upgrade/RepositoryVersionHelperTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/state/stack/upgrade/StageWrapperBuilderTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog211Test.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalogHelper.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/245afc1b/ambari-server/src/test/java/org/apache/ambari/server/utils/StageUtilsTest.java
----------------------------------------------------------------------