ambari git commit: AMBARI-15067: Add custom commands for HAWQ to run check and clear cache(mithmatt via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk 183f71f90 -> 0941997b0 AMBARI-15067: Add custom commands for HAWQ to run check and clear cache(mithmatt via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0941997b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0941997b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0941997b Branch: refs/heads/trunk Commit: 0941997b0f68f1044242354c9f3f0f4b3a476c7d Parents: 183f71f Author: Jun AokiAuthored: Thu Feb 18 17:44:41 2016 -0800 Committer: Jun Aoki Committed: Thu Feb 18 17:44:41 2016 -0800 -- .../common-services/HAWQ/2.0.0/metainfo.xml | 16 +++ .../2.0.0/package/scripts/hawq_constants.py | 2 +- .../HAWQ/2.0.0/package/scripts/hawqmaster.py| 19 + .../HAWQ/2.0.0/package/scripts/master_helper.py | 16 --- .../HAWQ/2.0.0/package/scripts/params.py| 6 +++ .../HAWQ/2.0.0/package/templates/hawq-hosts.j2 | 22 -- .../HAWQ/2.0.0/package/templates/slaves.j2 | 22 -- ambari-web/app/messages.js | 2 + ambari-web/app/models/host_component.js | 44 ++-- ambari-web/app/utils/helper.js | 20 + ambari-web/app/views/main/service/item.js | 2 +- 11 files changed, 96 insertions(+), 75 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0941997b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml index 656d3a1..b77eb34 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml @@ -46,6 +46,22 @@ 1200 + + HAWQ_CLEAR_CACHE + +scripts/hawqmaster.py +PYTHON +1200 + + + + RUN_HAWQ_CHECK + +scripts/hawqmaster.py +PYTHON +1200 + + http://git-wip-us.apache.org/repos/asf/ambari/blob/0941997b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py index 9fdbde5..2a671da 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py @@ -47,7 +47,7 @@ sysctl_conf_dir = "/etc/sysctl.d" # Files hawq_slaves_file = os.path.join(hawq_config_dir, "slaves") hawq_greenplum_path_file = os.path.join(hawq_home_dir, "greenplum_path.sh") -hawq_hosts_file = "/tmp/hawq_hosts" +hawq_hosts_file = os.path.join(hawq_config_dir, "hawq_hosts") hawq_check_file = os.path.join(hawq_config_dir, "hawq_check.cnf") sysctl_suse_file = "/etc/sysctl.conf" sysctl_backup_file = "/etc/sysctl.conf.backup.{0}" http://git-wip-us.apache.org/repos/asf/ambari/blob/0941997b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py index d2f9ad0..3309561 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py @@ -17,7 +17,13 @@ See the License for the specific language governing permissions and limitations under the License. """ from resource_management import Script +from resource_management.core.resources.system import Execute +from resource_management.core.logger import Logger from resource_management.libraries.functions.check_process_status import check_process_status +try: +from resource_management.libraries.functions import hdp_select as hadoop_select +except ImportError: +from resource_management.libraries.functions import phd_select as hadoop_select import master_helper import common @@ -54,5 +60,18 @@ class
ambari git commit: AMBARI-15067: Add custom commands for HAWQ to run check and clear cache(mithmatt via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 86d9c1187 -> 1e93caf4f AMBARI-15067: Add custom commands for HAWQ to run check and clear cache(mithmatt via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1e93caf4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1e93caf4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1e93caf4 Branch: refs/heads/branch-2.2 Commit: 1e93caf4f7ba92f0190433303b7920eaf54c57eb Parents: 86d9c11 Author: Jun AokiAuthored: Thu Feb 18 17:43:36 2016 -0800 Committer: Jun Aoki Committed: Thu Feb 18 17:43:36 2016 -0800 -- .../common-services/HAWQ/2.0.0/metainfo.xml | 16 ++ .../2.0.0/package/scripts/hawq_constants.py | 2 +- .../HAWQ/2.0.0/package/scripts/hawqmaster.py| 19 +++ .../HAWQ/2.0.0/package/scripts/master_helper.py | 16 +- .../HAWQ/2.0.0/package/scripts/params.py| 6 .../HAWQ/2.0.0/package/templates/hawq-hosts.j2 | 22 - .../HAWQ/2.0.0/package/templates/slaves.j2 | 22 - ambari-web/app/messages.js | 2 ++ ambari-web/app/models/host_component.js | 33 +++- ambari-web/app/utils/helper.js | 20 +++- ambari-web/app/views/main/service/item.js | 3 +- 11 files changed, 90 insertions(+), 71 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1e93caf4/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml index 942b250..4078990 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml @@ -46,6 +46,22 @@ 1200 + + HAWQ_CLEAR_CACHE + +scripts/hawqmaster.py +PYTHON +1200 + + + + RUN_HAWQ_CHECK + +scripts/hawqmaster.py +PYTHON +1200 + + http://git-wip-us.apache.org/repos/asf/ambari/blob/1e93caf4/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py index 9fdbde5..2a671da 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py @@ -47,7 +47,7 @@ sysctl_conf_dir = "/etc/sysctl.d" # Files hawq_slaves_file = os.path.join(hawq_config_dir, "slaves") hawq_greenplum_path_file = os.path.join(hawq_home_dir, "greenplum_path.sh") -hawq_hosts_file = "/tmp/hawq_hosts" +hawq_hosts_file = os.path.join(hawq_config_dir, "hawq_hosts") hawq_check_file = os.path.join(hawq_config_dir, "hawq_check.cnf") sysctl_suse_file = "/etc/sysctl.conf" sysctl_backup_file = "/etc/sysctl.conf.backup.{0}" http://git-wip-us.apache.org/repos/asf/ambari/blob/1e93caf4/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py index d2f9ad0..3309561 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py @@ -17,7 +17,13 @@ See the License for the specific language governing permissions and limitations under the License. """ from resource_management import Script +from resource_management.core.resources.system import Execute +from resource_management.core.logger import Logger from resource_management.libraries.functions.check_process_status import check_process_status +try: +from resource_management.libraries.functions import hdp_select as hadoop_select +except ImportError: +from resource_management.libraries.functions import phd_select as hadoop_select import master_helper import common @@
ambari git commit: AMBARI-15101. Remove the dependency between ZK start and Ranger user sync start (smohanty)
Repository: ambari Updated Branches: refs/heads/trunk 5ae72ac59 -> 183f71f90 AMBARI-15101. Remove the dependency between ZK start and Ranger user sync start (smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/183f71f9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/183f71f9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/183f71f9 Branch: refs/heads/trunk Commit: 183f71f90495cfbba29961182b293c9408d3effb Parents: 5ae72ac Author: Sumit MohantyAuthored: Thu Feb 18 14:53:44 2016 -0800 Committer: Sumit Mohanty Committed: Thu Feb 18 14:53:44 2016 -0800 -- .../src/main/resources/stacks/HDP/2.2/role_command_order.json | 1 - 1 file changed, 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/183f71f9/ambari-server/src/main/resources/stacks/HDP/2.2/role_command_order.json -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/role_command_order.json b/ambari-server/src/main/resources/stacks/HDP/2.2/role_command_order.json index 465d442..efa3b0d 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/role_command_order.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/role_command_order.json @@ -23,7 +23,6 @@ "KAFKA_BROKER-START" : ["ZOOKEEPER_SERVER-START", "RANGER_USERSYNC-START"], "KAFKA_SERVICE_CHECK-SERVICE_CHECK": ["KAFKA_BROKER-START"], "RANGER_USERSYNC-START" : ["RANGER_ADMIN-START"], -"ZOOKEEPER_SERVER-START" : ["RANGER_USERSYNC-START"], "KNOX_GATEWAY-START": ["RANGER_USERSYNC-START"], "KNOX_SERVICE_CHECK-SERVICE_CHECK" : ["KNOX_GATEWAY-START"], "RESOURCEMANAGER-START" : ["RANGER_USERSYNC-START"],
ambari git commit: AMBARI-15099 : Ambari missing metrics in UI with Vip settings enabled (avijayan)
Repository: ambari Updated Branches: refs/heads/trunk defbeddae -> 5ae72ac59 AMBARI-15099 : Ambari missing metrics in UI with Vip settings enabled (avijayan) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5ae72ac5 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5ae72ac5 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5ae72ac5 Branch: refs/heads/trunk Commit: 5ae72ac59e14dc033140ee4626dbe0761a574893 Parents: defbedd Author: Aravindan VijayanAuthored: Thu Feb 18 14:28:35 2016 -0800 Committer: Aravindan Vijayan Committed: Thu Feb 18 14:28:35 2016 -0800 -- .../internal/AbstractProviderModule.java| 31 ++-- 1 file changed, 16 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5ae72ac5/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java index 52d95e0..ff9b4e4 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java @@ -310,7 +310,7 @@ public abstract class AbstractProviderModule implements ProviderModule, if (!configProperties.isEmpty()) { clusterMetricserverVipHost = configProperties.get("METRICS_COLLECTOR"); if (clusterMetricserverVipHost != null) { -clusterMetricCollectorMap.put(clusterName, clusterMetricserverVipHost); +LOG.info("Setting Metrics Collector Vip Host : " + clusterMetricserverVipHost); vipHostConfigPresent = true; } } @@ -340,15 +340,19 @@ public abstract class AbstractProviderModule implements ProviderModule, if (isHostLive(clusterName, hostname) && isHostComponentLive(clusterName, hostname, "AMBARI_METRICS", Role.METRICS_COLLECTOR.name())) { clusterMetricCollectorMap.put(clusterName, hostname); -LOG.debug("New Metrics Collector Host : " + hostname); +LOG.info("New Metrics Collector Host : " + hostname); break; } else { -LOG.debug("Metrics Collector Host or host component not live : " + hostname); +LOG.info("Metrics Collector Host or host component not live : " + hostname); } } } } -return clusterMetricCollectorMap.get(clusterName); + +LOG.debug("Cluster Metrics Vip Host : " + clusterMetricserverVipHost); +LOG.debug("Cluster Metrics Collector Host : " + clusterMetricCollectorMap.get(clusterName)); + +return (clusterMetricserverVipHost != null) ? clusterMetricserverVipHost : clusterMetricCollectorMap.get(clusterName); } @Override @@ -848,19 +852,16 @@ public abstract class AbstractProviderModule implements ProviderModule, clusterGangliaCollectorMap.put(clusterName, hostName); } if (componentName.equals(METRIC_SERVER)) { -//If vip config not present // If current collector host is null or if the host or the host component not live //Update clusterMetricCollectorMap. -if (!vipHostConfigPresent) { - String currentCollectorHost = clusterMetricCollectorMap.get(clusterName); - LOG.debug("Current Metrics collector Host : " + currentCollectorHost); - if ((currentCollectorHost == null) || -!(isHostLive(clusterName, currentCollectorHost) && - isHostComponentLive(clusterName, currentCollectorHost, "AMBARI_METRICS", Role.METRICS_COLLECTOR.name())) -) { -LOG.debug("New Metrics collector Host : " + hostName); -clusterMetricCollectorMap.put(clusterName, hostName); - } +String currentCollectorHost = clusterMetricCollectorMap.get(clusterName); +LOG.info("Current Metrics collector Host : " + currentCollectorHost); +if ((currentCollectorHost == null) || + !(isHostLive(clusterName, currentCollectorHost) && +isHostComponentLive(clusterName, currentCollectorHost, "AMBARI_METRICS", Role.METRICS_COLLECTOR.name())) + ) { + LOG.info("New Metrics collector Host : " + hostName); + clusterMetricCollectorMap.put(clusterName, hostName); } metricServerHosts.add(hostName);
ambari git commit: AMBARI-15099 : Ambari missing metrics in UI with Vip settings enabled (avijayan)
Repository: ambari Updated Branches: refs/heads/branch-2.2 d12e14c90 -> 1210d0bd5 AMBARI-15099 : Ambari missing metrics in UI with Vip settings enabled (avijayan) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1210d0bd Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1210d0bd Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1210d0bd Branch: refs/heads/branch-2.2 Commit: 1210d0bd5077fa8358cd9af6107df30f2c074aae Parents: d12e14c Author: Aravindan VijayanAuthored: Thu Feb 18 14:23:00 2016 -0800 Committer: Aravindan Vijayan Committed: Thu Feb 18 14:23:09 2016 -0800 -- .../internal/AbstractProviderModule.java| 31 ++-- 1 file changed, 16 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1210d0bd/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java index 52d95e0..ff9b4e4 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java @@ -310,7 +310,7 @@ public abstract class AbstractProviderModule implements ProviderModule, if (!configProperties.isEmpty()) { clusterMetricserverVipHost = configProperties.get("METRICS_COLLECTOR"); if (clusterMetricserverVipHost != null) { -clusterMetricCollectorMap.put(clusterName, clusterMetricserverVipHost); +LOG.info("Setting Metrics Collector Vip Host : " + clusterMetricserverVipHost); vipHostConfigPresent = true; } } @@ -340,15 +340,19 @@ public abstract class AbstractProviderModule implements ProviderModule, if (isHostLive(clusterName, hostname) && isHostComponentLive(clusterName, hostname, "AMBARI_METRICS", Role.METRICS_COLLECTOR.name())) { clusterMetricCollectorMap.put(clusterName, hostname); -LOG.debug("New Metrics Collector Host : " + hostname); +LOG.info("New Metrics Collector Host : " + hostname); break; } else { -LOG.debug("Metrics Collector Host or host component not live : " + hostname); +LOG.info("Metrics Collector Host or host component not live : " + hostname); } } } } -return clusterMetricCollectorMap.get(clusterName); + +LOG.debug("Cluster Metrics Vip Host : " + clusterMetricserverVipHost); +LOG.debug("Cluster Metrics Collector Host : " + clusterMetricCollectorMap.get(clusterName)); + +return (clusterMetricserverVipHost != null) ? clusterMetricserverVipHost : clusterMetricCollectorMap.get(clusterName); } @Override @@ -848,19 +852,16 @@ public abstract class AbstractProviderModule implements ProviderModule, clusterGangliaCollectorMap.put(clusterName, hostName); } if (componentName.equals(METRIC_SERVER)) { -//If vip config not present // If current collector host is null or if the host or the host component not live //Update clusterMetricCollectorMap. -if (!vipHostConfigPresent) { - String currentCollectorHost = clusterMetricCollectorMap.get(clusterName); - LOG.debug("Current Metrics collector Host : " + currentCollectorHost); - if ((currentCollectorHost == null) || -!(isHostLive(clusterName, currentCollectorHost) && - isHostComponentLive(clusterName, currentCollectorHost, "AMBARI_METRICS", Role.METRICS_COLLECTOR.name())) -) { -LOG.debug("New Metrics collector Host : " + hostName); -clusterMetricCollectorMap.put(clusterName, hostName); - } +String currentCollectorHost = clusterMetricCollectorMap.get(clusterName); +LOG.info("Current Metrics collector Host : " + currentCollectorHost); +if ((currentCollectorHost == null) || + !(isHostLive(clusterName, currentCollectorHost) && +isHostComponentLive(clusterName, currentCollectorHost, "AMBARI_METRICS", Role.METRICS_COLLECTOR.name())) + ) { + LOG.info("New Metrics collector Host : " + hostName); + clusterMetricCollectorMap.put(clusterName, hostName); }
ambari git commit: AMBARI-15080. HBase unittest fails when using python 2.6(Lav Jain via odiachenko).
Repository: ambari Updated Branches: refs/heads/trunk 6d121dd6e -> defbeddae AMBARI-15080. HBase unittest fails when using python 2.6(Lav Jain via odiachenko). Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/defbedda Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/defbedda Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/defbedda Branch: refs/heads/trunk Commit: defbeddae55d110b3323b389c2666071eec6883d Parents: 6d121dd Author: Oleksandr DiachenkoAuthored: Thu Feb 18 13:54:05 2016 -0800 Committer: Oleksandr Diachenko Committed: Thu Feb 18 13:54:05 2016 -0800 -- .../python/stacks/2.0.6/HBASE/test_phoenix_queryserver.py | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/defbedda/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_phoenix_queryserver.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_phoenix_queryserver.py b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_phoenix_queryserver.py index 7722af0..6c3ad89 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_phoenix_queryserver.py +++ b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_phoenix_queryserver.py @@ -18,7 +18,8 @@ See the License for the specific language governing permissions and limitations under the License. ''' import json -from unittest import SkipTest +import sys +import unittest from mock.mock import MagicMock, patch from stacks.utils.RMFTestCase import * @@ -152,7 +153,11 @@ class TestPhoenixQueryServer(RMFTestCase): self.assertNoMoreResources() def test_start_default_24(self): -raise SkipTest("there's nothing to upgrade to yet") +if sys.version_info >= (2, 7): + raise unittest.SkipTest("there's nothing to upgrade to yet") +else: + # skiptest functionality is not available with Python 2.6 unittest + return self.executeScript( self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/phoenix_queryserver.py",
ambari git commit: AMBARI-15090. [Ambari tarballs] ambari-server python scripts should support running from custom root (aonishuk)
Repository: ambari Updated Branches: refs/heads/trunk 081820216 -> 6d121dd6e AMBARI-15090. [Ambari tarballs] ambari-server python scripts should support running from custom root (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6d121dd6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6d121dd6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6d121dd6 Branch: refs/heads/trunk Commit: 6d121dd6e361b36a144134cd6f89c72e7cc17f27 Parents: 0818202 Author: Andrew OnishukAuthored: Thu Feb 18 23:43:19 2016 +0200 Committer: Andrew Onishuk Committed: Thu Feb 18 23:43:41 2016 +0200 -- ambari-server/src/test/python/TestOSCheck.py | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6d121dd6/ambari-server/src/test/python/TestOSCheck.py -- diff --git a/ambari-server/src/test/python/TestOSCheck.py b/ambari-server/src/test/python/TestOSCheck.py index d919fbc..2d9f737 100644 --- a/ambari-server/src/test/python/TestOSCheck.py +++ b/ambari-server/src/test/python/TestOSCheck.py @@ -38,6 +38,7 @@ utils = __import__('ambari_server.utils').utils with patch("platform.linux_distribution", return_value = os_distro_value_linux): with patch.object(OSCheck, "os_distribution", return_value = os_distro_value): with patch.object(utils, "get_postgre_hba_dir"): + os.environ["ROOT"] = "" ambari_server = __import__('ambari-server') from ambari_server.serverConfiguration import update_ambari_properties, configDefaults
ambari git commit: AMBARI-15098: Ambari Schema Version should ignore patch number from version number (jluniya)
Repository: ambari Updated Branches: refs/heads/branch-2.2 e5521f379 -> d12e14c90 AMBARI-15098: Ambari Schema Version should ignore patch number from version number (jluniya) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d12e14c9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d12e14c9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d12e14c9 Branch: refs/heads/branch-2.2 Commit: d12e14c90c7b22034a39ec7b0872ff67445bb010 Parents: e5521f3 Author: Jayush LuniyaAuthored: Thu Feb 18 12:55:38 2016 -0800 Committer: Jayush Luniya Committed: Thu Feb 18 12:57:28 2016 -0800 -- ambari-server/pom.xml | 13 + .../apache/ambari/server/controller/AmbariServer.java | 3 ++- .../server/controller/utilities/DatabaseChecker.java | 2 +- .../src/main/resources/Ambari-DDL-MySQL-CREATE.sql | 2 +- .../src/main/resources/Ambari-DDL-Oracle-CREATE.sql| 2 +- .../src/main/resources/Ambari-DDL-Postgres-CREATE.sql | 2 +- .../resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql | 2 +- .../main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql | 2 +- .../src/main/resources/Ambari-DDL-SQLServer-CREATE.sql | 2 +- .../apache/ambari/server/utils/TestVersionUtils.java | 2 ++ 10 files changed, 24 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d12e14c9/ambari-server/pom.xml -- diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml index fe555bd..87ddd19 100644 --- a/ambari-server/pom.xml +++ b/ambari-server/pom.xml @@ -75,6 +75,19 @@ false + +regex-schema-version + + regex-property + + + ambariSchemaVersion + ${project.version} + ^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-).* + $1.$2.$3 + false + + http://git-wip-us.apache.org/repos/asf/ambari/blob/d12e14c9/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java index d5bcad9..2cd80aa 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java @@ -106,6 +106,7 @@ import org.apache.ambari.server.topology.TopologyManager; import org.apache.ambari.server.topology.TopologyRequestFactoryImpl; import org.apache.ambari.server.utils.RetryHelper; import org.apache.ambari.server.utils.StageUtils; +import org.apache.ambari.server.utils.VersionUtils; import org.apache.ambari.server.view.ViewRegistry; import org.apache.velocity.app.Velocity; import org.eclipse.jetty.server.Server; @@ -718,7 +719,7 @@ public class AmbariServer { MetainfoEntity schemaVersion = new MetainfoEntity(); schemaVersion.setMetainfoName(Configuration.SERVER_VERSION_KEY); - schemaVersion.setMetainfoValue(ambariMetaInfo.getServerVersion()); + schemaVersion.setMetainfoValue(VersionUtils.getVersionSubstring(ambariMetaInfo.getServerVersion())); metainfoDAO.create(schemaVersion); } http://git-wip-us.apache.org/repos/asf/ambari/blob/d12e14c9/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/DatabaseChecker.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/DatabaseChecker.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/DatabaseChecker.java index d96ad83..f1fa4b7 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/DatabaseChecker.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/DatabaseChecker.java @@ -176,7 +176,7 @@ public class DatabaseChecker { throw new AmbariException("Unable to read server version file."); } -if (schemaVersionEntity==null || VersionUtils.compareVersions(schemaVersion, serverVersion, 4) != 0) { +if (schemaVersionEntity==null || VersionUtils.compareVersions(schemaVersion, serverVersion, 3) != 0) { String error = "Current database store version is not compatible with " + "current server version" + ", serverVersion=" + serverVersion
ambari git commit: AMBARI-15087. Add log level for check database logs.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/trunk a35b3c6df -> b57749da6 AMBARI-15087. Add log level for check database logs.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b57749da Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b57749da Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b57749da Branch: refs/heads/trunk Commit: b57749da6dc77e7d1c6340d515ea08a6a4ea4722 Parents: a35b3c6 Author: Vitaly BrodetskyiAuthored: Tue Feb 16 14:15:47 2016 +0200 Committer: Vitaly Brodetskyi Committed: Tue Feb 16 14:15:47 2016 +0200 -- ambari-server/conf/unix/log4j.properties | 2 +- ambari-server/conf/windows/log4j.properties | 2 +- ambari-server/src/main/conf/log4j.properties | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b57749da/ambari-server/conf/unix/log4j.properties -- diff --git a/ambari-server/conf/unix/log4j.properties b/ambari-server/conf/unix/log4j.properties index 18ec33e..0ccab22 100644 --- a/ambari-server/conf/unix/log4j.properties +++ b/ambari-server/conf/unix/log4j.properties @@ -57,7 +57,7 @@ log4j.additivity.org.apache.ambari.server.checks.CheckDatabaseHelper=false log4j.appender.dbcheck=org.apache.log4j.FileAppender log4j.appender.dbcheck.File=${ambari.log.dir}/${ambari.dbcheck.file} log4j.appender.dbcheck.layout=org.apache.log4j.PatternLayout -log4j.appender.dbcheck.layout.ConversionPattern=%d{ISO8601} %m%n +log4j.appender.dbcheck.layout.ConversionPattern=%d{ISO8601} %5p - %m%n # EclipsLink -> slf4j bridge log4j.logger.eclipselink=TRACE,eclipselink http://git-wip-us.apache.org/repos/asf/ambari/blob/b57749da/ambari-server/conf/windows/log4j.properties -- diff --git a/ambari-server/conf/windows/log4j.properties b/ambari-server/conf/windows/log4j.properties index 09505cf..cc40f74 100644 --- a/ambari-server/conf/windows/log4j.properties +++ b/ambari-server/conf/windows/log4j.properties @@ -83,7 +83,7 @@ log4j.additivity.org.apache.ambari.server.checks.CheckDatabaseHelper=false log4j.appender.dbcheck=org.apache.log4j.FileAppender log4j.appender.dbcheck.File=${ambari.log.dir}/${ambari.dbcheck.file} log4j.appender.dbcheck.layout=org.apache.log4j.PatternLayout -log4j.appender.dbcheck.layout.ConversionPattern=%d{ISO8601} %m%n +log4j.appender.dbcheck.layout.ConversionPattern=%d{ISO8601} %5p - %m%n # EclipsLink -> slf4j bridge log4j.logger.eclipselink=TRACE,eclipselink http://git-wip-us.apache.org/repos/asf/ambari/blob/b57749da/ambari-server/src/main/conf/log4j.properties -- diff --git a/ambari-server/src/main/conf/log4j.properties b/ambari-server/src/main/conf/log4j.properties index 1211fe3..8e6652d 100644 --- a/ambari-server/src/main/conf/log4j.properties +++ b/ambari-server/src/main/conf/log4j.properties @@ -83,7 +83,7 @@ log4j.additivity.org.apache.ambari.server.checks.CheckDatabaseHelper=false log4j.appender.dbcheck=org.apache.log4j.FileAppender log4j.appender.dbcheck.File=${ambari.log.dir}/${ambari.dbcheck.file} log4j.appender.dbcheck.layout=org.apache.log4j.PatternLayout -log4j.appender.dbcheck.layout.ConversionPattern=%d{ISO8601} %m%n +log4j.appender.dbcheck.layout.ConversionPattern=%d{ISO8601} %5p - %m%n # EclipsLink -> slf4j bridge log4j.logger.eclipselink=TRACE,eclipselink
ambari git commit: AMBARI-15087. Add log level for check database logs.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/branch-2.2 53bf27065 -> e5521f379 AMBARI-15087. Add log level for check database logs.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e5521f37 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e5521f37 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e5521f37 Branch: refs/heads/branch-2.2 Commit: e5521f3798a49b273392afc07de0c24fbb808d01 Parents: 53bf270 Author: Vitaly BrodetskyiAuthored: Tue Feb 16 14:13:20 2016 +0200 Committer: Vitaly Brodetskyi Committed: Tue Feb 16 14:13:20 2016 +0200 -- ambari-server/conf/unix/log4j.properties | 2 +- ambari-server/conf/windows/log4j.properties | 2 +- ambari-server/src/main/conf/log4j.properties | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e5521f37/ambari-server/conf/unix/log4j.properties -- diff --git a/ambari-server/conf/unix/log4j.properties b/ambari-server/conf/unix/log4j.properties index 18ec33e..0ccab22 100644 --- a/ambari-server/conf/unix/log4j.properties +++ b/ambari-server/conf/unix/log4j.properties @@ -57,7 +57,7 @@ log4j.additivity.org.apache.ambari.server.checks.CheckDatabaseHelper=false log4j.appender.dbcheck=org.apache.log4j.FileAppender log4j.appender.dbcheck.File=${ambari.log.dir}/${ambari.dbcheck.file} log4j.appender.dbcheck.layout=org.apache.log4j.PatternLayout -log4j.appender.dbcheck.layout.ConversionPattern=%d{ISO8601} %m%n +log4j.appender.dbcheck.layout.ConversionPattern=%d{ISO8601} %5p - %m%n # EclipsLink -> slf4j bridge log4j.logger.eclipselink=TRACE,eclipselink http://git-wip-us.apache.org/repos/asf/ambari/blob/e5521f37/ambari-server/conf/windows/log4j.properties -- diff --git a/ambari-server/conf/windows/log4j.properties b/ambari-server/conf/windows/log4j.properties index 09505cf..cc40f74 100644 --- a/ambari-server/conf/windows/log4j.properties +++ b/ambari-server/conf/windows/log4j.properties @@ -83,7 +83,7 @@ log4j.additivity.org.apache.ambari.server.checks.CheckDatabaseHelper=false log4j.appender.dbcheck=org.apache.log4j.FileAppender log4j.appender.dbcheck.File=${ambari.log.dir}/${ambari.dbcheck.file} log4j.appender.dbcheck.layout=org.apache.log4j.PatternLayout -log4j.appender.dbcheck.layout.ConversionPattern=%d{ISO8601} %m%n +log4j.appender.dbcheck.layout.ConversionPattern=%d{ISO8601} %5p - %m%n # EclipsLink -> slf4j bridge log4j.logger.eclipselink=TRACE,eclipselink http://git-wip-us.apache.org/repos/asf/ambari/blob/e5521f37/ambari-server/src/main/conf/log4j.properties -- diff --git a/ambari-server/src/main/conf/log4j.properties b/ambari-server/src/main/conf/log4j.properties index 1211fe3..8e6652d 100644 --- a/ambari-server/src/main/conf/log4j.properties +++ b/ambari-server/src/main/conf/log4j.properties @@ -83,7 +83,7 @@ log4j.additivity.org.apache.ambari.server.checks.CheckDatabaseHelper=false log4j.appender.dbcheck=org.apache.log4j.FileAppender log4j.appender.dbcheck.File=${ambari.log.dir}/${ambari.dbcheck.file} log4j.appender.dbcheck.layout=org.apache.log4j.PatternLayout -log4j.appender.dbcheck.layout.ConversionPattern=%d{ISO8601} %m%n +log4j.appender.dbcheck.layout.ConversionPattern=%d{ISO8601} %5p - %m%n # EclipsLink -> slf4j bridge log4j.logger.eclipselink=TRACE,eclipselink
ambari git commit: AMBARI-15066. Spark History server does not start after downgrade due to missing spark-events directory (Jeff Zhang via alejandro)
Repository: ambari Updated Branches: refs/heads/trunk b09994b81 -> a35b3c6df AMBARI-15066. Spark History server does not start after downgrade due to missing spark-events directory (Jeff Zhang via alejandro) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a35b3c6d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a35b3c6d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a35b3c6d Branch: refs/heads/trunk Commit: a35b3c6dfb5733aef7119dd3b26e295db12d1882 Parents: b09994b Author: Alejandro FernandezAuthored: Thu Feb 18 11:35:05 2016 -0800 Committer: Alejandro Fernandez Committed: Thu Feb 18 11:35:05 2016 -0800 -- .../stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml | 13 +++-- .../resources/stacks/HDP/2.3/upgrades/upgrade-2.4.xml | 2 ++ 2 files changed, 9 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a35b3c6d/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml index 67bc0e7..8fd74e4 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml @@ -320,6 +320,13 @@ + + + + + + + @@ -884,17 +891,11 @@ - - - - - - http://git-wip-us.apache.org/repos/asf/ambari/blob/a35b3c6d/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.4.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.4.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.4.xml index 42148b0..29ebc1f 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.4.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.4.xml @@ -658,6 +658,7 @@ + @@ -666,6 +667,7 @@ +
ambari git commit: AMBARI-15066. Spark History server does not start after downgrade due to missing spark-events directory (Jeff Zhang via alejandro)
Repository: ambari Updated Branches: refs/heads/branch-2.2 2b1f7496e -> 53bf27065 AMBARI-15066. Spark History server does not start after downgrade due to missing spark-events directory (Jeff Zhang via alejandro) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/53bf2706 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/53bf2706 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/53bf2706 Branch: refs/heads/branch-2.2 Commit: 53bf270657ae268c0ffd806f623da1a5650bbd09 Parents: 2b1f749 Author: Alejandro FernandezAuthored: Thu Feb 18 11:38:09 2016 -0800 Committer: Alejandro Fernandez Committed: Thu Feb 18 11:38:09 2016 -0800 -- .../stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml | 13 +++-- .../resources/stacks/HDP/2.3/upgrades/upgrade-2.4.xml | 2 ++ 2 files changed, 9 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/53bf2706/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml index 23ecc63..50a9848 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml @@ -314,6 +314,13 @@ + + + + + + + @@ -878,17 +885,11 @@ - - - - - - http://git-wip-us.apache.org/repos/asf/ambari/blob/53bf2706/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.4.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.4.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.4.xml index 42148b0..29ebc1f 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.4.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.4.xml @@ -658,6 +658,7 @@ + @@ -666,6 +667,7 @@ +
ambari git commit: AMBARI-15075. Edit Widget Wizard still open even though it was closed/saved in the previous step. (jaimin)
Repository: ambari Updated Branches: refs/heads/trunk 8f58e5f97 -> b09994b81 AMBARI-15075. Edit Widget Wizard still open even though it was closed/saved in the previous step. (jaimin) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b09994b8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b09994b8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b09994b8 Branch: refs/heads/trunk Commit: b09994b81c29ce0b9b835205ea7b8ff161a5f517 Parents: 8f58e5f Author: Jaimin JetlyAuthored: Fri Feb 19 01:00:08 2016 +0530 Committer: Jaimin Jetly Committed: Fri Feb 19 01:02:45 2016 +0530 -- .../service/widgets/create/wizard_controller.js | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b09994b8/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js -- diff --git a/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js b/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js index 69f63ed..d45b936 100644 --- a/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js +++ b/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js @@ -416,14 +416,21 @@ App.WidgetWizardController = App.WizardController.extend({ var service = App.Service.find(this.get('content.widgetService')); this.finish(); -this.get('popup').hide(); -App.router.transitionTo('main.services.service.summary', service); -if (!App.get('testMode')) { +var self = this; +var successCallBack = function() { + self.get('popup').hide(); + App.router.transitionTo('main.services.service.summary', service); + App.get('router.updateController').updateAll(); +}; + +if (App.get('testMode')) { + successCallBack(); +} else { App.clusterStatus.setClusterStatus({ clusterName: App.router.getClusterName(), clusterState: 'DEFAULT', localdb: App.db.data - }); + }, {successCallback: successCallBack}); } }, @@ -435,6 +442,5 @@ App.WidgetWizardController = App.WizardController.extend({ this.setCurrentStep('1', false, true); this.save('widgetType', ''); this.resetDbNamespace(); -App.get('router.updateController').updateAll(); } });
ambari git commit: AMBARI-15075. Edit Widget Wizard still open even though it was closed/saved in the previous step. (jaimin)
Repository: ambari Updated Branches: refs/heads/branch-2.2 67c9e8131 -> 2b1f7496e AMBARI-15075. Edit Widget Wizard still open even though it was closed/saved in the previous step. (jaimin) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2b1f7496 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2b1f7496 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2b1f7496 Branch: refs/heads/branch-2.2 Commit: 2b1f7496e87741836691de9b22ba7511014c64e8 Parents: 67c9e81 Author: Jaimin JetlyAuthored: Fri Feb 19 01:00:08 2016 +0530 Committer: Jaimin Jetly Committed: Fri Feb 19 01:00:20 2016 +0530 -- .../service/widgets/create/wizard_controller.js | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2b1f7496/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js -- diff --git a/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js b/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js index 69f63ed..d45b936 100644 --- a/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js +++ b/ambari-web/app/controllers/main/service/widgets/create/wizard_controller.js @@ -416,14 +416,21 @@ App.WidgetWizardController = App.WizardController.extend({ var service = App.Service.find(this.get('content.widgetService')); this.finish(); -this.get('popup').hide(); -App.router.transitionTo('main.services.service.summary', service); -if (!App.get('testMode')) { +var self = this; +var successCallBack = function() { + self.get('popup').hide(); + App.router.transitionTo('main.services.service.summary', service); + App.get('router.updateController').updateAll(); +}; + +if (App.get('testMode')) { + successCallBack(); +} else { App.clusterStatus.setClusterStatus({ clusterName: App.router.getClusterName(), clusterState: 'DEFAULT', localdb: App.db.data - }); + }, {successCallback: successCallBack}); } }, @@ -435,6 +442,5 @@ App.WidgetWizardController = App.WizardController.extend({ this.setCurrentStep('1', false, true); this.save('widgetType', ''); this.resetDbNamespace(); -App.get('router.updateController').updateAll(); } });
ambari git commit: AMBARI-15064. RU/EU can't start if hosts have name in MixedCASE in configs for NameNode, HBASE Master, ResourceManager (alejandro)
Repository: ambari Updated Branches: refs/heads/branch-2.2 620daba7c -> 67c9e8131 AMBARI-15064. RU/EU can't start if hosts have name in MixedCASE in configs for NameNode, HBASE Master, ResourceManager (alejandro) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/67c9e813 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/67c9e813 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/67c9e813 Branch: refs/heads/branch-2.2 Commit: 67c9e81317547a34a65d6bfe480e665473e47849 Parents: 620daba Author: Alejandro FernandezAuthored: Tue Feb 16 16:02:12 2016 -0800 Committer: Alejandro Fernandez Committed: Thu Feb 18 11:29:01 2016 -0800 -- .../controller/AmbariActionExecutionHelper.java | 13 ++- .../internal/UpgradeResourceProvider.java | 7 +- .../apache/ambari/server/stack/JmxQuery.java| 87 +++ .../ambari/server/stack/MasterHostResolver.java | 86 ++- .../AmbariManagementControllerTest.java | 2 +- .../ambari/server/state/UpgradeHelperTest.java | 109 --- 6 files changed, 231 insertions(+), 73 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/67c9e813/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java index fe2cc29..5e1bf9d 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java @@ -262,6 +262,13 @@ public class AmbariActionExecutionHelper { final String serviceName = actionContext.getExpectedServiceName(); final String componentName = actionContext.getExpectedComponentName(); +LOG.debug(String.format("Called addExecutionCommandsToStage() for serviceName: %s, componentName: %s.", serviceName, componentName)); +if (resourceFilter.getHostNames().isEmpty()) { + LOG.debug("Resource filter has no hostnames."); +} else { + LOG.debug(String.format("Resource filter has hosts: %s", StringUtils.join(resourceFilter.getHostNames(), ", "))); +} + if (null != cluster) { StackId stackId = cluster.getCurrentStackVersion(); if (serviceName != null && !serviceName.isEmpty()) { @@ -275,6 +282,7 @@ public class AmbariActionExecutionHelper { stackId.getStackVersion(), serviceName, componentName); } catch (ObjectNotFoundException e) { // do nothing, componentId is checked for null later +LOG.error(String.format("Did not find service %s and component %s in stack %s.", serviceName, componentName, stackId.getStackName())); } } else { for (String component : cluster.getService(serviceName).getServiceComponents().keySet()) { @@ -288,6 +296,7 @@ public class AmbariActionExecutionHelper { // All hosts are valid target host candidateHosts.addAll(clusters.getHostsForCluster(cluster.getClusterName()).keySet()); } + LOG.debug(String.format("Request for service %s and component %s is set to run on candidate hosts: %s.", serviceName, componentName, StringUtils.join(candidateHosts, ", "))); // Filter hosts that are in MS Set ignoredHosts = maintenanceStateHelper.filterHostsInMaintenanceState( @@ -301,7 +310,9 @@ public class AmbariActionExecutionHelper { } } ); + if (! ignoredHosts.isEmpty()) { +LOG.debug(String.format("Hosts to ignore: %s.", StringUtils.join(ignoredHosts, ", "))); LOG.debug("Ignoring action for hosts due to maintenance state." + "Ignored hosts =" + ignoredHosts + ", component=" + componentName + ", service=" + serviceName @@ -323,7 +334,7 @@ public class AmbariActionExecutionHelper { for (String hostname : resourceFilter.getHostNames()) { if (!candidateHosts.contains(hostname)) { throw new AmbariException("Request specifies host " + hostname + -" but its not a valid host based on the " + +" but it is not a valid host based on the " + "target service=" + serviceName + " and component=" + componentName); } } http://git-wip-us.apache.org/repos/asf/ambari/blob/67c9e813/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
ambari git commit: AMBARI-15064. RU/EU can't start if hosts have name in MixedCASE in configs for NameNode, HBASE Master, ResourceManager (alejandro)
Repository: ambari Updated Branches: refs/heads/trunk 7da4706a3 -> 8f58e5f97 AMBARI-15064. RU/EU can't start if hosts have name in MixedCASE in configs for NameNode, HBASE Master, ResourceManager (alejandro) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8f58e5f9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8f58e5f9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8f58e5f9 Branch: refs/heads/trunk Commit: 8f58e5f97e0e6c7853956ad4f48d45603cee9d7f Parents: 7da4706 Author: Alejandro FernandezAuthored: Thu Feb 18 11:21:04 2016 -0800 Committer: Alejandro Fernandez Committed: Thu Feb 18 11:21:16 2016 -0800 -- .../controller/AmbariActionExecutionHelper.java | 13 +- .../internal/UpgradeResourceProvider.java | 1 + .../ambari/server/stack/MasterHostResolver.java | 53 +-- .../AmbariManagementControllerTest.java | 2 +- .../ambari/server/state/UpgradeHelperTest.java | 140 +-- 5 files changed, 178 insertions(+), 31 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8f58e5f9/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java index 795dfa7..88180c0 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java @@ -262,6 +262,13 @@ public class AmbariActionExecutionHelper { final String serviceName = actionContext.getExpectedServiceName(); final String componentName = actionContext.getExpectedComponentName(); +LOG.debug("Called addExecutionCommandsToStage() for serviceName: {}, componentName: {}.", serviceName, componentName); +if (resourceFilter.getHostNames().isEmpty()) { + LOG.debug("Resource filter has no hostnames."); +} else { + LOG.debug("Resource filter has hosts: {}", StringUtils.join(resourceFilter.getHostNames(), ", ")); +} + if (null != cluster) { StackId stackId = cluster.getCurrentStackVersion(); if (serviceName != null && !serviceName.isEmpty()) { @@ -275,6 +282,7 @@ public class AmbariActionExecutionHelper { stackId.getStackVersion(), serviceName, componentName); } catch (ObjectNotFoundException e) { // do nothing, componentId is checked for null later +LOG.error("Did not find service {} and component {} in stack {}.", serviceName, componentName, stackId.getStackName()); } } else { for (String component : cluster.getService(serviceName).getServiceComponents().keySet()) { @@ -288,6 +296,7 @@ public class AmbariActionExecutionHelper { // All hosts are valid target host candidateHosts.addAll(clusters.getHostsForCluster(cluster.getClusterName()).keySet()); } + LOG.debug("Request for service {} and component {} is set to run on candidate hosts: {}.", serviceName, componentName, StringUtils.join(candidateHosts, ", ")); // Filter hosts that are in MS Set ignoredHosts = maintenanceStateHelper.filterHostsInMaintenanceState( @@ -301,7 +310,9 @@ public class AmbariActionExecutionHelper { } } ); + if (! ignoredHosts.isEmpty()) { +LOG.debug("Hosts to ignore: {}.", StringUtils.join(ignoredHosts, ", ")); LOG.debug("Ignoring action for hosts due to maintenance state." + "Ignored hosts =" + ignoredHosts + ", component=" + componentName + ", service=" + serviceName @@ -323,7 +334,7 @@ public class AmbariActionExecutionHelper { for (String hostname : resourceFilter.getHostNames()) { if (!candidateHosts.contains(hostname)) { throw new AmbariException("Request specifies host " + hostname + -" but its not a valid host based on the " + +" but it is not a valid host based on the " + "target service=" + serviceName + " and component=" + componentName); } } http://git-wip-us.apache.org/repos/asf/ambari/blob/8f58e5f9/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
ambari git commit: AMBARI-15082: HAWQ fails to install (mithmatt via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-2.2 494d9d78b -> 620daba7c AMBARI-15082: HAWQ fails to install (mithmatt via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/620daba7 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/620daba7 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/620daba7 Branch: refs/heads/branch-2.2 Commit: 620daba7cad89af4d2531ca74baddcf334502379 Parents: 494d9d7 Author: Jun AokiAuthored: Thu Feb 18 10:56:39 2016 -0800 Committer: Jun Aoki Committed: Thu Feb 18 10:56:39 2016 -0800 -- .../common-services/HAWQ/2.0.0/package/scripts/common.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/620daba7/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py index edeb5af..d62332d 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py @@ -67,15 +67,15 @@ def setup_common_configurations(): """ import params - params.XmlConfig(filename="hdfs-client.xml", + params.XmlConfig("hdfs-client.xml", configurations=params.hdfs_client, configuration_attributes=params.config_attrs['hdfs-client']) - params.XmlConfig(filename="yarn-client.xml", + params.XmlConfig("yarn-client.xml", configurations=params.yarn_client, configuration_attributes=params.config_attrs['yarn-client']) - params.XmlConfig(filename="hawq-site.xml", + params.XmlConfig("hawq-site.xml", configurations=params.hawq_site, configuration_attributes=params.config_attrs['hawq-site']) __set_osparams()
ambari git commit: AMBARI-15082: HAWQ fails to install (mithmatt via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk 1d7af0ebd -> 7da4706a3 AMBARI-15082: HAWQ fails to install (mithmatt via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7da4706a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7da4706a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7da4706a Branch: refs/heads/trunk Commit: 7da4706a33a03ce38739b5d5f0c11c4b2fc4bb94 Parents: 1d7af0e Author: Jun AokiAuthored: Thu Feb 18 10:55:42 2016 -0800 Committer: Jun Aoki Committed: Thu Feb 18 10:55:42 2016 -0800 -- .../common-services/HAWQ/2.0.0/package/scripts/common.py| 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7da4706a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py index b5353e8..00349d8 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py @@ -67,18 +67,15 @@ def setup_common_configurations(): """ import params - # Write hdfs-client.xml on the local filesystem. If hdfs HA is enabled, append related parameters - params.XmlConfig(filename="hdfs-client.xml", + params.XmlConfig("hdfs-client.xml", configurations=params.hdfs_client, configuration_attributes=params.config_attrs['hdfs-client']) - # Write yarn-client.xml on the local filesystem. If yarn HA is enabled, append related parameters - params.XmlConfig(filename="yarn-client.xml", + params.XmlConfig("yarn-client.xml", configurations=params.yarn_client, configuration_attributes=params.config_attrs['yarn-client']) - # Write hawq-site.xml on the local filesystem. - params.XmlConfig(filename="hawq-site.xml", + params.XmlConfig("hawq-site.xml", configurations=params.hawq_site, configuration_attributes=params.config_attrs['hawq-site']) __set_osparams()
[1/2] ambari git commit: AMBARI-15092. Oozie sharelib missing SQL JDBC driver (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.2 ad5ecf826 -> 494d9d78b refs/heads/trunk fab9fa5d8 -> 1d7af0ebd AMBARI-15092. Oozie sharelib missing SQL JDBC driver (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1d7af0eb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1d7af0eb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1d7af0eb Branch: refs/heads/trunk Commit: 1d7af0ebd37e2e0d01d6e03380cd52750754fea3 Parents: fab9fa5 Author: Andrew OnishukAuthored: Thu Feb 18 19:43:10 2016 +0200 Committer: Andrew Onishuk Committed: Thu Feb 18 19:43:10 2016 +0200 -- ambari-server/src/main/resources/scripts/Ambaripreupload.py | 7 +++ 1 file changed, 7 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1d7af0eb/ambari-server/src/main/resources/scripts/Ambaripreupload.py -- diff --git a/ambari-server/src/main/resources/scripts/Ambaripreupload.py b/ambari-server/src/main/resources/scripts/Ambaripreupload.py index a803de4..cc6213e 100644 --- a/ambari-server/src/main/resources/scripts/Ambaripreupload.py +++ b/ambari-server/src/main/resources/scripts/Ambaripreupload.py @@ -43,6 +43,8 @@ from resource_management.libraries.functions.format import format from resource_management.libraries.resources.hdfs_resource import HdfsResource from resource_management.libraries.resources.execute_hadoop import ExecuteHadoop from resource_management import Script + +SQL_DRIVER_PATH = "/var/lib/ambari-server/resources/sqljdbc41.jar" """ This file provides helper methods needed for the versioning of RPMs. Specifically, it does dynamic variable @@ -266,6 +268,10 @@ with Environment() as env: with open("/var/lib/ambari-agent/data/.hdfs_resource_ignore", "a+") as fp: fp.write(file_content) + def putSQLDriverToOozieShared(): + params.HdfsResource('/user/oozie/share/lib/sqoop/{0}'.format(os.path.basename(SQL_DRIVER_PATH)), +owner='hdfs', type='file', action=['create_on_execute'], mode=0644, source=SQL_DRIVER_PATH) + env.set_params(params) hadoop_conf_dir = params.hadoop_conf_dir @@ -374,6 +380,7 @@ with Environment() as env: copy_tarballs_to_hdfs(format("/usr/hdp/{hdp_version}/sqoop/sqoop.tar.gz"), hdfs_path_prefix+"/hdp/apps/{{ hdp_stack_version }}/sqoop/", 'hadoop-mapreduce-historyserver', params.mapred_user, params.hdfs_user, params.user_group) print "Creating hdfs directories..." createHdfsResources() + putSQLDriverToOozieShared() putCreatedHdfsResourcesToIgnore(env) # jar shouldn't be used before (read comment below)
[2/2] ambari git commit: AMBARI-15092. Oozie sharelib missing SQL JDBC driver (aonishuk)
AMBARI-15092. Oozie sharelib missing SQL JDBC driver (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/494d9d78 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/494d9d78 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/494d9d78 Branch: refs/heads/branch-2.2 Commit: 494d9d78bcc2078f517953d066c5ef926fdcb106 Parents: ad5ecf8 Author: Andrew OnishukAuthored: Thu Feb 18 19:43:16 2016 +0200 Committer: Andrew Onishuk Committed: Thu Feb 18 19:43:16 2016 +0200 -- ambari-server/src/main/resources/scripts/Ambaripreupload.py | 7 +++ 1 file changed, 7 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/494d9d78/ambari-server/src/main/resources/scripts/Ambaripreupload.py -- diff --git a/ambari-server/src/main/resources/scripts/Ambaripreupload.py b/ambari-server/src/main/resources/scripts/Ambaripreupload.py index a803de4..cc6213e 100644 --- a/ambari-server/src/main/resources/scripts/Ambaripreupload.py +++ b/ambari-server/src/main/resources/scripts/Ambaripreupload.py @@ -43,6 +43,8 @@ from resource_management.libraries.functions.format import format from resource_management.libraries.resources.hdfs_resource import HdfsResource from resource_management.libraries.resources.execute_hadoop import ExecuteHadoop from resource_management import Script + +SQL_DRIVER_PATH = "/var/lib/ambari-server/resources/sqljdbc41.jar" """ This file provides helper methods needed for the versioning of RPMs. Specifically, it does dynamic variable @@ -266,6 +268,10 @@ with Environment() as env: with open("/var/lib/ambari-agent/data/.hdfs_resource_ignore", "a+") as fp: fp.write(file_content) + def putSQLDriverToOozieShared(): + params.HdfsResource('/user/oozie/share/lib/sqoop/{0}'.format(os.path.basename(SQL_DRIVER_PATH)), +owner='hdfs', type='file', action=['create_on_execute'], mode=0644, source=SQL_DRIVER_PATH) + env.set_params(params) hadoop_conf_dir = params.hadoop_conf_dir @@ -374,6 +380,7 @@ with Environment() as env: copy_tarballs_to_hdfs(format("/usr/hdp/{hdp_version}/sqoop/sqoop.tar.gz"), hdfs_path_prefix+"/hdp/apps/{{ hdp_stack_version }}/sqoop/", 'hadoop-mapreduce-historyserver', params.mapred_user, params.hdfs_user, params.user_group) print "Creating hdfs directories..." createHdfsResources() + putSQLDriverToOozieShared() putCreatedHdfsResourcesToIgnore(env) # jar shouldn't be used before (read comment below)
ambari git commit: AMBARI-15090. [Ambari tarballs] ambari-server python scripts should support running from custom root (aonishuk)
Repository: ambari Updated Branches: refs/heads/trunk 260419bb8 -> fab9fa5d8 AMBARI-15090. [Ambari tarballs] ambari-server python scripts should support running from custom root (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fab9fa5d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fab9fa5d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fab9fa5d Branch: refs/heads/trunk Commit: fab9fa5d89a188719aa1c873123a94995e1c8aa3 Parents: 260419b Author: Andrew OnishukAuthored: Thu Feb 18 19:23:54 2016 +0200 Committer: Andrew Onishuk Committed: Thu Feb 18 19:24:10 2016 +0200 -- ambari-server/src/main/python/ambari_server/ambariPath.py | 4 +++- ambari-server/src/test/python/TestAmbariServer.py | 2 +- ambari-server/src/test/python/TestBackupRestore.py| 3 +++ ambari-server/src/test/python/TestResourceFilesKeeper.py | 3 +++ ambari-server/src/test/python/TestServerClassPath.py | 3 +++ ambari-server/src/test/python/TestServerUpgrade.py| 2 ++ ambari-server/src/test/python/TestServerUtils.py | 3 +++ 7 files changed, 18 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/fab9fa5d/ambari-server/src/main/python/ambari_server/ambariPath.py -- diff --git a/ambari-server/src/main/python/ambari_server/ambariPath.py b/ambari-server/src/main/python/ambari_server/ambariPath.py index 9d68206..1d57558 100644 --- a/ambari-server/src/main/python/ambari_server/ambariPath.py +++ b/ambari-server/src/main/python/ambari_server/ambariPath.py @@ -21,6 +21,7 @@ Ambari Agent """ import os +import re AMBARI_SERVER_ROOT_ENV_VARIABLE = "ROOT" @@ -34,6 +35,7 @@ class AmbariPath(): Which is needed for the situations when ambari-server installed not in / but in other folder like /opt. Not ambari paths like /var/run/postgresql SHOULD NOT wrapped by this call though. """ -return os.path.realpath(AmbariPath.root_directory + os.sep + path) +#return os.path.realpath(AmbariPath.root_directory + os.sep + path) # realpath won't replace slashes for python2.6 +return re.sub('/+', '/', AmbariPath.root_directory + os.sep + path) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/fab9fa5d/ambari-server/src/test/python/TestAmbariServer.py -- diff --git a/ambari-server/src/test/python/TestAmbariServer.py b/ambari-server/src/test/python/TestAmbariServer.py index 6c19d5e..c47cc67 100644 --- a/ambari-server/src/test/python/TestAmbariServer.py +++ b/ambari-server/src/test/python/TestAmbariServer.py @@ -34,6 +34,7 @@ import stat import StringIO import tempfile from unittest import TestCase +os.environ["ROOT"] = "" from only_for_platform import get_platform, not_for_platform, only_for_platform, os_distro_value, PLATFORM_LINUX, PLATFORM_WINDOWS @@ -45,7 +46,6 @@ with patch("platform.linux_distribution", return_value = os_distro_value): with patch("os.symlink"): with patch("__builtin__.open"): with patch("glob.glob", return_value = ['/etc/init.d/postgresql-9.3']): -os.environ["ROOT"] = "" _ambari_server_ = __import__('ambari-server') from ambari_commons.firewall import Firewall http://git-wip-us.apache.org/repos/asf/ambari/blob/fab9fa5d/ambari-server/src/test/python/TestBackupRestore.py -- diff --git a/ambari-server/src/test/python/TestBackupRestore.py b/ambari-server/src/test/python/TestBackupRestore.py index 8a377ec..ab37ca1 100644 --- a/ambari-server/src/test/python/TestBackupRestore.py +++ b/ambari-server/src/test/python/TestBackupRestore.py @@ -19,6 +19,9 @@ limitations under the License. import unittest +import os +os.environ["ROOT"] = "" + import mock from mock.mock import MagicMock, patch from ambari_server import BackupRestore http://git-wip-us.apache.org/repos/asf/ambari/blob/fab9fa5d/ambari-server/src/test/python/TestResourceFilesKeeper.py -- diff --git a/ambari-server/src/test/python/TestResourceFilesKeeper.py b/ambari-server/src/test/python/TestResourceFilesKeeper.py index f6efeb6..966d3b1 100644 --- a/ambari-server/src/test/python/TestResourceFilesKeeper.py +++ b/ambari-server/src/test/python/TestResourceFilesKeeper.py @@ -16,6 +16,9 @@ See the License for the specific language governing permissions and limitations under the License. ''' +import os +os.environ["ROOT"] = "" + import time import subprocess import os
ambari git commit: AMBARI-14921 - Atlas Integration : Support Atlas / Sqoop integration
Repository: ambari Updated Branches: refs/heads/trunk 0a9101e97 -> 260419bb8 AMBARI-14921 - Atlas Integration : Support Atlas / Sqoop integration Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/260419bb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/260419bb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/260419bb Branch: refs/heads/trunk Commit: 260419bb848ce962bbc238379221096eb2a31a58 Parents: 0a9101e Author: tbeerbowerAuthored: Thu Feb 18 11:22:03 2016 -0500 Committer: tbeerbower Committed: Thu Feb 18 12:15:55 2016 -0500 -- .../1.4.4.2.0/configuration/sqoop-site.xml | 43 .../SQOOP/1.4.4.2.0/metainfo.xml| 6 +++ .../1.4.4.2.0/package/scripts/params_linux.py | 20 - .../SQOOP/1.4.4.2.0/package/scripts/sqoop.py| 26 .../python/stacks/2.0.6/SQOOP/test_sqoop.py | 12 ++ .../python/stacks/2.0.6/configs/default.json| 5 +++ .../python/stacks/2.0.6/configs/secured.json| 5 +++ .../test/python/stacks/2.3/configs/default.json | 5 +++ 8 files changed, 121 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/260419bb/ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/configuration/sqoop-site.xml -- diff --git a/ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/configuration/sqoop-site.xml b/ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/configuration/sqoop-site.xml new file mode 100644 index 000..dd299fe --- /dev/null +++ b/ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/configuration/sqoop-site.xml @@ -0,0 +1,43 @@ + + + + + +atlas.cluster.name +{{cluster_name}} + + +application-properties +atlas.cluster.name + + + + +sqoop.job.data.publish.class +{{job_data_publish_class}} + + +application-properties +atlas.cluster.name + + + + http://git-wip-us.apache.org/repos/asf/ambari/blob/260419bb/ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/metainfo.xml b/ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/metainfo.xml index b5db91b..2c9d881 100644 --- a/ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/metainfo.xml @@ -55,6 +55,11 @@ + xml + squoop-site.xml + squoop-site + + env sqoop-env.sh sqoop-env @@ -89,6 +94,7 @@ sqoop-env +sqoop-site http://git-wip-us.apache.org/repos/asf/ambari/blob/260419bb/ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/package/scripts/params_linux.py index 3a3f93e..0006078 100644 --- a/ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/package/scripts/params_linux.py @@ -21,6 +21,7 @@ from resource_management.libraries.functions.version import format_hdp_stack_ver from resource_management.libraries.functions.default import default from resource_management.libraries.functions.get_kinit_path import get_kinit_path from resource_management.libraries.script import Script +import os # a map of the Ambari role to the component name # for use with /usr/hdp/current/ @@ -31,6 +32,9 @@ SERVER_ROLE_DIRECTORY_MAP = { component_directory = Script.get_component_from_role(SERVER_ROLE_DIRECTORY_MAP, "SQOOP") config = Script.get_config() + +cluster_name = config['clusterName'] + ambari_server_hostname = config['clusterHostInfo']['ambari_server_host'][0] stack_name = default("/hostLevelParams/stack_name", None) @@ -103,4 +107,18 @@ if "jdbc_drivers" in config['configurations']['sqoop-env']: continue sqoop_jdbc_drivers_dict[jdbc_jar_name] = jdbc_symlink_name sqoop_jdbc_drivers_name_dict[jdbc_jar_name] = jdbc_driver_name -jdk_location = config['hostLevelParams']['jdk_location'] \ No newline at end of file +jdk_location =
ambari git commit: AMBARI-15090. [Ambari tarballs] ambari-server python scripts should support running from custom root (aonishuk)
Repository: ambari Updated Branches: refs/heads/trunk 0c568cc8a -> 0bd63c80b AMBARI-15090. [Ambari tarballs] ambari-server python scripts should support running from custom root (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0bd63c80 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0bd63c80 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0bd63c80 Branch: refs/heads/trunk Commit: 0bd63c80b337e0818a5cb55781998c174e4cf6fa Parents: 0c568cc Author: Andrew OnishukAuthored: Thu Feb 18 17:56:22 2016 +0200 Committer: Andrew Onishuk Committed: Thu Feb 18 17:56:22 2016 +0200 -- .../src/main/repo/install_ambari_tarball.py | 2 +- ambari-server/conf/unix/ambari-env.sh | 6 +- ambari-server/conf/unix/ambari.properties | 30 +++--- ambari-server/conf/unix/install-helper.sh | 7 +- ambari-server/pom.xml | 1 + ambari-server/sbin/ambari-server| 57 +- .../src/main/package/deb/control/preinst| 2 +- ambari-server/src/main/python/ambari-server.py | 17 +-- .../main/python/ambari_server/BackupRestore.py | 11 +- .../src/main/python/ambari_server/ambariPath.py | 39 +++ .../ambari_server/dbConfiguration_linux.py | 29 +++--- .../python/ambari_server/serverConfiguration.py | 103 ++- .../main/python/ambari_server/serverSetup.py| 6 +- .../src/test/python/TestAmbariServer.py | 2 +- 14 files changed, 185 insertions(+), 127 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0bd63c80/ambari-common/src/main/repo/install_ambari_tarball.py -- diff --git a/ambari-common/src/main/repo/install_ambari_tarball.py b/ambari-common/src/main/repo/install_ambari_tarball.py index 5c65b60..e6578b0 100644 --- a/ambari-common/src/main/repo/install_ambari_tarball.py +++ b/ambari-common/src/main/repo/install_ambari_tarball.py @@ -200,7 +200,7 @@ class Installer: if self.verbose: bash_args.append("-x") -Utils.os_call(["bash"] + bash_args + [script_name] + args, env={ROOT_FOLDER_ENV_VARIABLE: self.root_folder}) +Utils.os_call(["bash"] + bash_args + [script_name] + args, env={ROOT_FOLDER_ENV_VARIABLE: self.root_folder}, logoutput=True) class TargzInstaller(Installer): http://git-wip-us.apache.org/repos/asf/ambari/blob/0bd63c80/ambari-server/conf/unix/ambari-env.sh -- diff --git a/ambari-server/conf/unix/ambari-env.sh b/ambari-server/conf/unix/ambari-env.sh index bf7ae56..e9fdcdd 100644 --- a/ambari-server/conf/unix/ambari-env.sh +++ b/ambari-server/conf/unix/ambari-env.sh @@ -15,9 +15,9 @@ AMBARI_PASSHPHRASE="DEV" -export AMBARI_JVM_ARGS=$AMBARI_JVM_ARGS' -Xms512m -Xmx2048m -Djava.security.auth.login.config=/etc/ambari-server/conf/krb5JAASLogin.conf -Djava.security.krb5.conf=/etc/krb5.conf -Djavax.security.auth.useSubjectCredsOnly=false' -export PATH=$PATH:/var/lib/ambari-server -export PYTHONPATH=$PYTHONPATH:/usr/lib/python2.6/site-packages +export AMBARI_JVM_ARGS=$AMBARI_JVM_ARGS' -Xms512m -Xmx2048m -Djava.security.auth.login.config=$ROOT/etc/ambari-server/conf/krb5JAASLogin.conf -Djava.security.krb5.conf=/etc/krb5.conf -Djavax.security.auth.useSubjectCredsOnly=false' +export PATH=$PATH:$ROOT/var/lib/ambari-server +export PYTHONPATH=$PYTHONPATH:$ROOT/usr/lib/python2.6/site-packages # customize python binary for ambari # export PYTHON=/usr/bin/python2 http://git-wip-us.apache.org/repos/asf/ambari/blob/0bd63c80/ambari-server/conf/unix/ambari.properties -- diff --git a/ambari-server/conf/unix/ambari.properties b/ambari-server/conf/unix/ambari.properties index 23f3187..81ef446 100644 --- a/ambari-server/conf/unix/ambari.properties +++ b/ambari-server/conf/unix/ambari.properties @@ -16,12 +16,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -security.server.keys_dir = /var/lib/ambari-server/keys +security.server.keys_dir = $ROOT/var/lib/ambari-server/keys #security.server.disabled.ciphers=SSL_RSA_WITH_DES_CBC_SHA|SSL_RSA_EXPORT_WITH_RC4_40_MD5|SSL_DHE_RSA_WITH_DES_CBC_SHA|SSL_DHE_DSS_WITH_DES_CBC_SHA|SSL_RSA_EXPORT_WITH_DES40_CBC_SHA|SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA|SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA|SSL_RSA_WITH_3DES_EDE_CBC_SHA|SSL_DHE_RSA_WITH_DES_CBC_SHA #security.server.disabled.protocols=SSL|SSLv2|SSLv3 -resources.dir = /var/lib/ambari-server/resources -shared.resources.dir = /usr/lib/ambari-server/lib/ambari_commons/resources -custom.action.definitions =
ambari git commit: AMBARI-15088. Incorrect information shown for 'leveldb-timeline-store' location while moving App Timeline Server component. (alexantonenko)
Repository: ambari Updated Branches: refs/heads/trunk 2926a4ecd -> 0c568cc8a AMBARI-15088. Incorrect information shown for 'leveldb-timeline-store' location while moving App Timeline Server component. (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0c568cc8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0c568cc8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0c568cc8 Branch: refs/heads/trunk Commit: 0c568cc8a20f1f33c1476f7c267c9245efd6dd0f Parents: 2926a4e Author: Alex AntonenkoAuthored: Thu Feb 18 14:08:58 2016 +0200 Committer: Alex Antonenko Committed: Thu Feb 18 17:49:31 2016 +0200 -- ambari-web/app/messages.js | 6 +++--- .../app/views/main/service/reassign/step5_view.js | 16 +--- 2 files changed, 12 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0c568cc8/ambari-web/app/messages.js -- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index 8186088..9d24b4f 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -2093,10 +2093,10 @@ Em.I18n.translations = { '', 'services.reassign.step5.body.app_timeline_server': '' + '' + - 'Copy {7}/leveldb-timeline-store.ldb from the source host {1} to {7}/leveldb-timeline-store.ldb on the target host {2}.' + + 'Copy {7}/{8} from the source host {1} to {7}/{8} on the target host {2}.' + 'Login to the target host {2} and change permissions by running:' + - 'chown -R {3}:{5} {7}/leveldb-timeline-store.ldb' + - 'chmod -R 700 {7}/leveldb-timeline-store.ldb' + + 'chown -R {3}:{5} {7}/{8}' + + 'chmod -R 700 {7}/{8}' + '' + '', 'services.reassign.step5.body.securityNotice': ' Note: Secure cluster' + http://git-wip-us.apache.org/repos/asf/ambari/blob/0c568cc8/ambari-web/app/views/main/service/reassign/step5_view.js -- diff --git a/ambari-web/app/views/main/service/reassign/step5_view.js b/ambari-web/app/views/main/service/reassign/step5_view.js index 5eeba14..066b23b 100644 --- a/ambari-web/app/views/main/service/reassign/step5_view.js +++ b/ambari-web/app/views/main/service/reassign/step5_view.js @@ -27,12 +27,14 @@ App.ReassignMasterWizardStep5View = Em.View.extend({ if (!this.get('controller.content.componentsWithManualCommands').contains(this.get('controller.content.reassign.component_name'))) { return ''; } -var componentDir = this.get('controller.content.componentDir') || ''; -var componentDirCmd = componentDir.replace(/,/g, ' '); -var sourceHost = this.get('controller.content.reassignHosts.source'); -var targetHost = this.get('controller.content.reassignHosts.target'); -var ha = ''; -var user = this.get('controller.content.hdfsUser'), path; +var + atsDir = App.get('isHadoop23Stack') ? "timeline-state-store.ldb" : "leveldb-timeline-store.ldb", + componentDir = this.get('controller.content.componentDir') || '', + componentDirCmd = componentDir.replace(/,/g, ' '), + sourceHost = this.get('controller.content.reassignHosts.source'), + targetHost = this.get('controller.content.reassignHosts.target'), + ha = '', + user = this.get('controller.content.hdfsUser'), path; if (this.get('controller.content.reassign.component_name') === 'NAMENODE' && App.get('isHaEnabled')) { ha = '_ha'; @@ -45,7 +47,7 @@ App.ReassignMasterWizardStep5View = Em.View.extend({ } return Em.I18n.t('services.reassign.step5.body.' + this.get('controller.content.reassign.component_name').toLowerCase() + ha). - format(componentDir, sourceHost, targetHost, user, nnStartedHost,this.get('controller.content.group'), componentDirCmd, path); + format(componentDir, sourceHost, targetHost, user, nnStartedHost,this.get('controller.content.group'), componentDirCmd, path, atsDir); }.property('controller.content.reassign.component_name', 'controller.content.componentDir', 'controller.content.masterComponentHosts', 'controller.content.reassign.host_id', 'controller.content.hdfsUser'), /**
ambari git commit: AMBARI-15086. SCRIPT alert params should tooltip the description (onechiporenko)
Repository: ambari Updated Branches: refs/heads/trunk f92714910 -> 2926a4ecd AMBARI-15086. SCRIPT alert params should tooltip the description (onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2926a4ec Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2926a4ec Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2926a4ec Branch: refs/heads/trunk Commit: 2926a4ecd3526c3d15291633c287cb6cfcc75b50 Parents: f927149 Author: Oleg NechiporenkoAuthored: Thu Feb 18 13:16:36 2016 +0200 Committer: Oleg Nechiporenko Committed: Thu Feb 18 17:32:28 2016 +0200 -- .../alerts/definition_configs_controller.js | 1 + .../alerts/configs/alert_config_parameter.hbs | 2 +- .../main/alerts/definition_configs_view.js | 10 +- .../test/controllers/wizard/step4_test.js | 36 +--- ambari-web/test/utils/config_test.js| 4 --- .../views/main/service/info/summary_test.js | 4 +-- 6 files changed, 36 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2926a4ec/ambari-web/app/controllers/main/alerts/definition_configs_controller.js -- diff --git a/ambari-web/app/controllers/main/alerts/definition_configs_controller.js b/ambari-web/app/controllers/main/alerts/definition_configs_controller.js index 130434f..1b7fecf 100644 --- a/ambari-web/app/controllers/main/alerts/definition_configs_controller.js +++ b/ambari-web/app/controllers/main/alerts/definition_configs_controller.js @@ -330,6 +330,7 @@ App.MainAlertDefinitionConfigsController = Em.Controller.extend({ result.push(App.AlertConfigProperties.Parameter.create(mixin, { value: isWizard ? '' : parameter.get('value'), apiProperty: parameter.get('name'), +description: parameter.get('description'), label: isWizard ? '' : parameter.get('displayName'), threshold: isWizard ? '' : parameter.get('threshold'), units: isWizard ? '' : parameter.get('units'), http://git-wip-us.apache.org/repos/asf/ambari/blob/2926a4ec/ambari-web/app/templates/main/alerts/configs/alert_config_parameter.hbs -- diff --git a/ambari-web/app/templates/main/alerts/configs/alert_config_parameter.hbs b/ambari-web/app/templates/main/alerts/configs/alert_config_parameter.hbs index fffa7bd..608dc59 100644 --- a/ambari-web/app/templates/main/alerts/configs/alert_config_parameter.hbs +++ b/ambari-web/app/templates/main/alerts/configs/alert_config_parameter.hbs @@ -24,7 +24,7 @@ {{/if}} - + {{view Em.TextField valueBinding="view.property.value" disabledBinding="view.property.isDisabled" class ="view.bigInput:span12:span7"}} {{#if view.property.units}} {{view.property.units}} http://git-wip-us.apache.org/repos/asf/ambari/blob/2926a4ec/ambari-web/app/views/main/alerts/definition_configs_view.js -- diff --git a/ambari-web/app/views/main/alerts/definition_configs_view.js b/ambari-web/app/views/main/alerts/definition_configs_view.js index 00e26d4..f3c77df 100644 --- a/ambari-web/app/views/main/alerts/definition_configs_view.js +++ b/ambari-web/app/views/main/alerts/definition_configs_view.js @@ -100,6 +100,14 @@ App.AlertConfigParameterView = Em.View.extend({ bigInput: Em.computed.equal('property.type', 'STRING'), - classNameBindings: ['property.classNames', 'parentView.basicClass'] + classNameBindings: ['property.classNames', 'parentView.basicClass'], + + didInsertElement: function () { +App.tooltip($("[rel='parameter-tooltip']")); + }, + + willDestroyElement: function () { +$("[rel='parameter-tooltip']").tooltip('destroy'); + } }); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/2926a4ec/ambari-web/test/controllers/wizard/step4_test.js -- diff --git a/ambari-web/test/controllers/wizard/step4_test.js b/ambari-web/test/controllers/wizard/step4_test.js index 7796d61..e88f4c3 100644 --- a/ambari-web/test/controllers/wizard/step4_test.js +++ b/ambari-web/test/controllers/wizard/step4_test.js @@ -646,19 +646,29 @@ describe('App.WizardStep4Controller', function () { }); cases.forEach(function (item) { - it(item.title, function () { -controller.set('content', generateSelectedServicesContent(item.services)); -controller.serviceDependencyValidation(); - expect(controller.get('errorStack').mapProperty('id').contains("serviceCheck_"+item.dependentServices[0])).to.equal(true);
[04/33] ambari git commit: AMBARI-15037. When saving a SCRIPT edit, it loses the script path (Joe Wang via rzang)
AMBARI-15037. When saving a SCRIPT edit, it loses the script path (Joe Wang via rzang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d036fc01 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d036fc01 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d036fc01 Branch: refs/heads/branch-dev-patch-upgrade Commit: d036fc0170521a46b4b8977ef5d2d71f3daacfb7 Parents: b900d03 Author: Richard ZangAuthored: Tue Feb 16 11:09:09 2016 -0800 Committer: Richard Zang Committed: Tue Feb 16 11:09:09 2016 -0800 -- .../app/controllers/main/alerts/definition_configs_controller.js | 4 ++-- .../main/alerts/definitions_configs_controller_test.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d036fc01/ambari-web/app/controllers/main/alerts/definition_configs_controller.js -- diff --git a/ambari-web/app/controllers/main/alerts/definition_configs_controller.js b/ambari-web/app/controllers/main/alerts/definition_configs_controller.js index ec5680c..130434f 100644 --- a/ambari-web/app/controllers/main/alerts/definition_configs_controller.js +++ b/ambari-web/app/controllers/main/alerts/definition_configs_controller.js @@ -542,10 +542,10 @@ App.MainAlertDefinitionConfigsController = Em.Controller.extend({ // `source.parameters` is an array and should be updated separately from other configs if (this.get('content.parameters.length')) { - propertiesToUpdate['AlertDefinition/source/parameters'] = this.get('content.rawSourceData.parameters'); + propertiesToUpdate['AlertDefinition/source'] = this.get('content.rawSourceData'); var parameterConfigs = this.get('configs').filterProperty('name', 'parameter'); parameterConfigs.forEach(function (parameter) { - propertiesToUpdate['AlertDefinition/source/parameters'].findProperty('name', parameter.get('apiProperty')).value = parameter.get('apiFormattedValue'); + propertiesToUpdate['AlertDefinition/source'].parameters.findProperty('name', parameter.get('apiProperty')).value = parameter.get('apiFormattedValue'); }); } http://git-wip-us.apache.org/repos/asf/ambari/blob/d036fc01/ambari-web/test/controllers/main/alerts/definitions_configs_controller_test.js -- diff --git a/ambari-web/test/controllers/main/alerts/definitions_configs_controller_test.js b/ambari-web/test/controllers/main/alerts/definitions_configs_controller_test.js index c957efd..f3cf28c 100644 --- a/ambari-web/test/controllers/main/alerts/definitions_configs_controller_test.js +++ b/ambari-web/test/controllers/main/alerts/definitions_configs_controller_test.js @@ -537,8 +537,8 @@ describe('App.MainAlertDefinitionConfigsController', function () { }); it('should update parameters', function () { - expect(this.result['AlertDefinition/source/parameters']).to.have.property('length').equal(4); - expect(this.result['AlertDefinition/source/parameters'].mapProperty('value')).to.be.eql(['v11', 'v21', 'v31', 'v41']); + expect(this.result['AlertDefinition/source'].parameters).to.have.property('length').equal(4); + expect(this.result['AlertDefinition/source'].parameters.mapProperty('value')).to.be.eql(['v11', 'v21', 'v31', 'v41']); }); });
[33/33] ambari git commit: Merge branch 'trunk' into branch-dev-patch-upgrade
Merge branch 'trunk' into branch-dev-patch-upgrade Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/418745d1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/418745d1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/418745d1 Branch: refs/heads/branch-dev-patch-upgrade Commit: 418745d1297e41d08ba522544ffb17d3bbb22f77 Parents: e4d1475 f927149 Author: Nate ColeAuthored: Thu Feb 18 08:33:10 2016 -0500 Committer: Nate Cole Committed: Thu Feb 18 08:33:10 2016 -0500 -- .../libraries/providers/hdfs_resource.py| 63 +- .../libraries/resources/hdfs_resource.py| 12 + ambari-funtest/pom.xml | 13 +- ambari-funtest/src/main/assemblies/empty.xml| 22 + ambari-funtest/src/main/assemblies/funtest.xml | 79 -- ambari-metrics/ambari-metrics-grafana/README.md | 22 +- .../ambari-metrics/datasource.js| 49 +- .../screenshots/21-multi-templating.png | Bin 0 -> 92034 bytes .../conf/unix/ambari-metrics-monitor| 6 +- .../conf/unix/ambari-metrics-collector | 2 +- ambari-server/conf/unix/log4j.properties| 9 + ambari-server/conf/windows/log4j.properties | 9 + ambari-server/src/main/conf/log4j.properties| 9 + .../api/resources/GroupResourceDefinition.java | 1 + .../resources/ResourceInstanceFactoryImpl.java | 4 + .../api/services/GroupPrivilegeService.java | 76 ++ .../server/api/services/GroupService.java | 11 + .../server/checks/CheckDatabaseHelper.java | 155 ++-- .../internal/DefaultProviderModule.java | 2 + .../GroupPrivilegeResourceProvider.java | 237 ++ .../ambari/server/controller/spi/Resource.java | 2 + .../server/upgrade/UpgradeCatalog240.java | 76 +- .../main/python/ambari_server/checkDatabase.py | 7 +- .../1.6.1.2.2.0/package/scripts/params.py | 1 + .../0.1.0/package/scripts/params.py | 1 + .../0.5.0.2.1/package/scripts/params_linux.py | 1 + .../HAWQ/2.0.0/configuration/gpcheck-env.xml| 89 -- .../HAWQ/2.0.0/configuration/hawq-check-env.xml | 89 ++ .../common-services/HAWQ/2.0.0/kerberos.json| 125 ++- .../common-services/HAWQ/2.0.0/metainfo.xml | 16 +- .../HAWQ/2.0.0/package/scripts/common.py| 63 +- .../2.0.0/package/scripts/hawq_constants.py | 2 +- .../HAWQ/2.0.0/package/scripts/hawqmaster.py| 2 +- .../HAWQ/2.0.0/package/scripts/hawqsegment.py | 2 +- .../HAWQ/2.0.0/package/scripts/hawqstandby.py | 10 +- .../HAWQ/2.0.0/package/scripts/master_helper.py | 2 +- .../HAWQ/2.0.0/package/scripts/params.py| 21 +- .../HAWQ/2.0.0/package/scripts/utils.py | 10 +- .../0.96.0.2.0/package/scripts/params_linux.py | 1 + .../2.1.0.2.0/package/scripts/params_linux.py | 1 + .../0.12.0.2.0/package/scripts/params_linux.py | 1 + .../KAFKA/0.8.1.2.2/package/scripts/params.py | 1 + .../0.5.0.2.2/package/scripts/params_linux.py | 1 + .../MAHOUT/1.0.0.2.3/package/scripts/params.py | 1 + .../4.0.0.2.0/package/scripts/params_linux.py | 1 + .../0.12.0.2.0/package/scripts/params_linux.py | 1 + .../0.60.0.2.2/package/scripts/params_linux.py | 1 + .../SPARK/1.2.0.2.2/package/scripts/params.py | 1 + .../0.9.1.2.1/package/scripts/params_linux.py | 1 + .../0.4.0.2.1/package/scripts/params_linux.py | 1 + .../2.1.0.2.0/package/scripts/params_linux.py | 1 + .../custom_actions/scripts/ru_execute_tasks.py | 2 +- .../main/resources/scripts/Ambaripreupload.py | 54 +- .../2.0.6/hooks/before-START/scripts/params.py | 1 + .../HDP/2.2/upgrades/nonrolling-upgrade-2.3.xml | 3 +- .../HDP/2.2/upgrades/nonrolling-upgrade-2.4.xml | 3 +- .../stacks/HDP/2.2/upgrades/upgrade-2.3.xml | 2 + .../stacks/HDP/2.2/upgrades/upgrade-2.4.xml | 2 + .../KAFKA/configuration/kafka-broker.xml| 2 +- .../services/RANGER/themes/theme_version_2.json | 20 +- .../stacks/HDP/2.3/upgrades/config-upgrade.xml | 5 +- .../HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml | 3 +- .../stacks/HDP/2.3/upgrades/upgrade-2.4.xml | 4 + .../stacks/HDP/2.4/upgrades/config-upgrade.xml | 5 +- .../main/resources/stacks/HDP/2.5/metainfo.xml | 25 + .../resources/stacks/HDP/2.5/repos/repoinfo.xml | 92 ++ .../HDP/2.5/services/ACCUMULO/metainfo.xml | 26 + .../stacks/HDP/2.5/services/ATLAS/metainfo.xml | 26 + .../stacks/HDP/2.5/services/FALCON/metainfo.xml | 26 + .../stacks/HDP/2.5/services/FLUME/metainfo.xml | 26 + .../stacks/HDP/2.5/services/HBASE/metainfo.xml | 26 + .../stacks/HDP/2.5/services/HDFS/metainfo.xml | 26 + .../stacks/HDP/2.5/services/HIVE/metainfo.xml | 26 + .../stacks/HDP/2.5/services/KAFKA/metainfo.xml | 26 + .../HDP/2.5/services/KERBEROS/metainfo.xml
[14/33] ambari git commit: AMBARI-15069 Add HDP 2.5 stack for Ambari 2.2.2 (dsen)
AMBARI-15069 Add HDP 2.5 stack for Ambari 2.2.2 (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b339542e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b339542e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b339542e Branch: refs/heads/branch-dev-patch-upgrade Commit: b339542e04290725d3a171afb62e6233950e30b0 Parents: 03f804c Author: Dmytro SenAuthored: Wed Feb 17 16:46:55 2016 +0200 Committer: Dmytro Sen Committed: Wed Feb 17 16:46:55 2016 +0200 -- .../main/resources/stacks/HDP/2.5/metainfo.xml | 25 ++ .../resources/stacks/HDP/2.5/repos/repoinfo.xml | 92 .../HDP/2.5/services/ACCUMULO/metainfo.xml | 26 ++ .../stacks/HDP/2.5/services/ATLAS/metainfo.xml | 26 ++ .../stacks/HDP/2.5/services/FALCON/metainfo.xml | 26 ++ .../stacks/HDP/2.5/services/FLUME/metainfo.xml | 26 ++ .../stacks/HDP/2.5/services/HBASE/metainfo.xml | 26 ++ .../stacks/HDP/2.5/services/HDFS/metainfo.xml | 26 ++ .../stacks/HDP/2.5/services/HIVE/metainfo.xml | 26 ++ .../stacks/HDP/2.5/services/KAFKA/metainfo.xml | 26 ++ .../HDP/2.5/services/KERBEROS/metainfo.xml | 25 ++ .../stacks/HDP/2.5/services/KNOX/metainfo.xml | 26 ++ .../stacks/HDP/2.5/services/MAHOUT/metainfo.xml | 26 ++ .../stacks/HDP/2.5/services/OOZIE/metainfo.xml | 26 ++ .../stacks/HDP/2.5/services/PIG/metainfo.xml| 26 ++ .../stacks/HDP/2.5/services/RANGER/metainfo.xml | 29 ++ .../HDP/2.5/services/RANGER_KMS/metainfo.xml| 29 ++ .../stacks/HDP/2.5/services/SLIDER/metainfo.xml | 26 ++ .../stacks/HDP/2.5/services/SPARK/metainfo.xml | 29 ++ .../stacks/HDP/2.5/services/SQOOP/metainfo.xml | 26 ++ .../stacks/HDP/2.5/services/STORM/metainfo.xml | 27 ++ .../stacks/HDP/2.5/services/TEZ/metainfo.xml| 26 ++ .../stacks/HDP/2.5/services/YARN/metainfo.xml | 27 ++ .../HDP/2.5/services/ZOOKEEPER/metainfo.xml | 26 ++ .../stacks/HDP/2.5/services/stack_advisor.py| 22 + ambari-server/src/test/python/TestSetupAgent.py | 2 +- .../stacks/2.0.6/common/test_stack_advisor.py | 12 +-- 27 files changed, 728 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b339542e/ambari-server/src/main/resources/stacks/HDP/2.5/metainfo.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/metainfo.xml new file mode 100644 index 000..df3c4ee --- /dev/null +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/metainfo.xml @@ -0,0 +1,25 @@ + + + + +true + + 2.4 + 1.7 + 1.8 + http://git-wip-us.apache.org/repos/asf/ambari/blob/b339542e/ambari-server/src/main/resources/stacks/HDP/2.5/repos/repoinfo.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/repos/repoinfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/repos/repoinfo.xml new file mode 100644 index 000..acf1c07 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/repos/repoinfo.xml @@ -0,0 +1,92 @@ + + + + http://s3.amazonaws.com/dev.hortonworks.com/HDP/hdp_urlinfo.json + + + http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/updates/2.5.0.0 + HDP-2.5 + HDP + + + http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/centos6 + HDP-UTILS-1.1.0.20 + HDP-UTILS + + + + + http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos7/2.x/updates/2.5.0.0 + HDP-2.5 + HDP + + + http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/centos7 + HDP-UTILS-1.1.0.20 + HDP-UTILS + + + + + http://s3.amazonaws.com/dev.hortonworks.com/HDP/suse11sp3/2.x/updates/2.5.0.0 + HDP-2.5 + HDP + + + http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/suse11sp3 + HDP-UTILS-1.1.0.20 + HDP-UTILS + + + + + http://s3.amazonaws.com/dev.hortonworks.com/HDP/ubuntu12/2.x/updates/2.5.0.0 + HDP-2.5 + HDP + + + http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/ubuntu12 + HDP-UTILS-1.1.0.20 + HDP-UTILS + + + + + http://s3.amazonaws.com/dev.hortonworks.com/HDP/debian7/2.x/updates/2.5.0.0 + HDP-2.5 + HDP + + + http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/debian6 + HDP-UTILS-1.1.0.20 + HDP-UTILS + + + + + http://s3.amazonaws.com/dev.hortonworks.com/HDP/ubuntu14/2.x/updates/2.5.0.0 + HDP-2.5 + HDP + + +
[13/33] ambari git commit: AMBARI-15071. Functional tests hang on BAO forever (aonishuk)
AMBARI-15071. Functional tests hang on BAO forever (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/03f804c2 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/03f804c2 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/03f804c2 Branch: refs/heads/branch-dev-patch-upgrade Commit: 03f804c24772bec7e7ccfd31d5d2f594ac0f0262 Parents: 8cfb2db Author: Andrew OnishukAuthored: Wed Feb 17 14:28:05 2016 +0200 Committer: Andrew Onishuk Committed: Wed Feb 17 14:28:05 2016 +0200 -- ambari-funtest/pom.xml | 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/03f804c2/ambari-funtest/pom.xml -- diff --git a/ambari-funtest/pom.xml b/ambari-funtest/pom.xml index 4fa342f..8d19631 100644 --- a/ambari-funtest/pom.xml +++ b/ambari-funtest/pom.xml @@ -22,6 +22,9 @@ ${packagingFormat} Ambari Functional Tests Ambari Functional Tests + +true +
[09/33] ambari git commit: AMBARI-15063 : Metrics monitor fails on restart (avijayan)
AMBARI-15063 : Metrics monitor fails on restart (avijayan) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d412ca11 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d412ca11 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d412ca11 Branch: refs/heads/branch-dev-patch-upgrade Commit: d412ca11c8347fb89e7a5318c72a7dc24d0c2ff9 Parents: 21fd70c Author: Aravindan VijayanAuthored: Tue Feb 16 14:41:00 2016 -0800 Committer: Aravindan Vijayan Committed: Tue Feb 16 14:41:00 2016 -0800 -- .../conf/unix/ambari-metrics-monitor | 6 +++--- .../conf/unix/ambari-metrics-collector | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d412ca11/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor -- diff --git a/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor b/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor index 815b3e4..aa4ae02 100644 --- a/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor +++ b/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor @@ -131,7 +131,7 @@ case "$1" in echo "Checking for previously running Metric Monitor..." if [ -f ${PIDFILE} ]; then PID=`cat ${PIDFILE}` - if [ -z "`ps ax -o pid | grep ${PID}`" ]; then + if [ -z "`ps ax -o pid | grep -w ${PID} | grep resource_monitoring`" ]; then echo "${PIDFILE} found with no process. Removing ${PID}..." rm -f ${PIDFILE} else @@ -152,7 +152,7 @@ case "$1" in sleep 2 echo "Verifying ${METRIC_MONITOR} process status..." -if [ -z "`ps ax -o pid | grep ${PID}`" ]; then +if [ -z "`ps ax -o pid | grep -w ${PID} | grep resource_monitoring`" ]; then if [ -s ${OUTFILE} ]; then echo "ERROR: ${METRIC_MONITOR} start failed. For more details, see ${OUTFILE}:" echo "" @@ -173,7 +173,7 @@ case "$1" in if [ -f ${PIDFILE} ]; then PID=`cat ${PIDFILE}` echo "Found ${METRIC_MONITOR} PID: $PID" - if [ -z "`ps ax -o pid | grep ${PID}`" ]; then + if [ -z "`ps ax -o pid | grep -w ${PID} | grep resource_monitoring`" ]; then echo "${METRIC_MONITOR} not running. Stale PID File at: $PIDFILE" retcode=2 else http://git-wip-us.apache.org/repos/asf/ambari/blob/d412ca11/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector -- diff --git a/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector b/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector index f83af50..e319d73 100644 --- a/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector +++ b/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector @@ -267,7 +267,7 @@ function start() sleep 2 echo "Verifying ${METRIC_COLLECTOR} process status..." | tee -a $STARTUPFILE - if [ -z "`ps ax -o pid | grep ${PID}`" ]; then + if [ -z "`ps ax | grep -w ${PID} | grep ApplicationHistoryServer`" ]; then if [ -s ${OUTFILE} ]; then echo "ERROR: ${METRIC_COLLECTOR} start failed. For more details, see ${OUTFILE}:" | tee -a $STARTUPFILE echo ""
[25/33] ambari git commit: AMBARI-15079. Preupload.py should pre-create hdfs directories (aonishuk)
http://git-wip-us.apache.org/repos/asf/ambari/blob/df2dbe15/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py index 185db68..69e1f5d 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py +++ b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py @@ -60,6 +60,7 @@ class TestHistoryServer(RMFTestCase): self.assertResourceCalled("HdfsResource", "/apps/tez/", type="directory", action=["create_on_execute"], + hdfs_resource_ignore_file='/var/lib/ambari-agent/data/.hdfs_resource_ignore', user=u"hdfs", dfs_type = '', owner=u"tez", @@ -77,6 +78,7 @@ class TestHistoryServer(RMFTestCase): self.assertResourceCalled("HdfsResource", "/apps/tez/lib/", type="directory", action=["create_on_execute"], + hdfs_resource_ignore_file='/var/lib/ambari-agent/data/.hdfs_resource_ignore', user=u'hdfs', owner=u"tez", dfs_type = '', @@ -93,6 +95,7 @@ class TestHistoryServer(RMFTestCase): self.assertResourceCalled("HdfsResource", None, action=['execute'], + hdfs_resource_ignore_file='/var/lib/ambari-agent/data/.hdfs_resource_ignore', user=u'hdfs', hadoop_bin_dir="/usr/bin", dfs_type = '', @@ -205,7 +208,7 @@ class TestHistoryServer(RMFTestCase): group = 'hadoop', hadoop_bin_dir = '/usr/bin', type = 'directory', -action = ['create_on_execute'], hdfs_site=self.getConfig()['configurations']['hdfs-site'], principal_name=UnknownConfigurationMock(), default_fs='hdfs://c6401.ambari.apache.org:8020', +action = ['create_on_execute'], hdfs_resource_ignore_file='/var/lib/ambari-agent/data/.hdfs_resource_ignore', hdfs_site=self.getConfig()['configurations']['hdfs-site'], principal_name=UnknownConfigurationMock(), default_fs='hdfs://c6401.ambari.apache.org:8020', mode = 0777, ) self.assertResourceCalled('HdfsResource', '/tmp/entity-file-history/active', @@ -222,7 +225,7 @@ class TestHistoryServer(RMFTestCase): group = 'hadoop', hadoop_conf_dir = '/etc/hadoop/conf', type = 'directory', -action = ['create_on_execute'], +action = ['create_on_execute'], hdfs_resource_ignore_file='/var/lib/ambari-agent/data/.hdfs_resource_ignore', ) self.assertResourceCalled('HdfsResource', '/mapred', security_enabled = False, @@ -234,7 +237,7 @@ class TestHistoryServer(RMFTestCase): owner = 'mapred', hadoop_conf_dir = '/etc/hadoop/conf', type = 'directory', -action = ['create_on_execute'], hdfs_site=self.getConfig()['configurations']['hdfs-site'], principal_name=UnknownConfigurationMock(), default_fs='hdfs://c6401.ambari.apache.org:8020', +action = ['create_on_execute'], hdfs_resource_ignore_file='/var/lib/ambari-agent/data/.hdfs_resource_ignore', hdfs_site=self.getConfig()['configurations']['hdfs-site'], principal_name=UnknownConfigurationMock(), default_fs='hdfs://c6401.ambari.apache.org:8020', ) self.assertResourceCalled('HdfsResource', '/mapred/system', security_enabled = False, @@ -246,7 +249,7 @@ class TestHistoryServer(RMFTestCase): owner = 'hdfs', hadoop_conf_dir = '/etc/hadoop/conf', type = 'directory', -action = ['create_on_execute'], hdfs_site=self.getConfig()['configurations']['hdfs-site'], principal_name=UnknownConfigurationMock(), default_fs='hdfs://c6401.ambari.apache.org:8020', +action = ['create_on_execute'], hdfs_resource_ignore_file='/var/lib/ambari-agent/data/.hdfs_resource_ignore', hdfs_site=self.getConfig()['configurations']['hdfs-site'], principal_name=UnknownConfigurationMock(), default_fs='hdfs://c6401.ambari.apache.org:8020', ) self.assertResourceCalled('HdfsResource', '/mr-history/done', security_enabled = False, @@ -260,7 +263,7 @@ class TestHistoryServer(RMFTestCase): group = 'hadoop', hadoop_bin_dir = '/usr/bin', type = 'directory', -action = ['create_on_execute'], hdfs_site=self.getConfig()['configurations']['hdfs-site'], principal_name=UnknownConfigurationMock(), default_fs='hdfs://c6401.ambari.apache.org:8020', +action = ['create_on_execute'], hdfs_resource_ignore_file='/var/lib/ambari-agent/data/.hdfs_resource_ignore',
[05/33] ambari git commit: AMBARI-15038 Alert definitions: Percentage params get validation errors when they shouldn't (Joe Wang via rzang)
AMBARI-15038 Alert definitions: Percentage params get validation errors when they shouldn't (Joe Wang via rzang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f18601c7 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f18601c7 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f18601c7 Branch: refs/heads/branch-dev-patch-upgrade Commit: f18601c7c786945e0da8883e59b65686338ee2c9 Parents: d036fc0 Author: Richard ZangAuthored: Tue Feb 16 11:11:54 2016 -0800 Committer: Richard Zang Committed: Tue Feb 16 11:11:54 2016 -0800 -- ambari-web/app/models/alerts/alert_config.js | 4 ++-- ambari-web/test/models/alerts/alert_config_test.js | 8 2 files changed, 6 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f18601c7/ambari-web/app/models/alerts/alert_config.js -- diff --git a/ambari-web/app/models/alerts/alert_config.js b/ambari-web/app/models/alerts/alert_config.js index c86b19a..867b45a 100644 --- a/ambari-web/app/models/alerts/alert_config.js +++ b/ambari-web/app/models/alerts/alert_config.js @@ -532,7 +532,7 @@ App.AlertConfigProperties.Parameters = { value = String(value).trim(); value = parseFloat(value); - return !isNaN(value) && value > 0 && value <= 100; + return !isNaN(value) && value > 0; }.property('value') }) @@ -622,7 +622,7 @@ App.AlertConfigProperties.Thresholds = { return false; } - return this.get('showInputForValue') ? !isNaN(value) && value > 0 && value <= 100 : true; + return this.get('showInputForValue') ? !isNaN(value) && value > 0 : true; }.property('displayValue', 'showInputForValue'), /** http://git-wip-us.apache.org/repos/asf/ambari/blob/f18601c7/ambari-web/test/models/alerts/alert_config_test.js -- diff --git a/ambari-web/test/models/alerts/alert_config_test.js b/ambari-web/test/models/alerts/alert_config_test.js index 4b788f8..56f1577 100644 --- a/ambari-web/test/models/alerts/alert_config_test.js +++ b/ambari-web/test/models/alerts/alert_config_test.js @@ -104,13 +104,13 @@ describe('App.AlertConfigProperties', function () { {value: 'abc', expected: false}, {value: 'g1', expected: false}, {value: '1g', expected: false}, - {value: '123', expected: false}, + {value: '123', expected: true}, {value: '23', expected: true}, - {value: '123.8', expected: false}, + {value: '123.8', expected: true}, {value: '5.8', expected: true}, - {value: 123, expected: false}, + {value: 123, expected: true}, {value: 23, expected: true}, - {value: 123.8, expected: false}, + {value: 123.8, expected: true}, {value: 5.8, expected: true} ]).forEach(function (test) { it('value: ' + JSON.stringify(test.value) + ' ;result - ' + test.expected, function () {
[02/33] ambari git commit: Updated team page. (yusaku)
Updated team page. (yusaku) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/be1b6b9b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/be1b6b9b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/be1b6b9b Branch: refs/heads/branch-dev-patch-upgrade Commit: be1b6b9b1cb419725edb8e647d61d48756d184e4 Parents: 0ce5fea Author: Yusaku SakoAuthored: Tue Feb 16 10:30:42 2016 -0800 Committer: Yusaku Sako Committed: Tue Feb 16 10:30:42 2016 -0800 -- docs/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/be1b6b9b/docs/pom.xml -- diff --git a/docs/pom.xml b/docs/pom.xml index a1b0c79..c3bb326 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -433,7 +433,7 @@ kzhang Kan Zhang -kanzhangm...@yahoo.com +kzh...@apache.org -8 PMC
[07/33] ambari git commit: AMBARI-14999. Multi-host option for Templated Dashboards. (Prajwal Rao via yusaku)
AMBARI-14999. Multi-host option for Templated Dashboards. (Prajwal Rao via yusaku) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1e510f59 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1e510f59 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1e510f59 Branch: refs/heads/branch-dev-patch-upgrade Commit: 1e510f590f9caa9ef7fb4e71e9badd54cb36b5c0 Parents: f41fccf Author: Yusaku SakoAuthored: Tue Feb 16 12:15:43 2016 -0800 Committer: Yusaku Sako Committed: Tue Feb 16 12:15:43 2016 -0800 -- ambari-metrics/ambari-metrics-grafana/README.md | 22 - .../ambari-metrics/datasource.js| 49 +++ .../screenshots/21-multi-templating.png | Bin 0 -> 92034 bytes 3 files changed, 60 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1e510f59/ambari-metrics/ambari-metrics-grafana/README.md -- diff --git a/ambari-metrics/ambari-metrics-grafana/README.md b/ambari-metrics/ambari-metrics-grafana/README.md index 7eb84a7..af2b5cb 100644 --- a/ambari-metrics/ambari-metrics-grafana/README.md +++ b/ambari-metrics/ambari-metrics-grafana/README.md @@ -33,10 +33,12 @@ Use **ambari-metrics** to visualize metrics exposed via AMS in Grafana. - [Save Dashboard](#savedash) - [Time Ranges](#timerange) - [Edit Panel/Graph](#editpanel) + - [Templated Dashboards](#templating) +- [Multi Host Templated Dashboards](#multi-templating) -- -![enter image description here](screenshots/full-dashboard.png) +![Full Dashboard](screenshots/full-dashboard.png) -- @@ -257,7 +259,23 @@ http://GRAFANA_HOST:3000 > 10. When you now add a graph, and select your component and metric, the > plotted graph will show you metrics for the selected hostname from the > dropdown. > 11. The legend on the graph will also now update with the selected host. -**Templalted dashboards do support multiple metrics in a single graph.** +**Templated dashboards do support multiple metrics in a single graph.** ![Templating](screenshots/20-templating.png) + +--- + + +### Multi Host Templated Dashboards. + +**Templated dashboards now have the ability to filter graphs based on a single host or multiple hosts.** + +> 1. Once you've created your templated dashboard, you can edit it gain by clicking on the "cog" on the top, select "Templating". +> 2. Click on "Edit" for your templating variable. +> 3. To be able to select Multiiple Hosts, set multi-value selection to "enable" and leave multi-format set to "glob". +> 4. To have an option for All hosts, select All Value, and set it to "*" and All format to "wildcard". +> 5. Hit Update and close the templating variables options and you should be now able to select multiple hosts from the dropdown (or "all" hosts at once.) + + +![Multi Host Templating](screenshots/21-multi-templating.png) http://git-wip-us.apache.org/repos/asf/ambari/blob/1e510f59/ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js -- diff --git a/ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js b/ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js index e89ad0e..ca7ea65 100644 --- a/ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js +++ b/ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js @@ -38,6 +38,7 @@ define([ } var allMetrics = []; var appIds = []; +//We get a list of components and their associated metrics. AmbariMetricsDatasource.prototype.initMetricAppidMapping = function () { backendSrv.get(this.url + '/ws/v1/timeline/metrics/metadata') .then(function (items) { @@ -73,7 +74,7 @@ define([ } options.url = this.url + options.url; - options.inspect = {type: 'discovery'}; + options.inspect = {type: 'ambarimetrics'}; return backendSrv.datasourceRequest(options); }; @@ -82,6 +83,7 @@ define([ * AMS Datasource Query */ AmbariMetricsDatasource.prototype.query = function (options) { + var emptyData = function (metric) { return { data: { @@ -99,6 +101,7 @@ define([ } var series = []; var metricData = res.metrics[0].metrics; + // Added hostname to legend for templated dashboards. var hostLegend = res.metrics[0].hostname ? ' on ' + res.metrics[0].hostname : ''; var timeSeries = {}; if (target.hosts === undefined || target.hosts.trim() === "") { @@
[26/33] ambari git commit: AMBARI-15079. Preupload.py should pre-create hdfs directories (aonishuk)
AMBARI-15079. Preupload.py should pre-create hdfs directories (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/df2dbe15 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/df2dbe15 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/df2dbe15 Branch: refs/heads/branch-dev-patch-upgrade Commit: df2dbe150b97ecb74ddf4652463b8062f288203a Parents: b15c0f3 Author: Andrew OnishukAuthored: Thu Feb 18 00:50:21 2016 +0200 Committer: Andrew Onishuk Committed: Thu Feb 18 00:50:48 2016 +0200 -- .../libraries/providers/hdfs_resource.py| 63 +--- .../libraries/resources/hdfs_resource.py| 12 .../1.6.1.2.2.0/package/scripts/params.py | 1 + .../0.1.0/package/scripts/params.py | 1 + .../0.5.0.2.1/package/scripts/params_linux.py | 1 + .../0.96.0.2.0/package/scripts/params_linux.py | 1 + .../2.1.0.2.0/package/scripts/params_linux.py | 1 + .../0.12.0.2.0/package/scripts/params_linux.py | 1 + .../KAFKA/0.8.1.2.2/package/scripts/params.py | 1 + .../0.5.0.2.2/package/scripts/params_linux.py | 1 + .../MAHOUT/1.0.0.2.3/package/scripts/params.py | 1 + .../4.0.0.2.0/package/scripts/params_linux.py | 1 + .../0.12.0.2.0/package/scripts/params_linux.py | 1 + .../0.60.0.2.2/package/scripts/params_linux.py | 1 + .../SPARK/1.2.0.2.2/package/scripts/params.py | 1 + .../0.9.1.2.1/package/scripts/params_linux.py | 1 + .../0.4.0.2.1/package/scripts/params_linux.py | 1 + .../2.1.0.2.0/package/scripts/params_linux.py | 1 + .../main/resources/scripts/Ambaripreupload.py | 54 ++--- .../2.0.6/hooks/before-START/scripts/params.py | 1 + .../AMBARI_METRICS/test_metrics_collector.py| 6 +- .../stacks/2.0.6/HBASE/test_hbase_master.py | 18 +++--- .../python/stacks/2.0.6/HDFS/test_namenode.py | 54 - .../stacks/2.0.6/HDFS/test_service_check.py | 8 +-- .../stacks/2.0.6/HIVE/test_hive_server.py | 28 - .../2.0.6/HIVE/test_hive_service_check.py | 12 ++-- .../stacks/2.0.6/OOZIE/test_oozie_server.py | 32 +- .../stacks/2.0.6/OOZIE/test_service_check.py| 10 ++-- .../stacks/2.0.6/PIG/test_pig_service_check.py | 12 ++-- .../stacks/2.0.6/YARN/test_historyserver.py | 29 + .../2.0.6/YARN/test_mapreduce2_service_check.py | 12 ++-- .../stacks/2.1/FALCON/test_falcon_server.py | 12 ++-- .../python/stacks/2.1/TEZ/test_service_check.py | 16 ++--- .../stacks/2.1/YARN/test_apptimelineserver.py | 2 +- .../stacks/2.2/PIG/test_pig_service_check.py| 12 ++-- .../stacks/2.2/SPARK/test_job_history_server.py | 11 ++-- .../2.3/MAHOUT/test_mahout_service_check.py | 8 +-- .../2.3/SPARK/test_spark_thrift_server.py | 4 +- .../test/python/stacks/2.3/YARN/test_ats_1_5.py | 10 ++-- 39 files changed, 267 insertions(+), 175 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/df2dbe15/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py b/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py index ebcf1a4..b73ae56 100644 --- a/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py +++ b/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py @@ -151,32 +151,13 @@ class WebHDFSUtil: # only hdfs seems to support webHDFS return (is_webhdfs_enabled and default_fs.startswith("hdfs")) - def parse_path(self, path): -""" -hdfs://nn_url:1234/a/b/c -> /a/b/c -hdfs://nn_ha_name/a/b/c -> /a/b/c -hdfs:///a/b/c -> /a/b/c -/a/b/c -> /a/b/c -""" -math_with_protocol_and_nn_url = re.match("[a-zA-Z]+://[^/]+(/.+)", path) -math_with_protocol = re.match("[a-zA-Z]+://(/.+)", path) - -if math_with_protocol_and_nn_url: - path = math_with_protocol_and_nn_url.group(1) -elif math_with_protocol: - path = math_with_protocol.group(1) -else: - path = path - -return re.sub("[/]+", "/", path) - valid_status_codes = ["200", "201"] def run_command(self, target, operation, method='POST', assertable_result=True, file_to_put=None, ignore_status_codes=[], **kwargs): """ assertable_result - some POST requests return '{"boolean":false}' or '{"boolean":true}' depending on if query was successful or not, we can assert this for them """ -target = self.parse_path(target) +target = HdfsResourceProvider.parse_path(target) url =
[24/33] ambari git commit: AMBARI-15019: Refactor HAWQ common.py after moving config substitution to UI (lavjain via jaoki)
AMBARI-15019: Refactor HAWQ common.py after moving config substitution to UI (lavjain via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b15c0f3d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b15c0f3d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b15c0f3d Branch: refs/heads/branch-dev-patch-upgrade Commit: b15c0f3d7432dbd6b6ce6c678b6cc2884a73c68b Parents: f11d76d Author: Jun AokiAuthored: Wed Feb 17 14:46:58 2016 -0800 Committer: Jun Aoki Committed: Wed Feb 17 14:46:58 2016 -0800 -- .../HAWQ/2.0.0/package/scripts/common.py| 63 .../HAWQ/2.0.0/package/scripts/params.py| 19 -- 2 files changed, 26 insertions(+), 56 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b15c0f3d/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py index 23342f5..b5353e8 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py @@ -20,9 +20,7 @@ import os import time import crypt import filecmp -from resource_management.libraries.resources.xml_config import XmlConfig from resource_management.core.resources.system import Execute, Directory, File -from resource_management.libraries.script.config_dictionary import ConfigDictionary from resource_management.core.logger import Logger from resource_management.core.system import System from resource_management.core.exceptions import Fail @@ -67,58 +65,23 @@ def setup_common_configurations(): """ Sets up the config files common to master, standby and segment nodes. """ - __update_hdfs_client() - __update_yarn_client() - __update_hawq_site() - __set_osparams() - -def __update_hdfs_client(): - """ - Writes hdfs-client.xml on the local filesystem on hawq nodes. - If hdfs ha is enabled, appends related parameters to hdfs-client.xml - """ - import params - - hdfs_client_dict = params.hdfs_client.copy() - - XmlConfig("hdfs-client.xml", -conf_dir=hawq_constants.hawq_config_dir, -configurations=ConfigDictionary(hdfs_client_dict), - configuration_attributes=params.config['configuration_attributes']['hdfs-client'], -owner=hawq_constants.hawq_user, -group=hawq_constants.hawq_group, -mode=0644) - - -def __update_yarn_client(): - """ - Writes yarn-client.xml on the local filesystem on hawq nodes. - If yarn ha is enabled, appends related parameters to yarn-client.xml - """ import params - XmlConfig("yarn-client.xml", -conf_dir=hawq_constants.hawq_config_dir, -configurations=params.yarn_client, - configuration_attributes=params.config['configuration_attributes']['yarn-client'], -owner=hawq_constants.hawq_user, -group=hawq_constants.hawq_group, -mode=0644) + # Write hdfs-client.xml on the local filesystem. If hdfs HA is enabled, append related parameters + params.XmlConfig(filename="hdfs-client.xml", + configurations=params.hdfs_client, + configuration_attributes=params.config_attrs['hdfs-client']) + # Write yarn-client.xml on the local filesystem. If yarn HA is enabled, append related parameters + params.XmlConfig(filename="yarn-client.xml", + configurations=params.yarn_client, + configuration_attributes=params.config_attrs['yarn-client']) -def __update_hawq_site(): - """ - Sets up hawq-site.xml - """ - import params - - XmlConfig("hawq-site.xml", -conf_dir=hawq_constants.hawq_config_dir, -configurations=ConfigDictionary(params.hawq_site), - configuration_attributes=params.config['configuration_attributes']['hawq-site'], -owner=hawq_constants.hawq_user, -group=hawq_constants.hawq_group, -mode=0644) + # Write hawq-site.xml on the local filesystem. + params.XmlConfig(filename="hawq-site.xml", + configurations=params.hawq_site, + configuration_attributes=params.config_attrs['hawq-site']) + __set_osparams() def __set_osparams(): http://git-wip-us.apache.org/repos/asf/ambari/blob/b15c0f3d/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/params.py -- diff --git
[30/33] ambari git commit: AMBARI-15081: Ambari functional tests: Build issues - tests should not run during regular build; JAR file not required.
AMBARI-15081: Ambari functional tests: Build issues - tests should not run during regular build; JAR file not required. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/84ca6a88 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/84ca6a88 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/84ca6a88 Branch: refs/heads/branch-dev-patch-upgrade Commit: 84ca6a88d0ba80011394a0ab767a80c7e342aa3c Parents: dcebcca Author: Nahappan SomasundaramAuthored: Wed Feb 17 18:00:07 2016 -0800 Committer: Nahappan Somasundaram Committed: Wed Feb 17 22:39:49 2016 -0800 -- ambari-funtest/pom.xml | 16 + ambari-funtest/src/main/assemblies/empty.xml | 22 ++ ambari-funtest/src/main/assemblies/funtest.xml | 79 - 3 files changed, 24 insertions(+), 93 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/84ca6a88/ambari-funtest/pom.xml -- diff --git a/ambari-funtest/pom.xml b/ambari-funtest/pom.xml index 8d19631..28225c2 100644 --- a/ambari-funtest/pom.xml +++ b/ambari-funtest/pom.xml @@ -22,9 +22,6 @@ ${packagingFormat} Ambari Functional Tests Ambari Functional Tests - -true - @@ -62,15 +59,6 @@ once - - -run-integration-tests -test - - integration-test - - run-verify @@ -128,7 +116,7 @@ sh sh - src/main/assemblies/funtest.xml +src/main/assemblies/empty.xml jar @@ -146,7 +134,7 @@ cmd cmd - src/main/assemblies/funtest.xml +src/main/assemblies/empty.xml jar http://git-wip-us.apache.org/repos/asf/ambari/blob/84ca6a88/ambari-funtest/src/main/assemblies/empty.xml -- diff --git a/ambari-funtest/src/main/assemblies/empty.xml b/ambari-funtest/src/main/assemblies/empty.xml new file mode 100644 index 000..9226f2c --- /dev/null +++ b/ambari-funtest/src/main/assemblies/empty.xml @@ -0,0 +1,22 @@ + + + + empty + + http://git-wip-us.apache.org/repos/asf/ambari/blob/84ca6a88/ambari-funtest/src/main/assemblies/funtest.xml -- diff --git a/ambari-funtest/src/main/assemblies/funtest.xml b/ambari-funtest/src/main/assemblies/funtest.xml deleted file mode 100644 index 93d2e17..000 --- a/ambari-funtest/src/main/assemblies/funtest.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - dist - -dir -tar.gz - - false - - - ${project.build.directory}/${artifact.artifactId}-${artifact.version}.jar - ambari-funtest-${project.version}/lib/ambari-funtest - - - - - - ${basedir}/../ - ambari-funtest-${project.version}/ - -*.txt - - - - - ${basedir}/src/main/resources/ - /ambari-funtest-${project.version}/keystore - -db/* -ca.config -pass.txt - - - - ${basedir}/../ambari-web/public - ambari-funtest-${project.version}/web - -** - - - - src/main/conf - /ambari-funtest-${project.version}/etc/ambari-funtest/conf - - - - - ambari-funtest-${project.version}/lib/ambari-funtest - false - compile - - -
[01/33] ambari git commit: AMBARI-15051. Improvements and fixes for database check.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/branch-dev-patch-upgrade e4d1475ea -> 418745d12 AMBARI-15051. Improvements and fixes for database check.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4761fe7c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4761fe7c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4761fe7c Branch: refs/heads/branch-dev-patch-upgrade Commit: 4761fe7c40b10d4a5c1f7b2564df475c4a66222b Parents: 0ea255c Author: Vitaly BrodetskyiAuthored: Mon Feb 15 14:51:36 2016 +0200 Committer: Vitaly Brodetskyi Committed: Mon Feb 15 14:51:36 2016 +0200 -- ambari-server/conf/unix/log4j.properties| 9 ++ ambari-server/conf/windows/log4j.properties | 9 ++ ambari-server/src/main/conf/log4j.properties| 9 ++ .../server/checks/CheckDatabaseHelper.java | 155 +-- .../main/python/ambari_server/checkDatabase.py | 7 +- .../server/checks/CheckDatabaseHelperTest.java | 29 ++-- .../src/test/python/TestAmbariServer.py | 3 +- 7 files changed, 152 insertions(+), 69 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4761fe7c/ambari-server/conf/unix/log4j.properties -- diff --git a/ambari-server/conf/unix/log4j.properties b/ambari-server/conf/unix/log4j.properties index c87b1f4..18ec33e 100644 --- a/ambari-server/conf/unix/log4j.properties +++ b/ambari-server/conf/unix/log4j.properties @@ -23,6 +23,7 @@ ambari.log.file=ambari-server.log ambari.config-changes.file=ambari-config-changes.log ambari.alerts.file=ambari-alerts.log ambari.eclipselink.file=ambari-eclipselink.log +ambari.dbcheck.file=ambari-server-check-database.log log4j.rootLogger=INFO,file @@ -50,6 +51,14 @@ log4j.appender.alerts.File=${ambari.log.dir}/${ambari.alerts.file} log4j.appender.alerts.layout=org.apache.log4j.PatternLayout log4j.appender.alerts.layout.ConversionPattern=%d{ISO8601} %m%n +# Log database check process +log4j.logger.org.apache.ambari.server.checks.CheckDatabaseHelper=INFO, dbcheck +log4j.additivity.org.apache.ambari.server.checks.CheckDatabaseHelper=false +log4j.appender.dbcheck=org.apache.log4j.FileAppender +log4j.appender.dbcheck.File=${ambari.log.dir}/${ambari.dbcheck.file} +log4j.appender.dbcheck.layout=org.apache.log4j.PatternLayout +log4j.appender.dbcheck.layout.ConversionPattern=%d{ISO8601} %m%n + # EclipsLink -> slf4j bridge log4j.logger.eclipselink=TRACE,eclipselink log4j.additivity.eclipselink=false http://git-wip-us.apache.org/repos/asf/ambari/blob/4761fe7c/ambari-server/conf/windows/log4j.properties -- diff --git a/ambari-server/conf/windows/log4j.properties b/ambari-server/conf/windows/log4j.properties index 8a69508..09505cf 100644 --- a/ambari-server/conf/windows/log4j.properties +++ b/ambari-server/conf/windows/log4j.properties @@ -23,6 +23,7 @@ ambari.log.file=ambari-server.log ambari.config-changes.file=ambari-config-changes.log ambari.alerts.file=ambari-alerts.log ambari.eclipselink.file=ambari-eclipselink.log +ambari.dbcheck.file=ambari-server-check-database.log # Define the root logger to the system property "ambari.root.logger". log4j.rootLogger=${ambari.root.logger} @@ -76,6 +77,14 @@ log4j.appender.alerts.File=${ambari.log.dir}\${ambari.alerts.file} log4j.appender.alerts.layout=org.apache.log4j.PatternLayout log4j.appender.alerts.layout.ConversionPattern=%d{ISO8601} %m%n +# Log database check process +log4j.logger.org.apache.ambari.server.checks.CheckDatabaseHelper=INFO, dbcheck +log4j.additivity.org.apache.ambari.server.checks.CheckDatabaseHelper=false +log4j.appender.dbcheck=org.apache.log4j.FileAppender +log4j.appender.dbcheck.File=${ambari.log.dir}/${ambari.dbcheck.file} +log4j.appender.dbcheck.layout=org.apache.log4j.PatternLayout +log4j.appender.dbcheck.layout.ConversionPattern=%d{ISO8601} %m%n + # EclipsLink -> slf4j bridge log4j.logger.eclipselink=TRACE,eclipselink log4j.additivity.eclipselink=false http://git-wip-us.apache.org/repos/asf/ambari/blob/4761fe7c/ambari-server/src/main/conf/log4j.properties -- diff --git a/ambari-server/src/main/conf/log4j.properties b/ambari-server/src/main/conf/log4j.properties index 11e8d51..1211fe3 100644 --- a/ambari-server/src/main/conf/log4j.properties +++ b/ambari-server/src/main/conf/log4j.properties @@ -23,6 +23,7 @@ ambari.log.file=ambari-server.log ambari.config-changes.file=ambari-config-changes.log ambari.alerts.file=ambari-alerts.log ambari.eclipselink.file=ambari-eclipselink.log +ambari.dbcheck.file=ambari-server-check-database.log
[32/33] ambari git commit: AMBARI-15085. Enhanced graph widgets aren't updated after getting no data (alexantonenko)
AMBARI-15085. Enhanced graph widgets aren't updated after getting no data (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f9271491 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f9271491 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f9271491 Branch: refs/heads/branch-dev-patch-upgrade Commit: f92714910c74336a6e797056173dc287185f5ed1 Parents: 1bd4c23 Author: Alex AntonenkoAuthored: Thu Feb 18 12:03:54 2016 +0200 Committer: Alex Antonenko Committed: Thu Feb 18 13:14:49 2016 +0200 -- .../app/mixins/common/widgets/widget_mixin.js | 8 +++-- .../test/mixins/common/widget_mixin_test.js | 35 +++- 2 files changed, 33 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f9271491/ambari-web/app/mixins/common/widgets/widget_mixin.js -- diff --git a/ambari-web/app/mixins/common/widgets/widget_mixin.js b/ambari-web/app/mixins/common/widgets/widget_mixin.js index 13e55f2..4d777e4 100644 --- a/ambari-web/app/mixins/common/widgets/widget_mixin.js +++ b/ambari-web/app/mixins/common/widgets/widget_mixin.js @@ -318,7 +318,9 @@ App.WidgetMixin = Ember.Mixin.create({ graph.set('hasData', false); this.set('isExportButtonHidden', true); graph._showMessage('info', this.t('graphs.noData.title'), this.t('graphs.noDataAtTime.message')); -this.get('metrics').clear(); +this.set('metrics', this.get('metrics').reject(function (item) { + return this.get('content.metrics').someProperty('name', item.name); +}, this)); } } }, this); @@ -341,7 +343,9 @@ App.WidgetMixin = Ember.Mixin.create({ graph.set('hasData', false); this.set('isExportButtonHidden', true); graph._showMessage('warn', this.t('graphs.error.title'), this.t('graphs.error.message').format(textStatus, errorThrown)); -this.get('metrics').clear(); +this.set('metrics', this.get('metrics').reject(function (item) { + return this.get('content.metrics').someProperty('name', item.name); +}, this)); } } }, http://git-wip-us.apache.org/repos/asf/ambari/blob/f9271491/ambari-web/test/mixins/common/widget_mixin_test.js -- diff --git a/ambari-web/test/mixins/common/widget_mixin_test.js b/ambari-web/test/mixins/common/widget_mixin_test.js index c70150d..662f8b8 100644 --- a/ambari-web/test/mixins/common/widget_mixin_test.js +++ b/ambari-web/test/mixins/common/widget_mixin_test.js @@ -391,11 +391,19 @@ describe('App.WidgetMixin', function () { view = Em.Object.create({ _showMessage: Em.K }), + metrics = [ +{ + name: 'n0' +}, +{ + name: 'n1' +} + ], cases = [ { graphView: null, isForcedAbort: false, - metricsLength: 1, + metrics: metrics, showMessageCallCount: 0, isExportButtonHidden: false, title: 'no graph view' @@ -403,7 +411,7 @@ describe('App.WidgetMixin', function () { { graphView: {}, isForcedAbort: false, - metricsLength: 1, + metrics: metrics, showMessageCallCount: 0, isExportButtonHidden: false, title: 'no childViews property' @@ -412,7 +420,7 @@ describe('App.WidgetMixin', function () { graphView: {}, childViews: [], isForcedAbort: false, - metricsLength: 1, + metrics: metrics, showMessageCallCount: 0, isExportButtonHidden: false, title: 'no child views' @@ -421,7 +429,7 @@ describe('App.WidgetMixin', function () { graphView: {}, childViews: [Em.Object.create({})], isForcedAbort: false, - metricsLength: 1, + metrics: metrics, showMessageCallCount: 0, isExportButtonHidden: false, title: 'no view with _showMessage method' @@ -430,7 +438,11 @@ describe('App.WidgetMixin', function () { graphView: {}, childViews: [Em.Object.create({}), view], isForcedAbort: false, - metricsLength: 0, + metrics: [ +{ + name: 'n1' +} + ], showMessageCallCount: 1, isExportButtonHidden: true, title: 'graph view is available' @@ -439,7 +451,7 @@ describe('App.WidgetMixin', function () { graphView: {}, childViews: [Em.Object.create({}), view], isForcedAbort: true, -
[17/33] ambari git commit: AMBARI-14912: Add upgrade support for Setting feature (Ajit Kumar via smnaha)
AMBARI-14912: Add upgrade support for Setting feature (Ajit Kumar via smnaha) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7d06e8bf Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7d06e8bf Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7d06e8bf Branch: refs/heads/branch-dev-patch-upgrade Commit: 7d06e8bf68abe725620c0eb60cce16959901c747 Parents: a91890a Author: Nahappan SomasundaramAuthored: Wed Feb 17 09:06:39 2016 -0800 Committer: Nahappan Somasundaram Committed: Wed Feb 17 09:06:39 2016 -0800 -- .../server/upgrade/UpgradeCatalog240.java | 76 +--- .../server/upgrade/UpgradeCatalog240Test.java | 92 ++-- 2 files changed, 132 insertions(+), 36 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7d06e8bf/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java index 2ea326a..d97962f 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java @@ -18,6 +18,7 @@ package org.apache.ambari.server.upgrade; +import com.google.common.collect.Lists; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; @@ -30,6 +31,8 @@ import org.apache.ambari.server.controller.AmbariManagementController; import org.apache.ambari.server.orm.DBAccessor; import org.apache.ambari.server.orm.dao.AlertDefinitionDAO; import org.apache.ambari.server.orm.dao.DaoUtils; +import org.apache.ambari.server.orm.dao.PermissionDAO; +import org.apache.ambari.server.orm.dao.ResourceTypeDAO; import org.apache.ambari.server.orm.entities.AlertDefinitionEntity; import org.apache.ambari.server.orm.entities.PermissionEntity; import org.apache.ambari.server.state.Cluster; @@ -37,7 +40,9 @@ import org.apache.ambari.server.state.Clusters; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.sql.ResultSet; import java.sql.SQLException; +import java.sql.Statement; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; @@ -58,12 +63,19 @@ public class UpgradeCatalog240 extends AbstractUpgradeCatalog { @Inject DaoUtils daoUtils; + @Inject + PermissionDAO permissionDAO; + + @Inject + ResourceTypeDAO resourceTypeDAO; + /** * Logger. */ private static final Logger LOG = LoggerFactory.getLogger(UpgradeCatalog240.class); - + private static final String ID = "id"; + private static final String SETTING_TABLE = "setting"; // - Constructors -- @@ -76,7 +88,7 @@ public class UpgradeCatalog240 extends AbstractUpgradeCatalog { @Inject public UpgradeCatalog240(Injector injector) { super(injector); -this.injector = injector; +injector.injectMembers(this); } // - UpgradeCatalog @@ -103,6 +115,7 @@ public class UpgradeCatalog240 extends AbstractUpgradeCatalog { @Override protected void executeDDLUpdates() throws AmbariException, SQLException { updateAdminPermissionTable(); +createSettingTable(); } @Override @@ -115,7 +128,39 @@ public class UpgradeCatalog240 extends AbstractUpgradeCatalog { addNewConfigurationsFromXml(); updateAlerts(); setRoleSortOrder(); +addSettingPermission(); + } + + private void createSettingTable() throws SQLException { +List columns = new ArrayList<>(); +// Add setting table +LOG.info("Creating " + SETTING_TABLE + " table"); + +columns.add(new DBAccessor.DBColumnInfo(ID, Long.class, null, null, false)); +columns.add(new DBAccessor.DBColumnInfo("name", String.class, 255, null, false)); +columns.add(new DBAccessor.DBColumnInfo("setting_type", String.class, 255, null, false)); +columns.add(new DBAccessor.DBColumnInfo("content", String.class, 3000, null, false)); +columns.add(new DBAccessor.DBColumnInfo("updated_by", String.class, 255, "_db", false)); +columns.add(new DBAccessor.DBColumnInfo("update_timestamp", Long.class, null, null, false)); +dbAccessor.createTable(SETTING_TABLE, columns, ID); +addSequence("setting_id_seq", 0L, false); + } + + protected void addSettingPermission() throws SQLException { +String administratorPermissionId = +
[22/33] ambari git commit: AMBARI-15001: Hdfs keytab for hawq service check on secured cluster
AMBARI-15001: Hdfs keytab for hawq service check on secured cluster Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0ea255c5 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0ea255c5 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0ea255c5 Branch: refs/heads/branch-dev-patch-upgrade Commit: 0ea255c59005eda4d5684230460d8b1c647c78f7 Parents: 5a9bb71 Author: Jun AokiAuthored: Wed Feb 17 12:27:50 2016 -0800 Committer: Jun Aoki Committed: Wed Feb 17 12:27:50 2016 -0800 -- .../common-services/HAWQ/2.0.0/kerberos.json| 125 +-- 1 file changed, 56 insertions(+), 69 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0ea255c5/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/kerberos.json -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/kerberos.json b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/kerberos.json index cc11c15..da11986 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/kerberos.json +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/kerberos.json @@ -1,73 +1,60 @@ { -"services": [ + "services": [ +{ + "name": "HAWQ", + "identities": [ { -"name": "HAWQ", -"identities": [ -{ -"name": "/hdfs" -} -], -"configurations": [ -{ -"hawq-site": { -"enable_secure_filesystem": "ON", -"krb_server_keyfile": "${keytab_dir}/hawq.service.keytab" -} -}, -{ -"hdfs-client": { -"hadoop.security.authentication": "kerberos" -} -} -], -"components": [ -{ -"identities": [ -{ -"keytab": { -"file": "${keytab_dir}/hawq.service.keytab", -"group": { -"access": "", -"name": "${cluster-env/user_group}" -}, -"owner": { -"access": "r", -"name": "gpadmin" -} -}, -"name": "hawq_master_hawq", -"principal": { -"type": "service", -"value": "postgres@${realm}" -} -} -], -"name": "HAWQMASTER" -}, -{ -"identities": [ -{ -"keytab": { -"file": "${keytab_dir}/hawq.service.keytab", -"group": { -"access": "", -"name": "${cluster-env/user_group}" -}, -"owner": { -"access": "r", -"name": "gpadmin" -} -}, -"name": "hawq_standby_hawq", -"principal": { -"type": "service", -"value": "postgres@${realm}" -} -} -], -"name": "HAWQSTANDBY" -} -] + "name": "/HDFS/NAMENODE/hdfs" +}, +{ + "name": "hawq_identity", + "principal": { +"type": "user", +"value": "postgres@${realm}" + }, + "keytab": { +"file": "${keytab_dir}/hawq.service.keytab", +"owner": { + "access": "r", + "name": "gpadmin" +}, +"group": { + "name": "${cluster-env/user_group}" +} + } +} + ], + "configurations": [ +{ + "hawq-site": { +"enable_secure_filesystem": "ON", +"krb_server_keyfile": "${keytab_dir}/hawq.service.keytab" + } +}, +{ + "hdfs-client": { +
[15/33] ambari git commit: AMBARI-14875. Ranger Smart configs : Need to hide Audit DB properties if Audit to DB is off. (addendum patch) (jaimin)
AMBARI-14875. Ranger Smart configs : Need to hide Audit DB properties if Audit to DB is off. (addendum patch) (jaimin) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/506bb8d1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/506bb8d1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/506bb8d1 Branch: refs/heads/branch-dev-patch-upgrade Commit: 506bb8d186500ba700bc3f58f1520f105876e0c4 Parents: b339542 Author: Jaimin JetlyAuthored: Wed Feb 17 20:16:40 2016 +0530 Committer: Jaimin Jetly Committed: Wed Feb 17 20:18:15 2016 +0530 -- .../services/RANGER/themes/theme_version_2.json | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/506bb8d1/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/themes/theme_version_2.json -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/themes/theme_version_2.json b/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/themes/theme_version_2.json index 59e58a4..cbd27e4 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/themes/theme_version_2.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/themes/theme_version_2.json @@ -940,7 +940,25 @@ }, { "config": "admin-properties/audit_db_password", - "subsection-name": "subsection-ranger-audit-db-row2-col2" + "subsection-name": "subsection-ranger-audit-db-row2-col2", + "depends-on": [ +{ + "configs":[ +"ranger-env/xasecure.audit.destination.db" + ], + "if": "${ranger-env/xasecure.audit.destination.db}", + "then": { +"property_value_attributes": { + "visible": true +} + }, + "else": { +"property_value_attributes": { + "visible": false +} + } +} + ] }, { "config": "ranger-env/xasecure.audit.destination.solr",
[11/33] ambari git commit: AMBARI-14987: assign_master_component.js does not show recommendations while adding master component for a service which is already installed (mithmatt via jaoki)
AMBARI-14987: assign_master_component.js does not show recommendations while adding master component for a service which is already installed (mithmatt via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e4800e1c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e4800e1c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e4800e1c Branch: refs/heads/branch-dev-patch-upgrade Commit: e4800e1c97709e8218989080fceb0df406e744ea Parents: 529c588 Author: Jun AokiAuthored: Tue Feb 16 16:43:39 2016 -0800 Committer: Jun Aoki Committed: Tue Feb 16 16:43:39 2016 -0800 -- ambari-web/app/assets/test/tests.js | 1 + .../mixins/wizard/assign_master_components.js | 58 ++- .../wizard/assign_master_components_test.js | 154 +++ 3 files changed, 212 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e4800e1c/ambari-web/app/assets/test/tests.js -- diff --git a/ambari-web/app/assets/test/tests.js b/ambari-web/app/assets/test/tests.js index 44fb4f4..0695d06 100644 --- a/ambari-web/app/assets/test/tests.js +++ b/ambari-web/app/assets/test/tests.js @@ -157,6 +157,7 @@ var files = [ 'test/mixins/main/service/configs/config_overridable_test', 'test/mixins/routers/redirections_test', 'test/mixins/wizard/addSeccurityConfigs_test', + 'test/mixins/wizard/assign_master_components_test', 'test/mixins/wizard/wizard_menu_view_test', 'test/mixins/wizard/wizardProgressPageController_test', 'test/mixins/wizard/wizardEnableDone_test', http://git-wip-us.apache.org/repos/asf/ambari/blob/e4800e1c/ambari-web/app/mixins/wizard/assign_master_components.js -- diff --git a/ambari-web/app/mixins/wizard/assign_master_components.js b/ambari-web/app/mixins/wizard/assign_master_components.js index a2440a4..645c996 100644 --- a/ambari-web/app/mixins/wizard/assign_master_components.js +++ b/ambari-web/app/mixins/wizard/assign_master_components.js @@ -95,6 +95,22 @@ App.AssignMasterComponents = Em.Mixin.create({ showInstalledMastersFirst: false, /** + * Map of component name to list of hostnames for that component + * format: + * { + * NAMENODE: [ + * 'c6401.ambari.apache.org' + * ], + * DATANODE: [ + * 'c6402.ambari.apache.org', + * 'c6403.ambari.apache.org', + * ] + * } + * @type {Object} + */ + recommendedHostsForComponents: {}, + + /** * Array of servicesMasters objects, that will be shown on the page * Are filtered using mastersToShow * @type {Array} @@ -731,7 +747,31 @@ App.AssignMasterComponents = Em.Mixin.create({ * @method loadRecommendationsSuccessCallback */ loadRecommendationsSuccessCallback: function (data) { -this.set('content.recommendations', data.resources[0].recommendations); +var recommendations = data.resources[0].recommendations; +this.set('content.recommendations', recommendations); + +var recommendedHostsForComponent = {}; +var hostsForHostGroup = {}; + + recommendations.blueprint_cluster_binding.host_groups.forEach(function(hostGroup) { + hostsForHostGroup[hostGroup.name] = hostGroup.hosts.map(function(host) { +return host.fqdn; + }); +}); + +recommendations.blueprint.host_groups.forEach(function (hostGroup) { + var components = hostGroup.components.map(function (component) { +return component.name; + }); + components.forEach(function (componentName) { +var hostList = recommendedHostsForComponent[componentName] || []; +var hostNames = hostsForHostGroup[hostGroup.name] || []; +Array.prototype.push.apply(hostList, hostNames); +recommendedHostsForComponent[componentName] = hostList; + }); +}); + +this.set('content.recommendedHostsForComponents', recommendedHostsForComponent); }, /** @@ -817,6 +857,21 @@ App.AssignMasterComponents = Em.Mixin.create({ * @returns {*} */ getHostForMaster: function (master, allMasters) { +var masterHostList = []; + +allMasters.forEach(function (component) { + if (component.component_name === master) { +masterHostList.push(component.selectedHost); + } +}); + +var recommendedHostsForMaster = this.get('content.recommendedHostsForComponents')[master] || []; +for (var k = 0; k < recommendedHostsForMaster.length; k++) { + if(!masterHostList.contains(recommendedHostsForMaster[k])) { +return recommendedHostsForMaster[k]; + } +} + var usedHosts = allMasters.filterProperty('component_name', master).mapProperty('selectedHost'); var
[19/33] ambari git commit: AMBARI-15062. Combo Search: Create auto suggest for Component State filter (Joe Wang via rzang)
AMBARI-15062. Combo Search: Create auto suggest for Component State filter (Joe Wang via rzang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4124ae03 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4124ae03 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4124ae03 Branch: refs/heads/branch-dev-patch-upgrade Commit: 4124ae032646ca3f7bbea19288da9cba259933e5 Parents: d4b67b1 Author: Richard ZangAuthored: Wed Feb 17 11:00:59 2016 -0800 Committer: Richard Zang Committed: Wed Feb 17 11:00:59 2016 -0800 -- ambari-web/app/controllers/main/host/combo_search_box.js | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4124ae03/ambari-web/app/controllers/main/host/combo_search_box.js -- diff --git a/ambari-web/app/controllers/main/host/combo_search_box.js b/ambari-web/app/controllers/main/host/combo_search_box.js index d835e97..f4cc50f 100644 --- a/ambari-web/app/controllers/main/host/combo_search_box.js +++ b/ambari-web/app/controllers/main/host/combo_search_box.js @@ -88,13 +88,7 @@ App.MainHostComboSearchBoxController = Em.Controller.extend({ callback(App.HostComponent.find().toArray().mapProperty('componentName').uniq(), {preserveOrder: true}); break; case 'state': - callback([ -Em.I18n.t('common.started'), -Em.I18n.t('common.stopped'), -Em.I18n.t('hosts.host.stackVersions.status.install_failed'), -Em.I18n.t('hosts.host.decommissioning'), -Em.I18n.t('hosts.host.decommissioned') - ], {preserveOrder: true}); + callback(App.HostComponentStatus.getStatusesList(), {preserveOrder: true}); break; } }
[06/33] ambari git commit: AMBARI-15022: Add Custom action to sync Standby with Master (goutamtadi via jaoki)
AMBARI-15022: Add Custom action to sync Standby with Master (goutamtadi via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f41fccfc Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f41fccfc Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f41fccfc Branch: refs/heads/branch-dev-patch-upgrade Commit: f41fccfc829919546fcb8e2a79a36a4b477affa6 Parents: f18601c Author: Jun AokiAuthored: Tue Feb 16 11:33:30 2016 -0800 Committer: Jun Aoki Committed: Tue Feb 16 11:33:30 2016 -0800 -- .../common-services/HAWQ/2.0.0/metainfo.xml | 14 -- .../HAWQ/2.0.0/package/scripts/hawqmaster.py| 2 +- .../HAWQ/2.0.0/package/scripts/hawqsegment.py | 2 +- .../HAWQ/2.0.0/package/scripts/hawqstandby.py | 10 - .../hawq/activateStandby/step3_controller.js| 2 +- ambari-web/app/controllers/main/service/item.js | 46 ++-- ambari-web/app/messages.js | 5 ++- ambari-web/app/models/host_component.js | 27 ambari-web/app/utils/helper.js | 14 ++ ambari-web/app/views/main/service/item.js | 41 + 10 files changed, 104 insertions(+), 59 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f41fccfc/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml index 7a71604..fd145f4 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml @@ -39,7 +39,7 @@ - IMMEDIATE_STOP_CLUSTER + IMMEDIATE_STOP_HAWQ_SERVICE scripts/hawqmaster.py PYTHON @@ -78,7 +78,15 @@ - ACTIVATE_STANDBY + ACTIVATE_HAWQ_STANDBY + +scripts/hawqstandby.py +PYTHON +1200 + + + + RESYNC_HAWQ_STANDBY scripts/hawqstandby.py PYTHON @@ -110,7 +118,7 @@ - IMMEDIATE_STOP + IMMEDIATE_STOP_HAWQ_SEGMENT scripts/hawqsegment.py PYTHON http://git-wip-us.apache.org/repos/asf/ambari/blob/f41fccfc/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py index 8c7b0b5..d2f9ad0 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py @@ -51,7 +51,7 @@ class HawqMaster(Script): from hawqstatus import get_pid_file check_process_status(get_pid_file()) - def immediate_stop_cluster(self, env): + def immediate_stop_hawq_service(self, env): master_helper.stop(hawq_constants.IMMEDIATE, hawq_constants.CLUSTER) if __name__ == "__main__": http://git-wip-us.apache.org/repos/asf/ambari/blob/f41fccfc/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py index 6bc9802..0a597b6 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py @@ -73,7 +73,7 @@ class HawqSegment(Script): from hawqstatus import get_pid_file check_process_status(get_pid_file()) - def immediate_stop(self, env): + def immediate_stop_hawq_segment(self, env): self.stop(env, mode=hawq_constants.IMMEDIATE) http://git-wip-us.apache.org/repos/asf/ambari/blob/f41fccfc/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py -- diff --git
[08/33] ambari git commit: AMBARI-14986 Combo Search: Create auto suggest for Serivce Component filters (Joe Wang via rzang)
AMBARI-14986 Combo Search: Create auto suggest for Serivce Component filters (Joe Wang via rzang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/21fd70c9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/21fd70c9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/21fd70c9 Branch: refs/heads/branch-dev-patch-upgrade Commit: 21fd70c9bf911d56a91cad514a033fbff3c5bcb4 Parents: 1e510f5 Author: Richard ZangAuthored: Tue Feb 16 14:27:47 2016 -0800 Committer: Richard Zang Committed: Tue Feb 16 14:27:47 2016 -0800 -- ambari-web/app/controllers/main/host/combo_search_box.js | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/21fd70c9/ambari-web/app/controllers/main/host/combo_search_box.js -- diff --git a/ambari-web/app/controllers/main/host/combo_search_box.js b/ambari-web/app/controllers/main/host/combo_search_box.js index 1c2a87f..d835e97 100644 --- a/ambari-web/app/controllers/main/host/combo_search_box.js +++ b/ambari-web/app/controllers/main/host/combo_search_box.js @@ -82,13 +82,10 @@ App.MainHostComboSearchBoxController = Em.Controller.extend({ ]); break; case 'service': - callback(App.Service.find().toArray().mapProperty('serviceName')); + callback(App.Service.find().toArray().mapProperty('serviceName'), {preserveOrder: true}); break; case 'component': - callback(App.MasterComponent.find().toArray().mapProperty('componentName') - .concat(App.SlaveComponent.find().toArray().mapProperty('componentName')) - .concat(App.ClientComponent.find().toArray().mapProperty('componentName')) -,{preserveOrder: true}); + callback(App.HostComponent.find().toArray().mapProperty('componentName').uniq(), {preserveOrder: true}); break; case 'state': callback([
[29/33] ambari git commit: AMBARI-14881: Enable/Disable Custom Commands on Host Component page (goutamtadi via jaoki)
AMBARI-14881: Enable/Disable Custom Commands on Host Component page (goutamtadi via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/dcebcca6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/dcebcca6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/dcebcca6 Branch: refs/heads/branch-dev-patch-upgrade Commit: dcebcca60d47743176519b7758b86505263e39a7 Parents: b53a13f Author: Jun AokiAuthored: Wed Feb 17 18:52:38 2016 -0800 Committer: Jun Aoki Committed: Wed Feb 17 18:52:38 2016 -0800 -- ambari-web/app/templates/main/host/details/host_component.hbs | 2 +- ambari-web/app/views/main/host/details/host_component_view.js | 7 --- 2 files changed, 5 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/dcebcca6/ambari-web/app/templates/main/host/details/host_component.hbs -- diff --git a/ambari-web/app/templates/main/host/details/host_component.hbs b/ambari-web/app/templates/main/host/details/host_component.hbs index 00db8d1..60031de 100644 --- a/ambari-web/app/templates/main/host/details/host_component.hbs +++ b/ambari-web/app/templates/main/host/details/host_component.hbs @@ -143,7 +143,7 @@ {{/if}} {{#each command in view.customCommands}} - + {{command.label}} {{/each}} http://git-wip-us.apache.org/repos/asf/ambari/blob/dcebcca6/ambari-web/app/views/main/host/details/host_component_view.js -- diff --git a/ambari-web/app/views/main/host/details/host_component_view.js b/ambari-web/app/views/main/host/details/host_component_view.js index 6205604..d059498 100644 --- a/ambari-web/app/views/main/host/details/host_component_view.js +++ b/ambari-web/app/views/main/host/details/host_component_view.js @@ -311,14 +311,15 @@ App.HostComponentView = Em.View.extend({ return; } - var isContextPresent = command in App.HostComponentActionMap.getMap(self) && App.HostComponentActionMap.getMap(self)[command].context; + var commandMap = App.HostComponentActionMap.getMap(self)[command]; customCommands.push({ label: self.getCustomCommandLabel(command), service: component.get('serviceName'), hosts: hostComponent.get('hostName'), -context: isContextPresent ? App.HostComponentActionMap.getMap(self)[command].context : null, +context: (!!commandMap && !!commandMap.context) ? commandMap.context : null, component: component.get('componentName'), -command: command +command: command, +disabled: !!commandMap ? !!commandMap.disabled : false }); });
[03/33] ambari git commit: Updated version for the website. (yusaku)
Updated version for the website. (yusaku) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b900d03a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b900d03a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b900d03a Branch: refs/heads/branch-dev-patch-upgrade Commit: b900d03a9a4bef2292f1ad0857edf6d73f7abb24 Parents: be1b6b9 Author: Yusaku SakoAuthored: Tue Feb 16 10:38:56 2016 -0800 Committer: Yusaku Sako Committed: Tue Feb 16 10:38:56 2016 -0800 -- docs/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b900d03a/docs/pom.xml -- diff --git a/docs/pom.xml b/docs/pom.xml index c3bb326..d6e04e3 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -28,7 +28,7 @@ 4.0.0 org.apache.ambari -2.2.0 +2.2.1 ambari pom @@ -42,7 +42,7 @@ /var/run/ambari 1 tar.gz -2.2.0 +2.2.1 ${project.artifactId}-${ambari.version}
[21/33] ambari git commit: AMBARI-15036. Return privilege information with results from GroupResourceProvider (rlevas)
AMBARI-15036. Return privilege information with results from GroupResourceProvider (rlevas) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5a9bb715 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5a9bb715 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5a9bb715 Branch: refs/heads/branch-dev-patch-upgrade Commit: 5a9bb715811f93104cc593215049a861c13d45d0 Parents: c282a0e Author: Robert LevasAuthored: Wed Feb 17 14:14:31 2016 -0500 Committer: Robert Levas Committed: Wed Feb 17 14:14:39 2016 -0500 -- .../api/resources/GroupResourceDefinition.java | 1 + .../resources/ResourceInstanceFactoryImpl.java | 4 + .../api/services/GroupPrivilegeService.java | 76 .../server/api/services/GroupService.java | 11 + .../internal/DefaultProviderModule.java | 2 + .../GroupPrivilegeResourceProvider.java | 237 .../ambari/server/controller/spi/Resource.java | 2 + .../api/services/GroupPrivilegeServiceTest.java | 109 ++ .../GroupPrivilegeResourceProviderTest.java | 362 +++ 9 files changed, 804 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5a9bb715/ambari-server/src/main/java/org/apache/ambari/server/api/resources/GroupResourceDefinition.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/GroupResourceDefinition.java b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/GroupResourceDefinition.java index 783e04b..57e5e20 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/GroupResourceDefinition.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/GroupResourceDefinition.java @@ -44,6 +44,7 @@ public class GroupResourceDefinition extends BaseResourceDefinition { public Set getSubResourceDefinitions() { final Set subResourceDefinitions = new HashSet(); subResourceDefinitions.add(new SubResourceDefinition(Resource.Type.Member)); +subResourceDefinitions.add(new SubResourceDefinition(Resource.Type.GroupPrivilege)); return subResourceDefinitions; } } http://git-wip-us.apache.org/repos/asf/ambari/blob/5a9bb715/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java index 4c12094..b0160b9 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java @@ -297,6 +297,10 @@ public class ResourceInstanceFactoryImpl implements ResourceInstanceFactory { resourceDefinition = new PrivilegeResourceDefinition(Resource.Type.UserPrivilege); break; + case GroupPrivilege: +resourceDefinition = new PrivilegeResourceDefinition(Resource.Type.GroupPrivilege); +break; + case ViewPermission: resourceDefinition = new ViewPermissionResourceDefinition(); break; http://git-wip-us.apache.org/repos/asf/ambari/blob/5a9bb715/ambari-server/src/main/java/org/apache/ambari/server/api/services/GroupPrivilegeService.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/GroupPrivilegeService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/GroupPrivilegeService.java new file mode 100644 index 000..290d488 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/GroupPrivilegeService.java @@ -0,0 +1,76 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions
[18/33] ambari git commit: AMBARI-15072. Failures in Express Upgrade from Dal M20 to Derg due to missing modules (aonishuk)
AMBARI-15072. Failures in Express Upgrade from Dal M20 to Derg due to missing modules (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d4b67b1f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d4b67b1f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d4b67b1f Branch: refs/heads/branch-dev-patch-upgrade Commit: d4b67b1fd39fdbdc05c8f0d9449d0c0156befa6c Parents: 7d06e8b Author: Andrew OnishukAuthored: Wed Feb 17 19:58:17 2016 +0200 Committer: Andrew Onishuk Committed: Wed Feb 17 19:58:17 2016 +0200 -- .../main/resources/custom_actions/scripts/ru_execute_tasks.py| 2 +- .../src/test/python/custom_actions/test_ru_execute_tasks.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d4b67b1f/ambari-server/src/main/resources/custom_actions/scripts/ru_execute_tasks.py -- diff --git a/ambari-server/src/main/resources/custom_actions/scripts/ru_execute_tasks.py b/ambari-server/src/main/resources/custom_actions/scripts/ru_execute_tasks.py index 928fef8..8e526c5 100644 --- a/ambari-server/src/main/resources/custom_actions/scripts/ru_execute_tasks.py +++ b/ambari-server/src/main/resources/custom_actions/scripts/ru_execute_tasks.py @@ -144,7 +144,7 @@ class ExecuteUpgradeTasks(Script): self.logging_level, Script.get_tmp_dir()] - task.command = " ".join(command_params) + task.command = "source /var/lib/ambari-agent/ambari-env.sh ; " + " ".join(command_params) # Replace redundant whitespace to make the unit tests easier to validate task.command = re.sub("\s+", " ", task.command).strip() http://git-wip-us.apache.org/repos/asf/ambari/blob/d4b67b1f/ambari-server/src/test/python/custom_actions/test_ru_execute_tasks.py -- diff --git a/ambari-server/src/test/python/custom_actions/test_ru_execute_tasks.py b/ambari-server/src/test/python/custom_actions/test_ru_execute_tasks.py index 31c1030..6147b87 100644 --- a/ambari-server/src/test/python/custom_actions/test_ru_execute_tasks.py +++ b/ambari-server/src/test/python/custom_actions/test_ru_execute_tasks.py @@ -129,7 +129,7 @@ class TestRUExecuteTasks(RMFTestCase): ru_execute.actionexecute(None) call_mock.assert_called_with( -"/usr/bin/ambari-python-wrap /var/lib/ambari-agent/cache/common-services/HDFS/2.1.0.2.0/package" + os.sep + +"source /var/lib/ambari-agent/ambari-env.sh ; /usr/bin/ambari-python-wrap /var/lib/ambari-agent/cache/common-services/HDFS/2.1.0.2.0/package" + os.sep + "scripts/namenode.py prepare_rolling_upgrade /tmp", logoutput=True, quiet=True) pass @@ -176,6 +176,6 @@ class TestRUExecuteTasks(RMFTestCase): ru_execute = ExecuteUpgradeTasks() ru_execute.actionexecute(None) -call_mock.assert_called_with("/usr/bin/ambari-python-wrap /var/lib/ambari-agent/cache/custom_actions" + os.sep + +call_mock.assert_called_with("source /var/lib/ambari-agent/ambari-env.sh ; /usr/bin/ambari-python-wrap /var/lib/ambari-agent/cache/custom_actions" + os.sep + "scripts/namenode.py prepare_rolling_upgrade /tmp", logoutput=True, quiet=True) pass
[27/33] ambari git commit: AMBARI-15063 : Metrics monitor fails on restart - Commit 2 (avijayan)
AMBARI-15063 : Metrics monitor fails on restart - Commit 2 (avijayan) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8999aee3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8999aee3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8999aee3 Branch: refs/heads/branch-dev-patch-upgrade Commit: 8999aee37b2f4129304f6e93b7928d0bafd68f25 Parents: df2dbe1 Author: Aravindan VijayanAuthored: Wed Feb 17 15:20:10 2016 -0800 Committer: Aravindan Vijayan Committed: Wed Feb 17 15:20:10 2016 -0800 -- .../conf/unix/ambari-metrics-monitor | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8999aee3/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor -- diff --git a/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor b/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor index aa4ae02..7464c55 100644 --- a/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor +++ b/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/ambari-metrics-monitor @@ -131,7 +131,7 @@ case "$1" in echo "Checking for previously running Metric Monitor..." if [ -f ${PIDFILE} ]; then PID=`cat ${PIDFILE}` - if [ -z "`ps ax -o pid | grep -w ${PID} | grep resource_monitoring`" ]; then + if [ -z "`ps ax | grep -w ${PID} | grep resource_monitoring`" ]; then echo "${PIDFILE} found with no process. Removing ${PID}..." rm -f ${PIDFILE} else @@ -152,7 +152,7 @@ case "$1" in sleep 2 echo "Verifying ${METRIC_MONITOR} process status..." -if [ -z "`ps ax -o pid | grep -w ${PID} | grep resource_monitoring`" ]; then +if [ -z "`ps ax | grep -w ${PID} | grep resource_monitoring`" ]; then if [ -s ${OUTFILE} ]; then echo "ERROR: ${METRIC_MONITOR} start failed. For more details, see ${OUTFILE}:" echo "" @@ -173,7 +173,7 @@ case "$1" in if [ -f ${PIDFILE} ]; then PID=`cat ${PIDFILE}` echo "Found ${METRIC_MONITOR} PID: $PID" - if [ -z "`ps ax -o pid | grep -w ${PID} | grep resource_monitoring`" ]; then + if [ -z "`ps ax | grep -w ${PID} | grep resource_monitoring`" ]; then echo "${METRIC_MONITOR} not running. Stale PID File at: $PIDFILE" retcode=2 else
[12/33] ambari git commit: AMBARI-15054 Changing Yarn queues does not update hive.server2.tez.default.queues. (ababiichuk)
AMBARI-15054 Changing Yarn queues does not update hive.server2.tez.default.queues. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8cfb2db6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8cfb2db6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8cfb2db6 Branch: refs/heads/branch-dev-patch-upgrade Commit: 8cfb2db63021fe5d1ed7f44f1d4412e397810090 Parents: e4800e1 Author: ababiichukAuthored: Wed Feb 17 11:55:27 2016 +0200 Committer: ababiichuk Committed: Wed Feb 17 11:55:27 2016 +0200 -- .../controllers/main/service/info/configs.js| 23 +- ambari-web/app/controllers/wizard.js| 3 - .../app/controllers/wizard/step7_controller.js | 6 +- .../app/mixins/common/configs/configs_saver.js | 4 - .../configs/objects/service_config_property.js | 2 + ambari-web/app/utils/config.js | 151 +--- ambari-web/app/views/common/controls_view.js| 75 +- .../test/controllers/wizard/step7_test.js | 26 -- ambari-web/test/utils/config_test.js| 242 --- 9 files changed, 140 insertions(+), 392 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8cfb2db6/ambari-web/app/controllers/main/service/info/configs.js -- diff --git a/ambari-web/app/controllers/main/service/info/configs.js b/ambari-web/app/controllers/main/service/info/configs.js index b6a434c..3cd652a 100644 --- a/ambari-web/app/controllers/main/service/info/configs.js +++ b/ambari-web/app/controllers/main/service/info/configs.js @@ -181,24 +181,6 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ConfigsLoader, A ], /** - * get array of config properties that are shown in settings tab - * @type {String[]} - */ - settingsTabProperties: function () { -var properties = []; -App.Tab.find().forEach(function (t) { - if (!t.get('isAdvanced') && t.get('serviceName') === this.get('content.serviceName')) { -t.get('sections').forEach(function (s) { - s.get('subSections').forEach(function (ss) { -properties = properties.concat(ss.get('configProperties')); - }); -}); - } -}, this); -return properties; - }.property('content.serviceName', 'App.router.clusterController.isStackConfigsLoaded'), - - /** * Dropdown menu items in filter combobox * @type {{attributeName: string, attributeValue: string, name: string, selected: boolean}[]} */ @@ -379,8 +361,7 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ConfigsLoader, A //put properties from capacity-scheduler.xml into one config with textarea view if (this.get('content.serviceName') === 'YARN') { - var configsToSkip = this.get('settingsTabProperties').filterProperty('filename', 'capacity-scheduler.xml'); - configs = App.config.fileConfigsIntoTextarea(configs, 'capacity-scheduler.xml', configsToSkip); + configs = App.config.addYarnCapacityScheduler(configs); } if (this.get('content.serviceName') === 'KERBEROS') { @@ -407,7 +388,7 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ConfigsLoader, A * @method mergeWithStackProperties */ mergeWithStackProperties: function (configs) { -this.get('settingsTabProperties').forEach(function (advanced_id) { + App.config.getPropertiesFromTheme(this.get('content.serviceName')).forEach(function (advanced_id) { if (!configs.someProperty('id', advanced_id)) { var advanced = App.configsCollection.getConfig(advanced_id); if (advanced) { http://git-wip-us.apache.org/repos/asf/ambari/blob/8cfb2db6/ambari-web/app/controllers/wizard.js -- diff --git a/ambari-web/app/controllers/wizard.js b/ambari-web/app/controllers/wizard.js index 05ef68e..329d246 100644 --- a/ambari-web/app/controllers/wizard.js +++ b/ambari-web/app/controllers/wizard.js @@ -889,9 +889,6 @@ App.WizardController = Em.Controller.extend(App.LocalStorage, App.ThemesMappingM var installedServiceNames = stepController.get('installedServiceNames') || []; var installedServiceNamesMap = installedServiceNames.toWickMap(); stepController.get('stepConfigs').forEach(function (_content) { - if (_content.serviceName === 'YARN') { -_content.set('configs', App.config.textareaIntoFileConfigs(_content.get('configs'), 'capacity-scheduler.xml')); - } _content.get('configs').forEach(function (_configProperties) { if (!Em.isNone(_configProperties.get('group'))) { return false;
[20/33] ambari git commit: AMBARI-15020: HAWQ service check fails when PXF is present due to cmd syntax error (bhuvnesh2703 via jaoki)
AMBARI-15020: HAWQ service check fails when PXF is present due to cmd syntax error (bhuvnesh2703 via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c282a0ee Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c282a0ee Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c282a0ee Branch: refs/heads/branch-dev-patch-upgrade Commit: c282a0eec34809290be93a4c08f6686948ff896f Parents: 4124ae0 Author: Jun AokiAuthored: Wed Feb 17 11:12:57 2016 -0800 Committer: Jun Aoki Committed: Wed Feb 17 11:12:57 2016 -0800 -- .../common-services/HAWQ/2.0.0/package/scripts/utils.py | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c282a0ee/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py index 51a38d1..f40e982 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py @@ -79,12 +79,8 @@ def exec_ssh_cmd(hostname, cmd): """ Runs the command on the remote host as gpadmin user """ - import params # Only gpadmin should be allowed to run command via ssh, thus not exposing user as a parameter - if params.hostname != hostname: -cmd = "su - {0} -c 'ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null {1} \"{2} \" '".format(hawq_constants.hawq_user, hostname, cmd) - else: -cmd = "su - {0} -c \"{1}\"".format(hawq_constants.hawq_user, cmd) + cmd = "su - {0} -c \"ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null {1} \\\"{2} \\\" \"".format(hawq_constants.hawq_user, hostname, cmd) Logger.info("Command executed: {0}".format(cmd)) process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) (stdout, stderr) = process.communicate() @@ -97,9 +93,9 @@ def exec_psql_cmd(command, host, port, db="template1", tuples_only=True): """ src_cmd = "export PGPORT={0} && source {1}".format(port, hawq_constants.hawq_greenplum_path_file) if tuples_only: -cmd = src_cmd + " && psql -d {0} -c \\\"{1};\\\"".format(db, command) +cmd = src_cmd + " && psql -d {0} -c \\\"{1};\\\"".format(db, command) else: -cmd = src_cmd + " && psql -t -d {0} -c \\\"{1};\\\"".format(db, command) +cmd = src_cmd + " && psql -t -d {0} -c \\\"{1};\\\"".format(db, command) retcode, out, err = exec_ssh_cmd(host, cmd) if retcode: Logger.error("SQL command executed failed: {0}\nReturncode: {1}\nStdout: {2}\nStderr: {3}".format(cmd, retcode, out, err))
[10/33] ambari git commit: AMBARI-14997: Update gpcheck.cnf to hawq_check.cnf file as recommended in HAWQ documentation (bhuvnesh2703 via jaoki)
AMBARI-14997: Update gpcheck.cnf to hawq_check.cnf file as recommended in HAWQ documentation (bhuvnesh2703 via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/529c588a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/529c588a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/529c588a Branch: refs/heads/branch-dev-patch-upgrade Commit: 529c588add78ce4d0a82542144ba94f89c80299e Parents: d412ca1 Author: Jun AokiAuthored: Tue Feb 16 16:27:02 2016 -0800 Committer: Jun Aoki Committed: Tue Feb 16 16:27:02 2016 -0800 -- .../HAWQ/2.0.0/configuration/gpcheck-env.xml| 89 .../HAWQ/2.0.0/configuration/hawq-check-env.xml | 89 .../common-services/HAWQ/2.0.0/metainfo.xml | 2 +- .../2.0.0/package/scripts/hawq_constants.py | 2 +- .../HAWQ/2.0.0/package/scripts/master_helper.py | 2 +- .../HAWQ/2.0.0/package/scripts/params.py| 2 +- .../stacks/2.3/common/services-hawq-1-host.json | 2 +- .../2.3/common/services-hawq-3-hosts.json | 2 +- .../2.3/common/services-hawq-pxf-hdfs.json | 4 +- .../services-master_ambari_colo-3-hosts.json| 2 +- .../services-master_standby_colo-3-hosts.json | 2 +- .../common/services-normal-hawq-3-hosts.json| 2 +- .../services-standby_ambari_colo-3-hosts.json | 2 +- ambari-web/app/data/HDP2.3/site_properties.js | 4 +- ambari-web/app/models/stack_service.js | 4 +- 15 files changed, 105 insertions(+), 105 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/529c588a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/gpcheck-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/gpcheck-env.xml b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/gpcheck-env.xml deleted file mode 100755 index 309a0c7..000 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/gpcheck-env.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - content - Content - Contents of the configuration file /usr/local/hawq/etc/gpcheck.cnf. This file is used by 'hawq check' command, which can be run manually by gpadmin user on the HAWQ master host. This command validates the system parameters and HDFS parameters mentioned in this file to ensure optimal HAWQ operation. - -[global] -configfile_version = 4 - -[linux.mount] -mount.points = / - -[linux.sysctl] -sysctl.kernel.shmmax = 5 -sysctl.kernel.shmmni = 4096 -sysctl.kernel.shmall = 40 -sysctl.kernel.sem = 250 512000 100 2048 -sysctl.kernel.sysrq = 1 -sysctl.kernel.core_uses_pid = 1 -sysctl.kernel.msgmnb = 65536 -sysctl.kernel.msgmax = 65536 -sysctl.kernel.msgmni = 2048 -sysctl.net.ipv4.tcp_syncookies = 0 -sysctl.net.ipv4.ip_forward = 0 -sysctl.net.ipv4.conf.default.accept_source_route = 0 -sysctl.net.ipv4.tcp_tw_recycle = 1 -sysctl.net.ipv4.tcp_max_syn_backlog = 20 -sysctl.net.ipv4.conf.all.arp_filter = 1 -sysctl.net.ipv4.ip_local_port_range = 1281 65535 -sysctl.net.core.netdev_max_backlog = 20 -sysctl.vm.overcommit_memory = 2 -sysctl.fs.nr_open = 300 -sysctl.kernel.threads-max = 798720 -sysctl.kernel.pid_max = 798720 -# increase network -sysctl.net.core.rmem_max = 2097152 -sysctl.net.core.wmem_max = 2097152 - -[linux.limits] -soft.nofile = 290 -hard.nofile = 290 -soft.nproc = 131072 -hard.nproc = 131072 - -[linux.diskusage] -diskusage.monitor.mounts = / -diskusage.monitor.usagemax = 90% - -[hdfs] -dfs.mem.namenode.heap = 40960 -dfs.mem.datanode.heap = 6144 -# in hdfs-site.xml -dfs.support.append = true -dfs.client.enable.read.from.local = true -dfs.block.local-path-access.user = gpadmin -dfs.datanode.max.transfer.threads = 40960 -dfs.client.socket-timeout = 3 -dfs.datanode.socket.write.timeout = 720 -dfs.namenode.handler.count = 60 -ipc.server.handler.queue.size = 3300 -dfs.datanode.handler.count = 60 -ipc.client.connection.maxidletime = 360 -dfs.namenode.accesstime.precision = -1 - - -content - - - http://git-wip-us.apache.org/repos/asf/ambari/blob/529c588a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-check-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-check-env.xml b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-check-env.xml new file mode 100755 index 000..185d175 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/configuration/hawq-check-env.xml @@ -0,0 +1,89
[16/33] ambari git commit: AMBARI-15070. Graph scale behaviour is incorrect if time range is switched before graph data API call is complete (alexantonenko)
AMBARI-15070. Graph scale behaviour is incorrect if time range is switched before graph data API call is complete (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a91890a8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a91890a8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a91890a8 Branch: refs/heads/branch-dev-patch-upgrade Commit: a91890a819e77638d5cb371e49a9a5d0fdebf4d1 Parents: 506bb8d Author: Alex AntonenkoAuthored: Wed Feb 17 15:20:14 2016 +0200 Committer: Alex Antonenko Committed: Wed Feb 17 17:46:45 2016 +0200 -- .../app/mixins/common/widgets/widget_mixin.js | 62 +++ ambari-web/app/utils/ajax/ajax.js | 12 +++ .../app/views/common/chart/linear_time.js | 84 +++- .../main/admin/stack_upgrade/versions_view.js | 6 +- .../test/mixins/common/widget_mixin_test.js | 18 - ambari-web/test/utils/ajax/ajax_test.js | 32 .../test/views/common/chart/linear_time_test.js | 10 ++- 7 files changed, 179 insertions(+), 45 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a91890a8/ambari-web/app/mixins/common/widgets/widget_mixin.js -- diff --git a/ambari-web/app/mixins/common/widgets/widget_mixin.js b/ambari-web/app/mixins/common/widgets/widget_mixin.js index 6d65c33..13e55f2 100644 --- a/ambari-web/app/mixins/common/widgets/widget_mixin.js +++ b/ambari-web/app/mixins/common/widgets/widget_mixin.js @@ -120,9 +120,18 @@ App.WidgetMixin = Ember.Mixin.create({ startCallName: 'getHostComponentMetrics', successCallback: this.getHostComponentMetricsSuccessCallback, errorCallback: this.getMetricsErrorCallback, - completeCallback: function () { + completeCallback: function (xhr) { requestCounter--; if (requestCounter === 0) this.onMetricsLoaded(); +if (this.get('graphView')) { + var graph = this.get('childViews') && this.get('childViews').findProperty('runningRequests'); + if (graph) { +var requestsArrayName = graph.get('isPopup') ? 'runningPopupRequests' : 'runningRequests'; +graph.set(requestsArrayName, graph.get(requestsArrayName).reject(function (item) { + return item === xhr; +})); + } +} } }); } else { @@ -132,9 +141,18 @@ App.WidgetMixin = Ember.Mixin.create({ startCallName: 'getServiceComponentMetrics', successCallback: this.getMetricsSuccessCallback, errorCallback: this.getMetricsErrorCallback, - completeCallback: function () { + completeCallback: function (xhr) { requestCounter--; if (requestCounter === 0) this.onMetricsLoaded(); +if (this.get('graphView')) { + var graph = this.get('childViews') && this.get('childViews').findProperty('runningRequests'); + if (graph) { +var requestsArrayName = graph.get('isPopup') ? 'runningPopupRequests' : 'runningRequests'; +graph.set(requestsArrayName, graph.get(requestsArrayName).reject(function (item) { + return item === xhr; +})); + } +} } }); } @@ -192,7 +210,7 @@ App.WidgetMixin = Ember.Mixin.create({ * @returns {$.ajax} */ getServiceComponentMetrics: function (request) { -return App.ajax.send({ +var xhr = App.ajax.send({ name: 'widgets.serviceComponent.metrics.get', sender: this, data: { @@ -201,6 +219,14 @@ App.WidgetMixin = Ember.Mixin.create({ metricPaths: this.prepareMetricPaths(request.metric_paths) } }); +if (this.get('graphView')) { + var graph = this.get('childViews') && this.get('childViews').findProperty('runningRequests'); + if (graph) { +var requestsArrayName = graph.get('isPopup') ? 'runningPopupRequests' : 'runningRequests'; +graph.get(requestsArrayName).push(xhr); + } +} +return xhr; }, /** @@ -230,15 +256,21 @@ App.WidgetMixin = Ember.Mixin.create({ var metricPaths = this.prepareMetricPaths(request.metric_paths); if (metricPaths.length) { - return App.ajax.send({ -name: 'widgets.hostComponent.metrics.get', -sender: this, -data: { - componentName: request.component_name, - metricPaths: this.prepareMetricPaths(request.metric_paths), - hostComponentCriteria: this.computeHostComponentCriteria(request) -} - }); + var xhr = App.ajax.send({ +
[2/2] ambari git commit: AMBARI-15079. Preupload.py should pre-create hdfs directories (aonishuk)
AMBARI-15079. Preupload.py should pre-create hdfs directories (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ad5ecf82 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ad5ecf82 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ad5ecf82 Branch: refs/heads/branch-2.2 Commit: ad5ecf826ab80a26f47d1637575c32d62bcc156c Parents: 878ae15 Author: Andrew OnishukAuthored: Thu Feb 18 13:56:22 2016 +0200 Committer: Andrew Onishuk Committed: Thu Feb 18 13:57:14 2016 +0200 -- .../libraries/providers/hdfs_resource.py| 64 +--- .../libraries/resources/hdfs_resource.py| 12 .../1.6.1.2.2.0/package/scripts/params.py | 1 + .../0.1.0/package/scripts/params.py | 1 + .../0.5.0.2.1/package/scripts/params_linux.py | 1 + .../0.96.0.2.0/package/scripts/params_linux.py | 1 + .../2.1.0.2.0/package/scripts/params_linux.py | 1 + .../0.12.0.2.0/package/scripts/params_linux.py | 1 + .../KAFKA/0.8.1.2.2/package/scripts/params.py | 1 + .../0.5.0.2.2/package/scripts/params_linux.py | 1 + .../MAHOUT/1.0.0.2.3/package/scripts/params.py | 1 + .../4.0.0.2.0/package/scripts/params_linux.py | 1 + .../0.12.0.2.0/package/scripts/params_linux.py | 1 + .../0.60.0.2.2/package/scripts/params_linux.py | 1 + .../SPARK/1.2.0.2.2/package/scripts/params.py | 1 + .../0.9.1.2.1/package/scripts/params_linux.py | 1 + .../0.4.0.2.1/package/scripts/params_linux.py | 1 + .../2.1.0.2.0/package/scripts/params_linux.py | 1 + .../main/resources/scripts/Ambaripreupload.py | 54 ++--- .../AMBARI_METRICS/test_metrics_collector.py| 6 +- .../stacks/2.0.6/HBASE/test_hbase_master.py | 18 +++--- .../python/stacks/2.0.6/HDFS/test_namenode.py | 54 - .../stacks/2.0.6/HDFS/test_service_check.py | 8 +-- .../stacks/2.0.6/HIVE/test_hive_server.py | 28 - .../2.0.6/HIVE/test_hive_service_check.py | 12 ++-- .../stacks/2.0.6/OOZIE/test_oozie_server.py | 32 +- .../stacks/2.0.6/OOZIE/test_service_check.py| 10 +-- .../stacks/2.0.6/PIG/test_pig_service_check.py | 12 ++-- .../stacks/2.0.6/YARN/test_historyserver.py | 32 +- .../2.0.6/YARN/test_mapreduce2_service_check.py | 12 ++-- .../stacks/2.1/FALCON/test_falcon_server.py | 12 ++-- .../python/stacks/2.1/TEZ/test_service_check.py | 16 ++--- .../stacks/2.1/YARN/test_apptimelineserver.py | 2 +- .../stacks/2.2/PIG/test_pig_service_check.py| 12 ++-- .../stacks/2.2/SPARK/test_job_history_server.py | 12 ++-- .../2.3/MAHOUT/test_mahout_service_check.py | 8 +-- .../2.3/SPARK/test_spark_thrift_server.py | 4 +- .../test/python/stacks/2.3/YARN/test_ats_1_5.py | 10 +-- 38 files changed, 267 insertions(+), 179 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ad5ecf82/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py b/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py index b6edf1a..de0a0ad 100644 --- a/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py +++ b/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py @@ -150,32 +150,13 @@ class WebHDFSUtil: # only hdfs seems to support webHDFS return (is_webhdfs_enabled and default_fs.startswith("hdfs")) - def parse_path(self, path): -""" -hdfs://nn_url:1234/a/b/c -> /a/b/c -hdfs://nn_ha_name/a/b/c -> /a/b/c -hdfs:///a/b/c -> /a/b/c -/a/b/c -> /a/b/c -""" -math_with_protocol_and_nn_url = re.match("[a-zA-Z]+://[^/]+(/.+)", path) -math_with_protocol = re.match("[a-zA-Z]+://(/.+)", path) - -if math_with_protocol_and_nn_url: - path = math_with_protocol_and_nn_url.group(1) -elif math_with_protocol: - path = math_with_protocol.group(1) -else: - path = path - -return re.sub("[/]+", "/", path) - valid_status_codes = ["200", "201"] def run_command(self, target, operation, method='POST', assertable_result=True, file_to_put=None, ignore_status_codes=[], **kwargs): """ assertable_result - some POST requests return '{"boolean":false}' or '{"boolean":true}' depending on if query was successful or not, we can assert this for them """ -target = self.parse_path(target) +target = HdfsResourceProvider.parse_path(target) url = format("{address}/webhdfs/v1{target}?op={operation}={run_user}", address=self.address,
[1/2] ambari git commit: AMBARI-15079. Preupload.py should pre-create hdfs directories (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.2 878ae1599 -> ad5ecf826 http://git-wip-us.apache.org/repos/asf/ambari/blob/ad5ecf82/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py index ff83149..3ff4d73 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py +++ b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py @@ -59,7 +59,7 @@ class TestHistoryServer(RMFTestCase): self.assertResourceCalled("HdfsResource", "/apps/tez/", type="directory", - action=["create_on_execute"], + action=["create_on_execute"], hdfs_resource_ignore_file='/var/lib/ambari-agent/data/.hdfs_resource_ignore', user=u"hdfs", owner=u"tez", mode=493, @@ -75,7 +75,7 @@ class TestHistoryServer(RMFTestCase): self.assertResourceCalled("HdfsResource", "/apps/tez/lib/", type="directory", - action=["create_on_execute"], + action=["create_on_execute"], hdfs_resource_ignore_file='/var/lib/ambari-agent/data/.hdfs_resource_ignore', user=u'hdfs', owner=u"tez", mode=493, @@ -90,7 +90,7 @@ class TestHistoryServer(RMFTestCase): ) self.assertResourceCalled("HdfsResource", None, - action=['execute'], + action=['execute'], hdfs_resource_ignore_file='/var/lib/ambari-agent/data/.hdfs_resource_ignore', user=u'hdfs', hadoop_bin_dir="/usr/bin", hadoop_conf_dir="/etc/hadoop/conf", @@ -201,7 +201,7 @@ class TestHistoryServer(RMFTestCase): group = 'hadoop', hadoop_bin_dir = '/usr/bin', type = 'directory', -action = ['create_on_execute'], hdfs_site=self.getConfig()['configurations']['hdfs-site'], principal_name=UnknownConfigurationMock(), default_fs='hdfs://c6401.ambari.apache.org:8020', +action = ['create_on_execute'], hdfs_resource_ignore_file='/var/lib/ambari-agent/data/.hdfs_resource_ignore', hdfs_site=self.getConfig()['configurations']['hdfs-site'], principal_name=UnknownConfigurationMock(), default_fs='hdfs://c6401.ambari.apache.org:8020', mode = 0777, ) self.assertResourceCalled('HdfsResource', '/tmp/entity-file-history/active', @@ -217,7 +217,7 @@ class TestHistoryServer(RMFTestCase): group = 'hadoop', hadoop_conf_dir = '/etc/hadoop/conf', type = 'directory', -action = ['create_on_execute'], +action = ['create_on_execute'], hdfs_resource_ignore_file='/var/lib/ambari-agent/data/.hdfs_resource_ignore', ) self.assertResourceCalled('HdfsResource', '/mapred', security_enabled = False, @@ -228,7 +228,7 @@ class TestHistoryServer(RMFTestCase): owner = 'mapred', hadoop_conf_dir = '/etc/hadoop/conf', type = 'directory', -action = ['create_on_execute'], hdfs_site=self.getConfig()['configurations']['hdfs-site'], principal_name=UnknownConfigurationMock(), default_fs='hdfs://c6401.ambari.apache.org:8020', +action = ['create_on_execute'], hdfs_resource_ignore_file='/var/lib/ambari-agent/data/.hdfs_resource_ignore', hdfs_site=self.getConfig()['configurations']['hdfs-site'], principal_name=UnknownConfigurationMock(), default_fs='hdfs://c6401.ambari.apache.org:8020', ) self.assertResourceCalled('HdfsResource', '/mapred/system', security_enabled = False, @@ -239,7 +239,7 @@ class TestHistoryServer(RMFTestCase): owner = 'hdfs', hadoop_conf_dir = '/etc/hadoop/conf', type = 'directory', -action = ['create_on_execute'], hdfs_site=self.getConfig()['configurations']['hdfs-site'], principal_name=UnknownConfigurationMock(), default_fs='hdfs://c6401.ambari.apache.org:8020', +action = ['create_on_execute'], hdfs_resource_ignore_file='/var/lib/ambari-agent/data/.hdfs_resource_ignore', hdfs_site=self.getConfig()['configurations']['hdfs-site'], principal_name=UnknownConfigurationMock(), default_fs='hdfs://c6401.ambari.apache.org:8020', ) self.assertResourceCalled('HdfsResource', '/mr-history/done', security_enabled = False, @@ -252,7 +252,7 @@ class TestHistoryServer(RMFTestCase): group = 'hadoop', hadoop_bin_dir = '/usr/bin', type = 'directory', -action = ['create_on_execute'], hdfs_site=self.getConfig()['configurations']['hdfs-site'],
ambari git commit: AMBARI-15085. Enhanced graph widgets aren't updated after getting no data (alexantonenko)
Repository: ambari Updated Branches: refs/heads/branch-2.2 4923ff0a7 -> 878ae1599 AMBARI-15085. Enhanced graph widgets aren't updated after getting no data (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/878ae159 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/878ae159 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/878ae159 Branch: refs/heads/branch-2.2 Commit: 878ae1599f8c58b98bcfb64a701a7e87d8f4ced0 Parents: 4923ff0 Author: Alex AntonenkoAuthored: Thu Feb 18 12:05:39 2016 +0200 Committer: Alex Antonenko Committed: Thu Feb 18 13:14:28 2016 +0200 -- .../app/mixins/common/widgets/widget_mixin.js | 8 +++-- .../test/mixins/common/widget_mixin_test.js | 35 +++- 2 files changed, 33 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/878ae159/ambari-web/app/mixins/common/widgets/widget_mixin.js -- diff --git a/ambari-web/app/mixins/common/widgets/widget_mixin.js b/ambari-web/app/mixins/common/widgets/widget_mixin.js index 863b510..3612ad6 100644 --- a/ambari-web/app/mixins/common/widgets/widget_mixin.js +++ b/ambari-web/app/mixins/common/widgets/widget_mixin.js @@ -320,7 +320,9 @@ App.WidgetMixin = Ember.Mixin.create({ graph.set('hasData', false); this.set('isExportButtonHidden', true); graph._showMessage('info', this.t('graphs.noData.title'), this.t('graphs.noDataAtTime.message')); -this.get('metrics').clear(); +this.set('metrics', this.get('metrics').reject(function (item) { + return this.get('content.metrics').someProperty('name', item.name); +}, this)); } } }, this); @@ -343,7 +345,9 @@ App.WidgetMixin = Ember.Mixin.create({ graph.set('hasData', false); this.set('isExportButtonHidden', true); graph._showMessage('warn', this.t('graphs.error.title'), this.t('graphs.error.message').format(textStatus, errorThrown)); -this.get('metrics').clear(); +this.set('metrics', this.get('metrics').reject(function (item) { + return this.get('content.metrics').someProperty('name', item.name); +}, this)); } } }, http://git-wip-us.apache.org/repos/asf/ambari/blob/878ae159/ambari-web/test/mixins/common/widget_mixin_test.js -- diff --git a/ambari-web/test/mixins/common/widget_mixin_test.js b/ambari-web/test/mixins/common/widget_mixin_test.js index ba549a0..57bd212 100644 --- a/ambari-web/test/mixins/common/widget_mixin_test.js +++ b/ambari-web/test/mixins/common/widget_mixin_test.js @@ -391,11 +391,19 @@ describe('App.WidgetMixin', function () { view = Em.Object.create({ _showMessage: Em.K }), + metrics = [ +{ + name: 'n0' +}, +{ + name: 'n1' +} + ], cases = [ { graphView: null, isForcedAbort: false, - metricsLength: 1, + metrics: metrics, showMessageCallCount: 0, isExportButtonHidden: false, title: 'no graph view' @@ -403,7 +411,7 @@ describe('App.WidgetMixin', function () { { graphView: {}, isForcedAbort: false, - metricsLength: 1, + metrics: metrics, showMessageCallCount: 0, isExportButtonHidden: false, title: 'no childViews property' @@ -412,7 +420,7 @@ describe('App.WidgetMixin', function () { graphView: {}, childViews: [], isForcedAbort: false, - metricsLength: 1, + metrics: metrics, showMessageCallCount: 0, isExportButtonHidden: false, title: 'no child views' @@ -421,7 +429,7 @@ describe('App.WidgetMixin', function () { graphView: {}, childViews: [Em.Object.create({})], isForcedAbort: false, - metricsLength: 1, + metrics: metrics, showMessageCallCount: 0, isExportButtonHidden: false, title: 'no view with _showMessage method' @@ -430,7 +438,11 @@ describe('App.WidgetMixin', function () { graphView: {}, childViews: [Em.Object.create({}), view], isForcedAbort: false, - metricsLength: 0, + metrics: [ +{ + name: 'n1' +} + ], showMessageCallCount: 1, isExportButtonHidden: true, title: 'graph view is available' @@ -439,7 +451,7 @@ describe('App.WidgetMixin', function () { graphView: {},
ambari git commit: AMBARI-15085. Enhanced graph widgets aren't updated after getting no data (alexantonenko)
Repository: ambari Updated Branches: refs/heads/trunk 1bd4c2329 -> f92714910 AMBARI-15085. Enhanced graph widgets aren't updated after getting no data (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f9271491 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f9271491 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f9271491 Branch: refs/heads/trunk Commit: f92714910c74336a6e797056173dc287185f5ed1 Parents: 1bd4c23 Author: Alex AntonenkoAuthored: Thu Feb 18 12:03:54 2016 +0200 Committer: Alex Antonenko Committed: Thu Feb 18 13:14:49 2016 +0200 -- .../app/mixins/common/widgets/widget_mixin.js | 8 +++-- .../test/mixins/common/widget_mixin_test.js | 35 +++- 2 files changed, 33 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f9271491/ambari-web/app/mixins/common/widgets/widget_mixin.js -- diff --git a/ambari-web/app/mixins/common/widgets/widget_mixin.js b/ambari-web/app/mixins/common/widgets/widget_mixin.js index 13e55f2..4d777e4 100644 --- a/ambari-web/app/mixins/common/widgets/widget_mixin.js +++ b/ambari-web/app/mixins/common/widgets/widget_mixin.js @@ -318,7 +318,9 @@ App.WidgetMixin = Ember.Mixin.create({ graph.set('hasData', false); this.set('isExportButtonHidden', true); graph._showMessage('info', this.t('graphs.noData.title'), this.t('graphs.noDataAtTime.message')); -this.get('metrics').clear(); +this.set('metrics', this.get('metrics').reject(function (item) { + return this.get('content.metrics').someProperty('name', item.name); +}, this)); } } }, this); @@ -341,7 +343,9 @@ App.WidgetMixin = Ember.Mixin.create({ graph.set('hasData', false); this.set('isExportButtonHidden', true); graph._showMessage('warn', this.t('graphs.error.title'), this.t('graphs.error.message').format(textStatus, errorThrown)); -this.get('metrics').clear(); +this.set('metrics', this.get('metrics').reject(function (item) { + return this.get('content.metrics').someProperty('name', item.name); +}, this)); } } }, http://git-wip-us.apache.org/repos/asf/ambari/blob/f9271491/ambari-web/test/mixins/common/widget_mixin_test.js -- diff --git a/ambari-web/test/mixins/common/widget_mixin_test.js b/ambari-web/test/mixins/common/widget_mixin_test.js index c70150d..662f8b8 100644 --- a/ambari-web/test/mixins/common/widget_mixin_test.js +++ b/ambari-web/test/mixins/common/widget_mixin_test.js @@ -391,11 +391,19 @@ describe('App.WidgetMixin', function () { view = Em.Object.create({ _showMessage: Em.K }), + metrics = [ +{ + name: 'n0' +}, +{ + name: 'n1' +} + ], cases = [ { graphView: null, isForcedAbort: false, - metricsLength: 1, + metrics: metrics, showMessageCallCount: 0, isExportButtonHidden: false, title: 'no graph view' @@ -403,7 +411,7 @@ describe('App.WidgetMixin', function () { { graphView: {}, isForcedAbort: false, - metricsLength: 1, + metrics: metrics, showMessageCallCount: 0, isExportButtonHidden: false, title: 'no childViews property' @@ -412,7 +420,7 @@ describe('App.WidgetMixin', function () { graphView: {}, childViews: [], isForcedAbort: false, - metricsLength: 1, + metrics: metrics, showMessageCallCount: 0, isExportButtonHidden: false, title: 'no child views' @@ -421,7 +429,7 @@ describe('App.WidgetMixin', function () { graphView: {}, childViews: [Em.Object.create({})], isForcedAbort: false, - metricsLength: 1, + metrics: metrics, showMessageCallCount: 0, isExportButtonHidden: false, title: 'no view with _showMessage method' @@ -430,7 +438,11 @@ describe('App.WidgetMixin', function () { graphView: {}, childViews: [Em.Object.create({}), view], isForcedAbort: false, - metricsLength: 0, + metrics: [ +{ + name: 'n1' +} + ], showMessageCallCount: 1, isExportButtonHidden: true, title: 'graph view is available' @@ -439,7 +451,7 @@ describe('App.WidgetMixin', function () { graphView: {}, childViews:
ambari git commit: AMBARI-15084 Cover service's views with unit tests. (atkach)
Repository: ambari Updated Branches: refs/heads/trunk 84ca6a88d -> 1bd4c2329 AMBARI-15084 Cover service's views with unit tests. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1bd4c232 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1bd4c232 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1bd4c232 Branch: refs/heads/trunk Commit: 1bd4c2329192157f0977bb7e1941485202b04837 Parents: 84ca6a8 Author: Andrii TkachAuthored: Thu Feb 18 09:51:59 2016 +0200 Committer: Andrii Tkach Committed: Thu Feb 18 09:51:59 2016 +0200 -- ambari-web/app/assets/test/tests.js | 2 + ambari-web/app/models/service.js| 2 +- .../app/views/common/chart/linear_time.js | 4 + ambari-web/app/views/main/service/info/menu.js | 45 +- .../app/views/main/service/info/summary.js | 154 ++-- .../service/reassign/step4_controller_test.js | 5 +- .../test/views/common/chart/linear_time_test.js | 3 +- .../stack_upgrade/upgrade_wizard_view_test.js | 5 - .../service/info/component_list_view_test.js| 153 .../test/views/main/service/info/config_test.js | 99 ++- .../test/views/main/service/info/menu_test.js | 93 ++ .../views/main/service/info/summary_test.js | 852 +-- 12 files changed, 1040 insertions(+), 377 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1bd4c232/ambari-web/app/assets/test/tests.js -- diff --git a/ambari-web/app/assets/test/tests.js b/ambari-web/app/assets/test/tests.js index 0695d06..06c4c31 100644 --- a/ambari-web/app/assets/test/tests.js +++ b/ambari-web/app/assets/test/tests.js @@ -270,6 +270,8 @@ var files = [ 'test/views/main/service/item_test', 'test/views/main/service/info/config_test', 'test/views/main/service/info/summary_test', + 'test/views/main/service/info/menu_test', + 'test/views/main/service/info/component_list_view_test', 'test/views/main/service/info/metrics/ambari_metrics/regionserver_base_test', 'test/views/main/service/info/metrics/flume/flume_agent_metrics_section_test', 'test/views/main/service/services/ranger_test', http://git-wip-us.apache.org/repos/asf/ambari/blob/1bd4c232/ambari-web/app/models/service.js -- diff --git a/ambari-web/app/models/service.js b/ambari-web/app/models/service.js index 39a6b1c..c1ed776 100644 --- a/ambari-web/app/models/service.js +++ b/ambari-web/app/models/service.js @@ -229,7 +229,7 @@ App.Service.Health = { * association between service and extended model name * @type {Object} */ - App.Service.extendedModel = { +App.Service.extendedModel = { 'HDFS': 'HDFSService', 'HBASE': 'HBaseService', 'YARN': 'YARNService', http://git-wip-us.apache.org/repos/asf/ambari/blob/1bd4c232/ambari-web/app/views/common/chart/linear_time.js -- diff --git a/ambari-web/app/views/common/chart/linear_time.js b/ambari-web/app/views/common/chart/linear_time.js index 064bec3..864203d 100644 --- a/ambari-web/app/views/common/chart/linear_time.js +++ b/ambari-web/app/views/common/chart/linear_time.js @@ -199,6 +199,10 @@ App.ChartLinearTimeView = Ember.View.extend(App.ExportMetricsMixin, { }); }, + setCurrentTimeIndex: function () { +this.set('currentTimeIndex', this.get('parentView.currentTimeRangeIndex')); + }.observes('parentView.currentTimeRangeIndex'), + /** * Maps server data into series format ready for export to graph and JSON formats * @param jsonData http://git-wip-us.apache.org/repos/asf/ambari/blob/1bd4c232/ambari-web/app/views/main/service/info/menu.js -- diff --git a/ambari-web/app/views/main/service/info/menu.js b/ambari-web/app/views/main/service/info/menu.js index 3de23fd..3533a72 100644 --- a/ambari-web/app/views/main/service/info/menu.js +++ b/ambari-web/app/views/main/service/info/menu.js @@ -21,29 +21,46 @@ var App = require('app'); App.MainServiceInfoMenuView = Em.CollectionView.extend({ tagName: 'ul', classNames: ["nav", "nav-tabs", "background-text"], - content:function(){ + content: function () { var menuItems = [ - { label: Em.I18n.t('services.service.info.menu.summary'), id: 'summary-service-tab',routing:'summary', active:"active"} - //{ label:'Audit', routing:'audit'} + { +label: Em.I18n.t('services.service.info.menu.summary'), +id: 'summary-service-tab', +routing: 'summary', +active: "active" + } ]; -if(this.get('heatmapTab')) menuItems.push({ label: