Merge branch 'branch-2.5' into branch-feature-AMBARI-21450
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/54c57662 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/54c57662 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/54c57662 Branch: refs/heads/branch-2.6 Commit: 54c57662b70aac566f50f6ae36bd625e9fc480a3 Parents: 54c4b49 cfedbdf Author: Jonathan Hurley <jhur...@hortonworks.com> Authored: Tue Jul 25 10:27:39 2017 -0400 Committer: Jonathan Hurley <jhur...@hortonworks.com> Committed: Tue Jul 25 10:27:39 2017 -0400 ---------------------------------------------------------------------- .../resource_management/core/files/killtree.sh | 2 +- .../libraries/providers/hdfs_resource.py | 48 ++- .../server/api/services/AmbariMetaInfo.java | 34 +- .../server/configuration/Configuration.java | 6 +- .../AmbariCustomCommandExecutionHelper.java | 5 + .../AmbariManagementControllerImpl.java | 43 ++- .../ambari/server/controller/AmbariServer.java | 10 +- .../state/alert/AlertDefinitionFactory.java | 31 +- .../ambari/server/state/alert/ScriptSource.java | 4 + .../upgrade/AbstractFinalUpgradeCatalog.java | 58 ++++ .../server/upgrade/FinalUpgradeCatalog.java | 45 +-- .../server/upgrade/SchemaUpgradeHelper.java | 1 + .../server/upgrade/UpdateAlertScriptPaths.java | 48 +++ .../server/upgrade/UpgradeCatalog252.java | 31 ++ .../main/python/ambari_server/setupSecurity.py | 4 - .../OOZIE/4.0.0.2.0/package/scripts/oozie.py | 40 ++- .../package/scripts/oozie_server_upgrade.py | 35 +- .../3.4.5/package/scripts/params_linux.py | 5 +- .../before-ANY/scripts/shared_initialization.py | 2 +- .../4.0/services/AMBARI_METRICS/alerts.json | 25 -- .../before-ANY/scripts/shared_initialization.py | 2 +- .../4.2.5/upgrades/config-upgrade.xml | 10 +- .../upgrades/nonrolling-upgrade-to-hdp-2.6.xml | 17 +- .../4.2/services/AMBARI_METRICS/alerts.json | 25 -- .../configuration/ams-grafana-env.xml | 93 ++++++ .../configuration/ams-grafana-ini.xml | 320 +++++++++++++++++++ .../configuration/ams-hbase-site.xml | 90 +++++- .../AMBARI_METRICS/configuration/ams-site.xml | 215 +++++++++++-- .../configuration/ams-ssl-client.xml | 51 +++ .../configuration/ams-ssl-server.xml | 80 +++++ .../BigInsights/4.2/upgrades/config-upgrade.xml | 11 +- .../upgrades/nonrolling-upgrade-to-hdp-2.6.xml | 14 + .../stacks/HDP/2.6/services/stack_advisor.py | 33 +- .../server/api/services/AmbariMetaInfoTest.java | 6 +- .../src/test/python/TestAmbariServer.py | 13 +- .../stacks/2.0.6/OOZIE/test_oozie_server.py | 32 +- .../app/mappers/components_state_mapper.js | 5 + .../app/mappers/service_metrics_mapper.js | 3 + ambari-web/app/messages.js | 3 + ambari-web/app/models/service/hbase.js | 3 + .../templates/main/service/services/hbase.hbs | 20 ++ .../app/views/main/service/services/hbase.js | 8 + ambari-web/app/views/wizard/step1_view.js | 4 +- ambari-web/test/views/wizard/step1_view_test.js | 48 ++- 44 files changed, 1323 insertions(+), 260 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/54c57662/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/54c57662/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/54c57662/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/54c57662/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java ---------------------------------------------------------------------- diff --cc ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java index a1d2b87,77f683c..35e5b10 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java @@@ -178,8 -178,22 +178,9 @@@ public class SchemaUpgradeHelper // Add binding to each newly created catalog Multibinder<UpgradeCatalog> catalogBinder = Multibinder.newSetBinder(binder(), UpgradeCatalog.class); - catalogBinder.addBinding().to(UpgradeCatalog200.class); - catalogBinder.addBinding().to(UpgradeCatalog210.class); - catalogBinder.addBinding().to(UpgradeCatalog211.class); - catalogBinder.addBinding().to(UpgradeCatalog212.class); - catalogBinder.addBinding().to(UpgradeCatalog2121.class); - catalogBinder.addBinding().to(UpgradeCatalog220.class); - catalogBinder.addBinding().to(UpgradeCatalog221.class); - catalogBinder.addBinding().to(UpgradeCatalog222.class); - catalogBinder.addBinding().to(UpgradeCatalog230.class); - catalogBinder.addBinding().to(UpgradeCatalog240.class); - catalogBinder.addBinding().to(UpgradeCatalog2402.class); - catalogBinder.addBinding().to(UpgradeCatalog242.class); - catalogBinder.addBinding().to(UpgradeCatalog250.class); catalogBinder.addBinding().to(UpgradeCatalog251.class); catalogBinder.addBinding().to(UpgradeCatalog252.class); + catalogBinder.addBinding().to(UpdateAlertScriptPaths.class); catalogBinder.addBinding().to(FinalUpgradeCatalog.class); EventBusSynchronizer.synchronizeAmbariEventPublisher(binder()); http://git-wip-us.apache.org/repos/asf/ambari/blob/54c57662/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog252.java ---------------------------------------------------------------------- diff --cc ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog252.java index 0fcf779,ca7ab3f..086d335 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog252.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog252.java @@@ -27,18 -27,18 +27,20 @@@ import java.util.Map import java.util.Set; import org.apache.ambari.server.AmbariException; + import org.apache.ambari.server.controller.AmbariManagementController; import org.apache.ambari.server.orm.DBAccessor.DBColumnInfo; import org.apache.ambari.server.orm.dao.ClusterDAO; -import org.apache.ambari.server.orm.entities.ClusterConfigMappingEntity; +import org.apache.ambari.server.orm.entities.ClusterConfigEntity; import org.apache.ambari.server.orm.entities.ClusterEntity; 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.PropertyInfo; + import org.apache.ambari.server.state.StackId; import org.apache.commons.lang.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import com.google.common.collect.Sets; import com.google.inject.Inject; @@@ -63,8 -65,11 +65,11 @@@ public class UpgradeCatalog252 extends private static final String CLUSTER_ENV = "cluster-env"; + private static final String HIVE_ENV = "hive-env"; + private static final String MARIADB_REDHAT_SUPPORT = "mariadb_redhat_support"; + private static final List<String> configTypesToEnsureSelected = Arrays.asList("spark2-javaopts-properties"); - + /** * Logger. */ http://git-wip-us.apache.org/repos/asf/ambari/blob/54c57662/ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java ---------------------------------------------------------------------- diff --cc ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java index 5ee3c8a,bfb3c31..229b864 --- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java @@@ -1691,14 -1867,11 +1691,14 @@@ public class AmbariMetaInfoTest Clusters clusters = injector.getInstance(Clusters.class); Cluster cluster = clusters.getClusterById(clusterId); cluster.setDesiredStackVersion( - new StackId(STACK_NAME_HDP, "2.0.6")); + new StackId(STACK_NAME_HDP, stackVersion)); + + RepositoryVersionEntity repositoryVersion = ormHelper.getOrCreateRepositoryVersion( + cluster.getCurrentStackVersion(), repoVersion); - cluster.addService("HDFS"); + cluster.addService("HDFS", repositoryVersion); - metaInfo.reconcileAlertDefinitions(clusters); + metaInfo.reconcileAlertDefinitions(clusters, false); AlertDefinitionDAO dao = injector.getInstance(AlertDefinitionDAO.class); List<AlertDefinitionEntity> definitions = dao.findAll(clusterId); @@@ -1722,10 -1895,10 +1722,10 @@@ dao.merge(definition); } - metaInfo.reconcileAlertDefinitions(clusters); + metaInfo.reconcileAlertDefinitions(clusters, false); definitions = dao.findAll(); - assertEquals(12, definitions.size()); + assertEquals(13, definitions.size()); for (AlertDefinitionEntity definition : definitions) { assertEquals(28, definition.getScheduleInterval().intValue()); @@@ -1753,10 -1926,10 +1753,10 @@@ // verify the new definition is found (6 HDFS + 1 new one) definitions = dao.findAllEnabled(cluster.getClusterId()); - assertEquals(12, definitions.size()); + assertEquals(13, definitions.size()); // reconcile, which should disable our bad definition - metaInfo.reconcileAlertDefinitions(clusters); + metaInfo.reconcileAlertDefinitions(clusters, false); // find all enabled for the cluster should find 6 definitions = dao.findAllEnabled(cluster.getClusterId()); http://git-wip-us.apache.org/repos/asf/ambari/blob/54c57662/ambari-web/app/messages.js ----------------------------------------------------------------------