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 2014/09/16 14:51:07 UTC

[27/27] git commit: Merge branch 'trunk' into branch-alerts-dev

Merge branch 'trunk' into branch-alerts-dev

Conflicts:
	ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
	ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/17b8e799
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/17b8e799
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/17b8e799

Branch: refs/heads/branch-alerts-dev
Commit: 17b8e799048b96c7fb1074a21c52e2e7ecaaf607
Parents: 760bedf bd04a28
Author: Jonathan Hurley <jh...@hortonworks.com>
Authored: Tue Sep 16 08:50:14 2014 -0400
Committer: Jonathan Hurley <jh...@hortonworks.com>
Committed: Tue Sep 16 08:50:14 2014 -0400

----------------------------------------------------------------------
 .../ui/admin-web/app/views/leftNavbar.html      |   2 +-
 ambari-agent/src/main/package/rpm/preremove.sh  |   2 +-
 .../ambari_agent/TestActualConfigHandler.py     |   6 +-
 .../test/python/ambari_agent/TestLiveStatus.py  |   4 +-
 .../TestExecuteHadoopResource.py                |  37 ++-
 ambari-server/docs/api/v1/services.md           |   7 -
 .../stackadvisor/StackAdvisorRunner.java        |  10 +-
 .../server/controller/AmbariHandlerList.java    |  33 +-
 .../AmbariPrivilegeResourceProvider.java        |   2 +-
 .../internal/BaseBlueprintProcessor.java        |   2 +-
 .../BlueprintConfigurationProcessor.java        |  30 +-
 .../RecommendationResourceProvider.java         |   6 +-
 .../internal/ValidationResourceProvider.java    |   6 +-
 .../internal/ViewInstanceResourceProvider.java  |  10 +-
 .../ViewPermissionResourceProvider.java         |   4 +-
 .../internal/ViewPrivilegeResourceProvider.java |   8 +-
 .../ambari/server/metadata/ActionMetadata.java  |   1 -
 .../ambari/server/orm/entities/ViewEntity.java  |   8 +-
 .../org/apache/ambari/server/state/Service.java |   8 +-
 .../server/upgrade/UpgradeCatalog170.java       | 142 +++++++-
 .../apache/ambari/server/view/ViewRegistry.java |  10 +-
 ambari-server/src/main/package/rpm/preremove.sh |   2 +-
 .../custom_actions/validate_configs.py          |   2 -
 .../scripts/shared_initialization.py            |   3 +-
 .../stacks/HDP/1.3.2/role_command_order.json    |   4 +-
 .../services/HIVE/configuration/webhcat-env.xml |  54 +++
 .../HIVE/configuration/webhcat-site.xml         | 156 +++++++++
 .../stacks/HDP/1.3.2/services/HIVE/metainfo.xml | 154 +++++----
 .../HIVE/package/files/templetonSmoke.sh        |  96 ++++++
 .../services/HIVE/package/scripts/params.py     |  31 +-
 .../HIVE/package/scripts/service_check.py       |   2 +
 .../HIVE/package/scripts/status_params.py       |   3 +
 .../services/HIVE/package/scripts/webhcat.py    | 107 ++++++
 .../HIVE/package/scripts/webhcat_server.py      |  53 +++
 .../HIVE/package/scripts/webhcat_service.py     |  40 +++
 .../package/scripts/webhcat_service_check.py    |  42 +++
 .../HDP/1.3.2/services/NAGIOS/metainfo.xml      |   2 +-
 .../templates/hadoop-servicegroups.cfg.j2       |   6 -
 .../package/templates/hadoop-services.cfg.j2    |   2 +-
 .../WEBHCAT/configuration/webhcat-env.xml       |  54 ---
 .../WEBHCAT/configuration/webhcat-site.xml      | 156 ---------
 .../HDP/1.3.2/services/WEBHCAT/metainfo.xml     | 103 ------
 .../WEBHCAT/package/files/templetonSmoke.sh     |  96 ------
 .../WEBHCAT/package/scripts/__init__.py         |  20 --
 .../services/WEBHCAT/package/scripts/params.py  |  78 -----
 .../WEBHCAT/package/scripts/service_check.py    |  44 ---
 .../WEBHCAT/package/scripts/status_params.py    |  26 --
 .../services/WEBHCAT/package/scripts/webhcat.py | 107 ------
 .../WEBHCAT/package/scripts/webhcat_server.py   |  53 ---
 .../WEBHCAT/package/scripts/webhcat_service.py  |  40 ---
 .../stacks/HDP/1.3/role_command_order.json      |   4 +-
 .../stacks/HDP/1.3/services/HIVE/metainfo.xml   |   5 -
 .../services/HDFS/configuration/core-site.xml   |   9 +
 .../scripts/shared_initialization.py            |   3 +-
 .../stacks/HDP/2.0.6/role_command_order.json    |   4 +-
 .../services/HDFS/configuration/core-site.xml   |  10 +
 .../services/HIVE/configuration/webhcat-env.xml |  54 +++
 .../HIVE/configuration/webhcat-site.xml         | 138 ++++++++
 .../stacks/HDP/2.0.6/services/HIVE/metainfo.xml | 165 +++++-----
 .../HIVE/package/files/templetonSmoke.sh        |  96 ++++++
 .../services/HIVE/package/scripts/params.py     |  44 ++-
 .../HIVE/package/scripts/service_check.py       |   2 +
 .../HIVE/package/scripts/status_params.py       |   1 +
 .../services/HIVE/package/scripts/webhcat.py    | 112 +++++++
 .../HIVE/package/scripts/webhcat_server.py      |  53 +++
 .../HIVE/package/scripts/webhcat_service.py     |  40 +++
 .../package/scripts/webhcat_service_check.py    |  41 +++
 .../HDP/2.0.6/services/NAGIOS/metainfo.xml      |   2 +-
 .../templates/hadoop-servicegroups.cfg.j2       |   8 +-
 .../package/templates/hadoop-services.cfg.j2    |   2 +-
 .../services/OOZIE/package/scripts/params.py    |   3 +-
 .../services/SQOOP/package/scripts/params.py    |  12 +-
 .../WEBHCAT/configuration/webhcat-env.xml       |  54 ---
 .../WEBHCAT/configuration/webhcat-site.xml      | 138 --------
 .../HDP/2.0.6/services/WEBHCAT/metainfo.xml     | 110 -------
 .../WEBHCAT/package/files/templetonSmoke.sh     |  96 ------
 .../WEBHCAT/package/scripts/__init__.py         |  20 --
 .../services/WEBHCAT/package/scripts/params.py  | 102 ------
 .../WEBHCAT/package/scripts/service_check.py    |  45 ---
 .../WEBHCAT/package/scripts/status_params.py    |  26 --
 .../services/WEBHCAT/package/scripts/webhcat.py | 112 -------
 .../WEBHCAT/package/scripts/webhcat_server.py   |  53 ---
 .../WEBHCAT/package/scripts/webhcat_service.py  |  40 ---
 .../HDP/2.1.GlusterFS/role_command_order.json   |   4 +-
 .../2.1.GlusterFS/services/HIVE/metainfo.xml    | 100 +++---
 .../WEBHCAT/configuration/webhcat-site.xml      | 143 --------
 .../2.1.GlusterFS/services/WEBHCAT/metainfo.xml |  46 ---
 .../stacks/HDP/2.1/role_command_order.json      |   3 +-
 .../services/FALCON/package/scripts/params.py   |   9 +-
 .../stacks/HDP/2.1/services/HIVE/metainfo.xml   |  62 +++-
 .../services/STORM/configuration/storm-env.xml  |   2 +-
 .../WEBHCAT/configuration/webhcat-site.xml      | 143 --------
 .../HDP/2.1/services/WEBHCAT/metainfo.xml       |  47 ---
 .../stacks/HDP/2.2.1/services/HIVE/metainfo.xml |   4 -
 .../HDP/2.2.1/services/WEBHCAT/metainfo.xml     |  26 --
 .../resources/stacks/HDP/2.2/repos/repoinfo.xml |  27 +-
 .../stacks/HDP/2.2/services/FALCON/metainfo.xml |  12 +-
 .../stacks/HDP/2.2/services/FLUME/metainfo.xml  |   2 +-
 .../stacks/HDP/2.2/services/HBASE/metainfo.xml  |   2 +-
 .../services/HDFS/configuration/hadoop-env.xml  |   2 +-
 .../services/HDFS/configuration/hdfs-site.xml   |   2 +-
 .../stacks/HDP/2.2/services/HDFS/metainfo.xml   |   4 +-
 .../HIVE/configuration/webhcat-site.xml         |  59 ++++
 .../stacks/HDP/2.2/services/HIVE/metainfo.xml   |  48 ++-
 .../services/OOZIE/configuration/oozie-site.xml |   2 +-
 .../stacks/HDP/2.2/services/OOZIE/metainfo.xml  |  27 +-
 .../stacks/HDP/2.2/services/PIG/metainfo.xml    |   5 +-
 .../stacks/HDP/2.2/services/SQOOP/metainfo.xml  |  15 +-
 .../stacks/HDP/2.2/services/STORM/metainfo.xml  |  12 +-
 .../stacks/HDP/2.2/services/TEZ/metainfo.xml    |   2 +-
 .../WEBHCAT/configuration/webhcat-site.xml      |  59 ----
 .../HDP/2.2/services/WEBHCAT/metainfo.xml       |   2 +-
 .../YARN/configuration-mapred/mapred-site.xml   |   2 +-
 .../services/YARN/configuration/yarn-site.xml   |   2 +-
 .../stacks/HDP/2.2/services/YARN/metainfo.xml   |   6 +-
 .../HDP/2.2/services/ZOOKEEPER/metainfo.xml     |   2 +-
 .../api/util/StackExtensionHelperTest.java      |  29 +-
 .../AmbariManagementControllerTest.java         |   6 +-
 .../AmbariPrivilegeResourceProviderTest.java    |   2 +-
 .../internal/BaseBlueprintProcessorTest.java    |  27 +-
 .../BlueprintConfigurationProcessorTest.java    |  21 ++
 .../ViewInstanceResourceProviderTest.java       |  10 +-
 .../ViewPermissionResourceProviderTest.java     |   4 +-
 .../ViewPrivilegeResourceProviderTest.java      |   2 +-
 .../server/orm/entities/ViewEntityTest.java     |  22 +-
 .../server/upgrade/UpgradeCatalog170Test.java   | 241 ++++++++++----
 .../ambari/server/view/ViewRegistryTest.java    |  28 +-
 .../1.3.2/HIVE/test_hive_service_check.py       |  20 ++
 .../stacks/1.3.2/HIVE/test_webhcat_server.py    | 258 +++++++++++++++
 .../stacks/1.3.2/WEBHCAT/test_webhcat_server.py | 258 ---------------
 .../1.3.2/WEBHCAT/test_webhcat_service_check.py |  61 ----
 .../hooks/before-START/test_before_start.py     |   6 +-
 .../2.0.6/HIVE/test_hive_service_check.py       |  21 ++
 .../stacks/2.0.6/HIVE/test_webhcat_server.py    | 270 +++++++++++++++
 .../stacks/2.0.6/WEBHCAT/test_webhcat_server.py | 273 ---------------
 .../2.0.6/WEBHCAT/test_webhcat_service_check.py |  61 ----
 .../hooks/before-START/test_before_start.py     |   6 +-
 .../stacks/HDP/2.0.5/services/HIVE/metainfo.xml |  74 +++++
 .../WEBHCAT/configuration/webhcat-site.xml      | 126 -------
 .../HDP/2.0.5/services/WEBHCAT/metainfo.xml     | 102 ------
 .../HDP/2.0.6/services/WEBHCAT/metainfo.xml     |  28 --
 .../org/apache/ambari/view/ViewDefinition.java  |   8 +-
 ambari-web/app/assets/data/alerts/alerts.json   |   2 +-
 .../app/assets/data/dashboard/services.json     | 117 -------
 .../app/assets/data/hosts/HDP2/hosts.json       |  11 +-
 .../data/services/HDP2/components_state.json    |   9 -
 .../app/assets/data/services/HDP2/services.json |  16 -
 .../services/host_component_actual_configs.json | 118 +------
 .../data/stacks/HDP-2.1/recommendations.json    |   2 +-
 .../stacks/HDP-2.1/recommendations_configs.json |   2 +-
 .../data/stacks/HDP-2.1/service_components.json | 218 +++++-------
 .../data/wizard/stack/hdp/version/1.2.0.json    |  18 -
 .../data/wizard/stack/hdp/version/1.2.1.json    |  11 -
 .../data/wizard/stack/hdp/version/1.3.0.json    |  11 -
 .../data/wizard/stack/hdp/version/1.3.1.json    |  11 -
 .../data/wizard/stack/hdp/version/2.0.1.json    |  11 -
 .../data/wizard/stack/hdp/version/2.0.5.json    |  11 -
 .../data/wizard/stack/hdp/version0.1.json       |  17 -
 .../wizard/stack/hdp/version01/HCATALOG.json    |  20 --
 .../wizard/stack/hdp/version1.2.1/HCATALOG.json |   4 -
 .../wizard/stack/hdp/version1.3.0/HCATALOG.json |   4 -
 .../wizard/stack/hdp/version131/HCATALOG.json   |   4 -
 .../wizard/stack/hdp/version2.0.1/HCATALOG.json |   4 -
 .../app/assets/data/wizard/stack/stacks.json    |  55 ----
 .../main/admin/security/add/step2.js            |   4 +-
 .../main/admin/serviceAccounts_controller.js    |   2 +-
 .../controllers/main/service/info/configs.js    | 130 +++++---
 ambari-web/app/controllers/main/service/item.js |   2 +-
 .../app/controllers/wizard/step5_controller.js  |  92 ++++--
 .../app/controllers/wizard/step6_controller.js  |  31 +-
 .../app/controllers/wizard/step7_controller.js  |  18 +-
 .../app/controllers/wizard/step8_controller.js  |   3 +-
 ambari-web/app/data/HDP2/secure_configs.js      |  15 +-
 ambari-web/app/data/HDP2/secure_mapping.js      |  12 +-
 ambari-web/app/data/HDP2/secure_properties.js   |   8 +-
 ambari-web/app/data/HDP2/site_properties.js     |  22 +-
 ambari-web/app/data/secure_configs.js           |  15 +-
 ambari-web/app/data/secure_mapping.js           |  12 +-
 ambari-web/app/data/secure_properties.js        |   8 +-
 ambari-web/app/data/site_properties.js          |  22 +-
 ambari-web/app/mixins/common/serverValidator.js |   8 +-
 .../app/mixins/wizard/addSecurityConfigs.js     |   2 +-
 ambari-web/app/models/service.js                |  12 -
 ambari-web/app/models/stack_service.js          |  15 +-
 ambari-web/app/styles/application.less          |  14 +
 ambari-web/app/templates/application.hbs        |   2 +-
 .../app/templates/main/service/info/configs.hbs |   2 +-
 .../app/templates/main/service/info/summary.hbs |  26 +-
 ambari-web/app/utils/ajax/ajax.js               |   9 +
 .../app/utils/batch_scheduled_requests.js       |   1 -
 ambari-web/app/utils/config.js                  |   2 +-
 ambari-web/app/utils/helper.js                  |   1 -
 .../views/common/configs/config_history_flow.js |   2 +-
 .../app/views/common/quick_view_link_view.js    |   6 +-
 .../app/views/main/host/configs_service_menu.js |   2 +-
 .../app/views/main/service/info/summary.js      |  64 +++-
 ambari-web/app/views/main/service/item.js       |   7 +-
 ambari-web/app/views/main/service/menu.js       |   8 +-
 .../security/add/addSecurity_controller_test.js |   2 -
 .../main/service/info/config_test.js            |   8 +-
 .../test/controllers/wizard/step4_test.js       |  34 +-
 .../test/controllers/wizard/step8_test.js       |  14 +-
 ambari-web/test/models/service_test.js          |   8 -
 ambari-web/test/models/stack_service_test.js    |   8 -
 ambari-web/test/service_components.js           | 229 +++++--------
 ambari-web/test/utils/helper_test.js            |   1 -
 .../src/addOns/nagios/scripts/nagios_alerts.php |   8 +-
 .../apache/ambari/msi/ClusterDefinition.java    |   2 +-
 .../ambari/msi/ClusterDefinitionTest.java       |   4 -
 .../Scripts/HostComponentsDiscovery.ps1         |   3 +-
 .../slider-core/0.41.0/slider-core-0.41.0.jar   | Bin 1125710 -> 0 bytes
 .../slider-core/0.41.0/slider-core-0.41.0.pom   |  25 --
 .../slider-core/0.51.0/slider-core-0.51.0.jar   | Bin 0 -> 1144236 bytes
 .../slider-core/0.51.0/slider-core-0.51.0.pom   |  25 ++
 .../slider/slider-core/maven-metadata-local.xml |   6 +-
 contrib/views/slider/lib/slider-agent.tar.gz    | Bin 0 -> 480985 bytes
 contrib/views/slider/pom.xml                    |  10 +-
 .../view/slider/SliderAppsResourceProvider.java |  15 +-
 .../view/slider/SliderAppsViewController.java   |   9 +-
 .../slider/SliderAppsViewControllerImpl.java    | 329 +++++++++++--------
 .../view/slider/rest/SliderAppsResource.java    |   2 +-
 .../ambari/view/slider/rest/client/Metric.java  |   3 +
 .../assets/data/resource/service_status.json    |  12 -
 .../main/resources/ui/app/models/slider_app.js  |   2 +-
 .../resources/ui/app/styles/application.less    |   1 -
 225 files changed, 3669 insertions(+), 4671 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/17b8e799/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
----------------------------------------------------------------------
diff --cc ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
index 4ee2ac2,75635cc..435dd37
--- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
@@@ -18,75 -18,30 +18,88 @@@
  
  package org.apache.ambari.server.upgrade;
  
 -import com.google.common.reflect.TypeToken;
 -import com.google.inject.Inject;
 -import com.google.inject.Injector;
 +import java.lang.reflect.Type;
- 
 +import java.sql.Connection;
 +import java.sql.PreparedStatement;
 +import java.sql.ResultSet;
 +import java.sql.SQLException;
 +import java.util.ArrayList;
 +import java.util.Collections;
++import java.util.Date;
 +import java.util.HashMap;
 +import java.util.HashSet;
++import java.util.Iterator;
 +import java.util.List;
 +import java.util.Map;
 +import java.util.Map.Entry;
 +import java.util.Set;
- import java.util.Date;
 +
 +import javax.persistence.EntityManager;
 +import javax.persistence.TypedQuery;
 +import javax.persistence.criteria.CriteriaBuilder;
 +import javax.persistence.criteria.CriteriaQuery;
 +import javax.persistence.criteria.Expression;
 +import javax.persistence.criteria.Predicate;
 +import javax.persistence.criteria.Root;
 +
- import com.google.common.reflect.TypeToken;
  import org.apache.ambari.server.AmbariException;
  import org.apache.ambari.server.configuration.Configuration;
  import org.apache.ambari.server.controller.AmbariManagementController;
  import org.apache.ambari.server.orm.DBAccessor.DBColumnInfo;
 -import org.apache.ambari.server.orm.dao.*;
 -import org.apache.ambari.server.orm.entities.*;
 -import org.apache.ambari.server.state.*;
 +import org.apache.ambari.server.orm.dao.ClusterDAO;
++import org.apache.ambari.server.orm.dao.ClusterServiceDAO;
++import org.apache.ambari.server.orm.dao.ConfigGroupConfigMappingDAO;
 +import org.apache.ambari.server.orm.dao.DaoUtils;
++import org.apache.ambari.server.orm.dao.HostComponentDesiredStateDAO;
++import org.apache.ambari.server.orm.dao.HostComponentStateDAO;
 +import org.apache.ambari.server.orm.dao.HostRoleCommandDAO;
 +import org.apache.ambari.server.orm.dao.KeyValueDAO;
 +import org.apache.ambari.server.orm.dao.PermissionDAO;
 +import org.apache.ambari.server.orm.dao.PrincipalDAO;
 +import org.apache.ambari.server.orm.dao.PrincipalTypeDAO;
 +import org.apache.ambari.server.orm.dao.PrivilegeDAO;
 +import org.apache.ambari.server.orm.dao.ResourceDAO;
 +import org.apache.ambari.server.orm.dao.ResourceTypeDAO;
- import org.apache.ambari.server.orm.dao.ConfigGroupConfigMappingDAO;
++import org.apache.ambari.server.orm.dao.ServiceComponentDesiredStateDAO;
++import org.apache.ambari.server.orm.dao.ServiceDesiredStateDAO;
 +import org.apache.ambari.server.orm.dao.UserDAO;
 +import org.apache.ambari.server.orm.dao.ViewDAO;
 +import org.apache.ambari.server.orm.dao.ViewInstanceDAO;
++import org.apache.ambari.server.orm.entities.ClusterConfigEntity;
 +import org.apache.ambari.server.orm.entities.ClusterEntity;
- import org.apache.ambari.server.orm.entities.HostRoleCommandEntity;
++import org.apache.ambari.server.orm.entities.ClusterServiceEntity;
++import org.apache.ambari.server.orm.entities.ClusterServiceEntityPK;
 +import org.apache.ambari.server.orm.entities.ConfigGroupConfigMappingEntity;
- import org.apache.ambari.server.orm.entities.ClusterConfigEntity;
++import org.apache.ambari.server.orm.entities.HostComponentDesiredStateEntity;
++import org.apache.ambari.server.orm.entities.HostComponentStateEntity;
++import org.apache.ambari.server.orm.entities.HostRoleCommandEntity;
 +import org.apache.ambari.server.orm.entities.HostRoleCommandEntity_;
 +import org.apache.ambari.server.orm.entities.KeyValueEntity;
 +import org.apache.ambari.server.orm.entities.PermissionEntity;
 +import org.apache.ambari.server.orm.entities.PrincipalEntity;
 +import org.apache.ambari.server.orm.entities.PrincipalTypeEntity;
 +import org.apache.ambari.server.orm.entities.PrivilegeEntity;
 +import org.apache.ambari.server.orm.entities.ResourceEntity;
 +import org.apache.ambari.server.orm.entities.ResourceTypeEntity;
++import org.apache.ambari.server.orm.entities.ServiceComponentDesiredStateEntity;
++import org.apache.ambari.server.orm.entities.ServiceComponentDesiredStateEntityPK;
++import org.apache.ambari.server.orm.entities.ServiceDesiredStateEntity;
++import org.apache.ambari.server.orm.entities.ServiceDesiredStateEntityPK;
 +import org.apache.ambari.server.orm.entities.UserEntity;
 +import org.apache.ambari.server.orm.entities.ViewEntity;
 +import org.apache.ambari.server.orm.entities.ViewInstanceEntity;
 +import org.apache.ambari.server.state.Cluster;
 +import org.apache.ambari.server.state.Clusters;
 +import org.apache.ambari.server.state.Config;
 +import org.apache.ambari.server.state.ConfigHelper;
 +import org.apache.ambari.server.state.alert.Scope;
  import org.apache.ambari.server.utils.StageUtils;
  import org.slf4j.Logger;
  import org.slf4j.LoggerFactory;
  
 -import javax.persistence.EntityManager;
 -import javax.persistence.TypedQuery;
 -import javax.persistence.criteria.*;
 -import java.lang.reflect.Type;
 -import java.sql.Connection;
 -import java.sql.PreparedStatement;
 -import java.sql.ResultSet;
 -import java.sql.SQLException;
 -import java.util.*;
 -import java.util.Map.Entry;
++import com.google.common.reflect.TypeToken;
 +import com.google.inject.Inject;
 +import com.google.inject.Injector;
  
  /**
   * Upgrade catalog for version 1.7.0.
@@@ -598,6 -556,117 +614,118 @@@ public class UpgradeCatalog170 extends 
      moveConfigGroupsGlobalToEnv();
    }
  
+   public void moveHcatalogIntoHiveService() throws AmbariException {
+     final String serviceName = "HIVE";
+     final String serviceNameToBeDeleted = "HCATALOG";
+     final String componentName = "HCAT";
+     moveComponentsIntoService(serviceName, serviceNameToBeDeleted, componentName);
+   }
+ 
+   private void moveWebHcatIntoHiveService() throws AmbariException {
+     final String serviceName = "HIVE";
+     final String serviceNameToBeDeleted = "WEBHCAT";
+     final String componentName = "WEBHCAT_SERVER";
+     moveComponentsIntoService(serviceName, serviceNameToBeDeleted, componentName);
+   }
+ 
+   private void moveComponentsIntoService(String serviceName, String serviceNameToBeDeleted, String componentName) throws AmbariException {
+     /**
+      * 1. ADD servicecomponentdesiredstate: Add HCAT HIVE entry:
+      * 2. Update hostcomponentdesiredstate: service_name to HIVE where service_name is HCATALOG:
+      * 3. Update hostcomponentstate: service_name to HIVE where service_name is HCATALOG:
+      * 4. DELETE servicecomponentdesiredstate: where component_name is HCAT and service_name is HCATALOG :
+      * 5. Delete servicedesiredstate where  service_name is HCATALOG:
+      * 6. Delete clusterservices where service_name is  HCATALOG:
+      */
+     ClusterDAO clusterDAO = injector.getInstance(ClusterDAO.class);
+     ClusterServiceDAO clusterServiceDAO = injector.getInstance(ClusterServiceDAO.class);
+     ServiceDesiredStateDAO serviceDesiredStateDAO = injector.getInstance(ServiceDesiredStateDAO.class);
+     ServiceComponentDesiredStateDAO serviceComponentDesiredStateDAO = injector.getInstance(ServiceComponentDesiredStateDAO.class);
+     HostComponentDesiredStateDAO hostComponentDesiredStateDAO = injector.getInstance(HostComponentDesiredStateDAO.class);
+     HostComponentStateDAO hostComponentStateDAO = injector.getInstance(HostComponentStateDAO.class);
+ 
+     List<ClusterEntity> clusterEntities = clusterDAO.findAll();
+     for (final ClusterEntity clusterEntity : clusterEntities) {
+       ServiceComponentDesiredStateEntityPK pkHCATInHcatalog = new ServiceComponentDesiredStateEntityPK();
+       pkHCATInHcatalog.setComponentName(componentName);
+       pkHCATInHcatalog.setClusterId(clusterEntity.getClusterId());
+       pkHCATInHcatalog.setServiceName(serviceNameToBeDeleted);
+       ServiceComponentDesiredStateEntity serviceComponentDesiredStateEntityToDelete = serviceComponentDesiredStateDAO.findByPK(pkHCATInHcatalog);
+ 
 -      if (serviceComponentDesiredStateEntityToDelete == null)
++      if (serviceComponentDesiredStateEntityToDelete == null) {
+         continue;
++      }
+ 
+       ServiceDesiredStateEntityPK serviceDesiredStateEntityPK = new ServiceDesiredStateEntityPK();
+       serviceDesiredStateEntityPK.setClusterId(clusterEntity.getClusterId());
+       serviceDesiredStateEntityPK.setServiceName(serviceNameToBeDeleted);
+       ServiceDesiredStateEntity serviceDesiredStateEntity = serviceDesiredStateDAO.findByPK(serviceDesiredStateEntityPK);
+ 
+       ClusterServiceEntityPK clusterServiceEntityToBeDeletedPK = new ClusterServiceEntityPK();
+       clusterServiceEntityToBeDeletedPK.setClusterId(clusterEntity.getClusterId());
+       clusterServiceEntityToBeDeletedPK.setServiceName(serviceNameToBeDeleted);
+       ClusterServiceEntity clusterServiceEntityToBeDeleted = clusterServiceDAO.findByPK(clusterServiceEntityToBeDeletedPK);
+ 
+       ClusterServiceEntityPK clusterServiceEntityPK = new ClusterServiceEntityPK();
+       clusterServiceEntityPK.setClusterId(clusterEntity.getClusterId());
+       clusterServiceEntityPK.setServiceName(serviceName);
+ 
+ 
+       ClusterServiceEntity clusterServiceEntity = clusterServiceDAO.findByPK(clusterServiceEntityPK);
+ 
+       ServiceComponentDesiredStateEntity serviceComponentDesiredStateEntity = new ServiceComponentDesiredStateEntity();
+       serviceComponentDesiredStateEntity.setServiceName(serviceName);
+       serviceComponentDesiredStateEntity.setComponentName(serviceComponentDesiredStateEntityToDelete.getComponentName());
+       serviceComponentDesiredStateEntity.setClusterId(clusterEntity.getClusterId());
+       serviceComponentDesiredStateEntity.setDesiredStackVersion(serviceComponentDesiredStateEntityToDelete.getDesiredStackVersion());
+       serviceComponentDesiredStateEntity.setDesiredState(serviceComponentDesiredStateEntityToDelete.getDesiredState());
+       serviceComponentDesiredStateEntity.setClusterServiceEntity(clusterServiceEntity);
+       //serviceComponentDesiredStateDAO.create(serviceComponentDesiredStateEntity);
+ 
+       Iterator<HostComponentDesiredStateEntity> hostComponentDesiredStateIterator = serviceComponentDesiredStateEntityToDelete.getHostComponentDesiredStateEntities().iterator();
+       Iterator<HostComponentStateEntity> hostComponentStateIterator = serviceComponentDesiredStateEntityToDelete.getHostComponentStateEntities().iterator();
+ 
+       while (hostComponentDesiredStateIterator.hasNext()) {
+         HostComponentDesiredStateEntity hcDesiredStateEntityToBeDeleted = hostComponentDesiredStateIterator.next();
+         HostComponentDesiredStateEntity hostComponentDesiredStateEntity = new HostComponentDesiredStateEntity();
+         hostComponentDesiredStateEntity.setClusterId(clusterEntity.getClusterId());
+         hostComponentDesiredStateEntity.setComponentName(hcDesiredStateEntityToBeDeleted.getComponentName());
+         hostComponentDesiredStateEntity.setDesiredStackVersion(hcDesiredStateEntityToBeDeleted.getDesiredStackVersion());
+         hostComponentDesiredStateEntity.setDesiredState(hcDesiredStateEntityToBeDeleted.getDesiredState());
+         hostComponentDesiredStateEntity.setHostName(hcDesiredStateEntityToBeDeleted.getHostName());
+         hostComponentDesiredStateEntity.setHostEntity(hcDesiredStateEntityToBeDeleted.getHostEntity());
+         hostComponentDesiredStateEntity.setAdminState(hcDesiredStateEntityToBeDeleted.getAdminState());
+         hostComponentDesiredStateEntity.setMaintenanceState(hcDesiredStateEntityToBeDeleted.getMaintenanceState());
+         hostComponentDesiredStateEntity.setRestartRequired(hcDesiredStateEntityToBeDeleted.isRestartRequired());
+         hostComponentDesiredStateEntity.setServiceName(serviceName);
+         hostComponentDesiredStateEntity.setServiceComponentDesiredStateEntity(serviceComponentDesiredStateEntity);
+         hostComponentDesiredStateDAO.merge(hostComponentDesiredStateEntity);
+         hostComponentDesiredStateDAO.remove(hcDesiredStateEntityToBeDeleted);
+       }
+ 
+       while (hostComponentStateIterator.hasNext()) {
+         HostComponentStateEntity hcStateToBeDeleted = hostComponentStateIterator.next();
+         HostComponentStateEntity hostComponentStateEntity = new HostComponentStateEntity();
+         hostComponentStateEntity.setClusterId(clusterEntity.getClusterId());
+         hostComponentStateEntity.setComponentName(hcStateToBeDeleted.getComponentName());
+         hostComponentStateEntity.setCurrentStackVersion(hcStateToBeDeleted.getCurrentStackVersion());
+         hostComponentStateEntity.setCurrentState(hcStateToBeDeleted.getCurrentState());
+         hostComponentStateEntity.setHostName(hcStateToBeDeleted.getHostName());
+         hostComponentStateEntity.setHostEntity(hcStateToBeDeleted.getHostEntity());
+         hostComponentStateEntity.setServiceName(serviceName);
+         hostComponentStateEntity.setServiceComponentDesiredStateEntity(serviceComponentDesiredStateEntity);
+         hostComponentStateDAO.merge(hostComponentStateEntity);
+         hostComponentStateDAO.remove(hcStateToBeDeleted);
+       }
+       serviceComponentDesiredStateEntity.setClusterServiceEntity(clusterServiceEntity);
+       serviceComponentDesiredStateDAO.merge(serviceComponentDesiredStateEntity);
+       serviceComponentDesiredStateDAO.remove(serviceComponentDesiredStateEntityToDelete);
+       serviceDesiredStateDAO.remove(serviceDesiredStateEntity);
+       clusterServiceDAO.remove(clusterServiceEntityToBeDeleted);
+     }
+   }
+ 
+ 
    private void moveConfigGroupsGlobalToEnv() throws AmbariException {
      final ConfigGroupConfigMappingDAO confGroupConfMappingDAO = injector.getInstance(ConfigGroupConfigMappingDAO.class);
      ConfigHelper configHelper = injector.getInstance(ConfigHelper.class);

http://git-wip-us.apache.org/repos/asf/ambari/blob/17b8e799/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 6c868b4,8a3e270..8966fc0
--- 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
@@@ -3131,7 -3059,7 +3131,7 @@@ public class AmbariManagementController
      Assert.assertNull(stage1.getExecutionCommandWrapper(host2, "DATANODE"));
      Assert.assertNotNull(stage3.getExecutionCommandWrapper(host1, "HBASE_SERVICE_CHECK"));
      Assert.assertNotNull(stage2.getExecutionCommandWrapper(host2, "HDFS_SERVICE_CHECK"));
-- 
++
      Type type = new TypeToken<Map<String, String>>() {}.getType();
  
  
@@@ -6516,7 -6442,7 +6516,7 @@@
          }
        }
      }
-- 
++
      Type type = new TypeToken<Map<String, String>>(){}.getType();
      for (Stage stage : actionDB.getAllStages(requestId)){
        Map<String, String> hostParamsStage = StageUtils.getGson().fromJson(stage.getHostParamsStage(), type);

http://git-wip-us.apache.org/repos/asf/ambari/blob/17b8e799/ambari-web/app/utils/ajax/ajax.js
----------------------------------------------------------------------