git commit: AMBARI-7646 Zookeeper server stops after starting on HDP 2.2 (dsen)
Repository: ambari Updated Branches: refs/heads/trunk 26c4cc800 - 7f0ea265c AMBARI-7646 Zookeeper server stops after starting on HDP 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/7f0ea265 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7f0ea265 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7f0ea265 Branch: refs/heads/trunk Commit: 7f0ea265c877b665e4744272fc4bd2c72e698bcb Parents: 26c4cc8 Author: Dmytro Sen d...@hortonworks.com Authored: Mon Oct 6 14:52:19 2014 +0300 Committer: Dmytro Sen d...@hortonworks.com Committed: Mon Oct 6 14:52:30 2014 +0300 -- .../HDP/2.0.6/services/ZOOKEEPER/configuration/zookeeper-env.xml | 1 + .../stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/params.py | 2 ++ 2 files changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7f0ea265/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/configuration/zookeeper-env.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/configuration/zookeeper-env.xml b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/configuration/zookeeper-env.xml index b0d55e6..4c305b0 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/configuration/zookeeper-env.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/configuration/zookeeper-env.xml @@ -69,6 +69,7 @@ descriptionThis is the jinja template for zookeeper-env.sh file/description value export JAVA_HOME={{java64_home}} +export ZOOKEEPER_HOME={{zk_home}} export ZOO_LOG_DIR={{zk_log_dir}} export ZOOPIDFILE={{zk_pid_file}} export SERVER_JVMFLAGS={{zk_server_heapsize}} http://git-wip-us.apache.org/repos/asf/ambari/blob/7f0ea265/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/params.py index 89d1089..9e09d5f 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/params.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/params.py @@ -31,9 +31,11 @@ rpm_version = default(/configurations/cluster-env/rpm_version, None) #hadoop params if rpm_version: + zk_home = '/usr/hdp/current/zookeeper' zk_bin = '/usr/hdp/current/zookeeper/bin' smoke_script = '/usr/hdp/current/zookeeper/bin/zkCli.sh' else: + zk_home = '/usr' zk_bin = '/usr/lib/zookeeper/bin' smoke_script = /usr/lib/zookeeper/bin/zkCli.sh
git commit: AMBARI-7647 Oozie and Falcon service checks fail on HDP2.2 (dsen)
Repository: ambari Updated Branches: refs/heads/trunk 7f0ea265c - bb1b5135b AMBARI-7647 Oozie and Falcon service checks fail on HDP2.2 (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bb1b5135 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bb1b5135 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bb1b5135 Branch: refs/heads/trunk Commit: bb1b5135bd6ec9f872232a1000d7b683f57b6bff Parents: 7f0ea26 Author: Dmytro Sen d...@hortonworks.com Authored: Mon Oct 6 15:26:20 2014 +0300 Committer: Dmytro Sen d...@hortonworks.com Committed: Mon Oct 6 15:26:20 2014 +0300 -- .../services/OOZIE/package/scripts/oozie.py | 2 +- .../services/OOZIE/package/scripts/params.py| 2 - .../services/OOZIE/configuration/oozie-site.xml | 75 .../stacks/2.0.6/OOZIE/test_oozie_server.py | 10 +++ 4 files changed, 86 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/bb1b5135/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py index 608b9b1..bba2e09 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py @@ -121,7 +121,7 @@ def oozie_server_specific( not_if=ls {pid_file} /dev/null 21 !(ps `cat {pid_file}` /dev/null 21) ) - oozie_server_directorties = [params.oozie_pid_dir, params.oozie_log_dir, params.oozie_tmp_dir, params.oozie_data_dir, params.oozie_lib_dir, params.oozie_webapps_dir, params.oozie_webapps_conf_dir] + oozie_server_directorties = [params.oozie_pid_dir, params.oozie_log_dir, params.oozie_tmp_dir, params.oozie_data_dir, params.oozie_lib_dir, params.oozie_webapps_dir, params.oozie_webapps_conf_dir, params.oozie_server_dir] Directory( oozie_server_directorties, owner = params.oozie_user, mode = 0755, http://git-wip-us.apache.org/repos/asf/ambari/blob/bb1b5135/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py index aeccc75..17b26a0 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py @@ -33,7 +33,6 @@ rpm_version = default(/configurations/cluster-env/rpm_version, None) if rpm_version: hadoop_bin_dir = /usr/hdp/current/hadoop/bin hadoop_lib_home = /usr/hdp/current/hadoop/lib - mapreduce_libs_path = /usr/hdp/current/hadoop-mapreduce/* oozie_lib_dir = /usr/hdp/current/oozie/ oozie_setup_sh = /usr/hdp/current/oozie/bin/oozie-setup.sh oozie_webapps_dir = /usr/hdp/current/oozie/oozie-server/webapps @@ -47,7 +46,6 @@ if rpm_version: else: hadoop_bin_dir = /usr/bin hadoop_lib_home = /usr/lib/hadoop/lib - mapreduce_libs_path = /usr/lib/hadoop-mapreduce/* oozie_lib_dir = /var/lib/oozie/ oozie_setup_sh = /usr/lib/oozie/bin/oozie-setup.sh oozie_webapps_dir = /var/lib/oozie/oozie-server/webapps/ http://git-wip-us.apache.org/repos/asf/ambari/blob/bb1b5135/ambari-server/src/main/resources/stacks/HDP/2.2/services/OOZIE/configuration/oozie-site.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/OOZIE/configuration/oozie-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/OOZIE/configuration/oozie-site.xml index dc56d8b..4a8eab7 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/OOZIE/configuration/oozie-site.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/OOZIE/configuration/oozie-site.xml @@ -28,5 +28,80 @@ additional system stress. /description /property + property +nameoozie.services/name +value + org.apache.oozie.service.SchedulerService, + org.apache.oozie.service.InstrumentationService, + org.apache.oozie.service.MemoryLocksService, + org.apache.oozie.service.UUIDService, + org.apache.oozie.service.ELService, + org.apache.oozie.service.AuthorizationService, + org.apache.oozie.service.UserGroupInformationService, +
git commit: AMBARI-7647 Oozie and Falcon service checks fail on HDP2.2 (dsen)
Repository: ambari Updated Branches: refs/heads/branch-1.7.0 4b0ff9301 - fcc05a874 AMBARI-7647 Oozie and Falcon service checks fail on HDP2.2 (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fcc05a87 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fcc05a87 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fcc05a87 Branch: refs/heads/branch-1.7.0 Commit: fcc05a874d5b820ce8ffecc2e3a5d4d133f4b8fd Parents: 4b0ff93 Author: Dmytro Sen d...@hortonworks.com Authored: Mon Oct 6 16:44:14 2014 +0300 Committer: Dmytro Sen d...@hortonworks.com Committed: Mon Oct 6 16:44:14 2014 +0300 -- .../services/OOZIE/package/scripts/oozie.py | 2 +- .../services/OOZIE/package/scripts/params.py| 2 - .../services/OOZIE/configuration/oozie-site.xml | 75 .../stacks/2.0.6/OOZIE/test_oozie_server.py | 10 +++ 4 files changed, 86 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/fcc05a87/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py index 608b9b1..bba2e09 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py @@ -121,7 +121,7 @@ def oozie_server_specific( not_if=ls {pid_file} /dev/null 21 !(ps `cat {pid_file}` /dev/null 21) ) - oozie_server_directorties = [params.oozie_pid_dir, params.oozie_log_dir, params.oozie_tmp_dir, params.oozie_data_dir, params.oozie_lib_dir, params.oozie_webapps_dir, params.oozie_webapps_conf_dir] + oozie_server_directorties = [params.oozie_pid_dir, params.oozie_log_dir, params.oozie_tmp_dir, params.oozie_data_dir, params.oozie_lib_dir, params.oozie_webapps_dir, params.oozie_webapps_conf_dir, params.oozie_server_dir] Directory( oozie_server_directorties, owner = params.oozie_user, mode = 0755, http://git-wip-us.apache.org/repos/asf/ambari/blob/fcc05a87/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py index aeccc75..17b26a0 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py @@ -33,7 +33,6 @@ rpm_version = default(/configurations/cluster-env/rpm_version, None) if rpm_version: hadoop_bin_dir = /usr/hdp/current/hadoop/bin hadoop_lib_home = /usr/hdp/current/hadoop/lib - mapreduce_libs_path = /usr/hdp/current/hadoop-mapreduce/* oozie_lib_dir = /usr/hdp/current/oozie/ oozie_setup_sh = /usr/hdp/current/oozie/bin/oozie-setup.sh oozie_webapps_dir = /usr/hdp/current/oozie/oozie-server/webapps @@ -47,7 +46,6 @@ if rpm_version: else: hadoop_bin_dir = /usr/bin hadoop_lib_home = /usr/lib/hadoop/lib - mapreduce_libs_path = /usr/lib/hadoop-mapreduce/* oozie_lib_dir = /var/lib/oozie/ oozie_setup_sh = /usr/lib/oozie/bin/oozie-setup.sh oozie_webapps_dir = /var/lib/oozie/oozie-server/webapps/ http://git-wip-us.apache.org/repos/asf/ambari/blob/fcc05a87/ambari-server/src/main/resources/stacks/HDP/2.2/services/OOZIE/configuration/oozie-site.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/OOZIE/configuration/oozie-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/OOZIE/configuration/oozie-site.xml index dc56d8b..4a8eab7 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/OOZIE/configuration/oozie-site.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/OOZIE/configuration/oozie-site.xml @@ -28,5 +28,80 @@ additional system stress. /description /property + property +nameoozie.services/name +value + org.apache.oozie.service.SchedulerService, + org.apache.oozie.service.InstrumentationService, + org.apache.oozie.service.MemoryLocksService, + org.apache.oozie.service.UUIDService, + org.apache.oozie.service.ELService, + org.apache.oozie.service.AuthorizationService, + org.apache.oozie.service.UserGroupInformationService, +
git commit: AMBARI-7646 Zookeeper server stops after starting on HDP 2.2 (dsen)
Repository: ambari Updated Branches: refs/heads/branch-1.7.0 fcc05a874 - 06ebeadff AMBARI-7646 Zookeeper server stops after starting on HDP 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/06ebeadf Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/06ebeadf Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/06ebeadf Branch: refs/heads/branch-1.7.0 Commit: 06ebeadff3cd501ee8f812c06ff7d9489a43789b Parents: fcc05a8 Author: Dmytro Sen d...@hortonworks.com Authored: Mon Oct 6 16:45:05 2014 +0300 Committer: Dmytro Sen d...@hortonworks.com Committed: Mon Oct 6 16:45:05 2014 +0300 -- .../HDP/2.0.6/services/ZOOKEEPER/configuration/zookeeper-env.xml | 1 + .../stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/params.py | 2 ++ 2 files changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/06ebeadf/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/configuration/zookeeper-env.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/configuration/zookeeper-env.xml b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/configuration/zookeeper-env.xml index b0d55e6..4c305b0 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/configuration/zookeeper-env.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/configuration/zookeeper-env.xml @@ -69,6 +69,7 @@ descriptionThis is the jinja template for zookeeper-env.sh file/description value export JAVA_HOME={{java64_home}} +export ZOOKEEPER_HOME={{zk_home}} export ZOO_LOG_DIR={{zk_log_dir}} export ZOOPIDFILE={{zk_pid_file}} export SERVER_JVMFLAGS={{zk_server_heapsize}} http://git-wip-us.apache.org/repos/asf/ambari/blob/06ebeadf/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/params.py index 89d1089..9e09d5f 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/params.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/params.py @@ -31,9 +31,11 @@ rpm_version = default(/configurations/cluster-env/rpm_version, None) #hadoop params if rpm_version: + zk_home = '/usr/hdp/current/zookeeper' zk_bin = '/usr/hdp/current/zookeeper/bin' smoke_script = '/usr/hdp/current/zookeeper/bin/zkCli.sh' else: + zk_home = '/usr' zk_bin = '/usr/lib/zookeeper/bin' smoke_script = /usr/lib/zookeeper/bin/zkCli.sh
git commit: AMBARI-6527. Ambari support on CentOS7 /RHEL7 - I
Repository: ambari Updated Branches: refs/heads/trunk bb1b5135b - 5ce6ebfcb AMBARI-6527. Ambari support on CentOS7 /RHEL7 - I Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5ce6ebfc Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5ce6ebfc Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5ce6ebfc Branch: refs/heads/trunk Commit: 5ce6ebfcbd4b3ec6f1e0e342347d5a083300d40a Parents: bb1b513 Author: Subin subin@SuMcPro.local Authored: Mon Oct 6 20:24:48 2014 +0530 Committer: Subin subin@SuMcPro.local Committed: Mon Oct 6 20:29:26 2014 +0530 -- .../src/main/python/ambari_agent/Facter.py | 17 - .../src/main/python/ambari_commons/os_check.py | 17 + .../ambari/server/agent/HeartBeatHandler.java | 1 + .../ambari/server/api/services/AmbariMetaInfo.java | 2 +- .../src/main/python/ambari_server/utils.py | 4 +++- ambari-server/src/main/resources/os_family.json| 6 ++ 6 files changed, 40 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5ce6ebfc/ambari-agent/src/main/python/ambari_agent/Facter.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/Facter.py b/ambari-agent/src/main/python/ambari_agent/Facter.py index 0116675..947f380 100644 --- a/ambari-agent/src/main/python/ambari_agent/Facter.py +++ b/ambari-agent/src/main/python/ambari_agent/Facter.py @@ -189,8 +189,10 @@ class Facter(): # Return first ip adress def getIpAddress(self): -result = self.data_return_first((?: inet addr:)(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}), -self.DATA_IFCONFIG_OUTPUT) +ip_pattern=(?: inet addr:)(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}) +if OSCheck.is_redhat7(): + ip_pattern=(?: inet )(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}) +result = self.data_return_first(ip_pattern,self.DATA_IFCONFIG_OUTPUT) if result == '': log.warn(Can't get an ip address from {0}.format(self.DATA_IFCONFIG_OUTPUT)) return socket.gethostbyname(socket.gethostname()) @@ -199,8 +201,10 @@ class Facter(): # Return netmask def getNetmask(self): -result = self.data_return_first((?: Mask:)(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}), -self.DATA_IFCONFIG_OUTPUT) +mask_pattern=(?: Mask:)(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}) +if OSCheck.is_redhat7(): + mask_pattern=(?: netmask )(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}) +result = self.data_return_first(mask_pattern,self.DATA_IFCONFIG_OUTPUT) if result == '': log.warn(Can't get a netmask from {0}.format(self.DATA_IFCONFIG_OUTPUT)) return 'OS NOT SUPPORTED' @@ -209,7 +213,10 @@ class Facter(): # Return interfaces def getInterfaces(self): -result = self.data_return_list((\w+)(?:.*Link encap:), self.DATA_IFCONFIG_OUTPUT) +interface_pattern=(\w+)(?:.*Link encap:) +if OSCheck.is_redhat7(): + interface_pattern=(\w+)(?:.*flags=) +result = self.data_return_list(interface_pattern, self.DATA_IFCONFIG_OUTPUT) if result == '': log.warn(Can't get a network interfaces list from {0}.format(self.DATA_IFCONFIG_OUTPUT)) return 'OS NOT SUPPORTED' http://git-wip-us.apache.org/repos/asf/ambari/blob/5ce6ebfc/ambari-common/src/main/python/ambari_commons/os_check.py -- diff --git a/ambari-common/src/main/python/ambari_commons/os_check.py b/ambari-common/src/main/python/ambari_commons/os_check.py index 2bab473..dfbd9e2 100644 --- a/ambari-common/src/main/python/ambari_commons/os_check.py +++ b/ambari-common/src/main/python/ambari_commons/os_check.py @@ -28,6 +28,8 @@ def linux_distribution(): if PYTHON_VER 26: linux_distribution = platform.dist() + elif os.path.exists('/etc/redhat-release'): +linux_distribution = platform.dist() else: linux_distribution = platform.linux_distribution() @@ -212,3 +214,18 @@ class OSCheck: except Exception: pass return False + + @staticmethod + def is_redhat7(): + + Return true if it is so or false if not + + This is safe check for redhat7 , doesn't generate exception + +try: + ostemp=OSCheck.get_os_family()+OSCheck().get_os_major_version() + if ostemp == 'redhat7': +return True +except Exception: + pass +return False \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/5ce6ebfc/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java
git commit: AMBARI-7648 Supervisors link in the Storm service summary page does not do anything upon clicking. (ababiichuk)
Repository: ambari Updated Branches: refs/heads/branch-1.7.0 06ebeadff - 662df7f26 AMBARI-7648 Supervisors link in the Storm service summary page does not do anything upon clicking. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/662df7f2 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/662df7f2 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/662df7f2 Branch: refs/heads/branch-1.7.0 Commit: 662df7f26e5183d28c084c9c38f6c8f5aa2b28f4 Parents: 06ebead Author: aBabiichuk ababiic...@cybervisiontech.com Authored: Mon Oct 6 18:02:06 2014 +0300 Committer: aBabiichuk ababiic...@cybervisiontech.com Committed: Mon Oct 6 18:02:06 2014 +0300 -- ambari-web/app/templates/main/service/services/storm.hbs | 2 +- ambari-web/app/views/main/service/services/storm.js | 8 2 files changed, 9 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/662df7f2/ambari-web/app/templates/main/service/services/storm.hbs -- diff --git a/ambari-web/app/templates/main/service/services/storm.hbs b/ambari-web/app/templates/main/service/services/storm.hbs index 5382612..804adfd 100644 --- a/ambari-web/app/templates/main/service/services/storm.hbs +++ b/ambari-web/app/templates/main/service/services/storm.hbs @@ -19,7 +19,7 @@ {{view App.SummaryMasterComponentsView mastersCompBinding=view.parentView.mastersObj}} tr td -a href=# {{action filterHosts view.superVisorComponents.[0]}} +a href=# {{action filterHosts view.filterComponent}} {{t dashboard.services.storm.supervisors}} /a /td http://git-wip-us.apache.org/repos/asf/ambari/blob/662df7f2/ambari-web/app/views/main/service/services/storm.js -- diff --git a/ambari-web/app/views/main/service/services/storm.js b/ambari-web/app/views/main/service/services/storm.js index 406c46f..3546cd0 100644 --- a/ambari-web/app/views/main/service/services/storm.js +++ b/ambari-web/app/views/main/service/services/storm.js @@ -23,6 +23,14 @@ App.MainDashboardServiceStormView = App.MainDashboardServiceView.extend({ templateName: require('templates/main/service/services/storm'), serviceName: 'STORM', + /** + * this parameter is used to fiter hosts by component name + * used in mainHostController.filterByComponent() method + */ + filterComponent: function() { +return Em.Object.create({componentName: 'SUPERVISOR'}); + }.property(), + freeSlotsPercentage: function() { return Math.round(this.get('service.freeSlots')/this.get('service.totalSlots')*100); }.property('service.freeSlots', 'service.totalSlots'),
git commit: AMBARI-7648 Supervisors link in the Storm service summary page does not do anything upon clicking. (ababiichuk)
Repository: ambari Updated Branches: refs/heads/trunk 5ce6ebfcb - 76e3bb4ba AMBARI-7648 Supervisors link in the Storm service summary page does not do anything upon clicking. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/76e3bb4b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/76e3bb4b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/76e3bb4b Branch: refs/heads/trunk Commit: 76e3bb4ba1528173b6ed399fb2872c5a69c744f8 Parents: 5ce6ebf Author: aBabiichuk ababiic...@cybervisiontech.com Authored: Mon Oct 6 18:00:14 2014 +0300 Committer: aBabiichuk ababiic...@cybervisiontech.com Committed: Mon Oct 6 18:00:23 2014 +0300 -- ambari-web/app/templates/main/service/services/storm.hbs | 2 +- ambari-web/app/views/main/service/services/storm.js | 8 2 files changed, 9 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/76e3bb4b/ambari-web/app/templates/main/service/services/storm.hbs -- diff --git a/ambari-web/app/templates/main/service/services/storm.hbs b/ambari-web/app/templates/main/service/services/storm.hbs index 5382612..804adfd 100644 --- a/ambari-web/app/templates/main/service/services/storm.hbs +++ b/ambari-web/app/templates/main/service/services/storm.hbs @@ -19,7 +19,7 @@ {{view App.SummaryMasterComponentsView mastersCompBinding=view.parentView.mastersObj}} tr td -a href=# {{action filterHosts view.superVisorComponents.[0]}} +a href=# {{action filterHosts view.filterComponent}} {{t dashboard.services.storm.supervisors}} /a /td http://git-wip-us.apache.org/repos/asf/ambari/blob/76e3bb4b/ambari-web/app/views/main/service/services/storm.js -- diff --git a/ambari-web/app/views/main/service/services/storm.js b/ambari-web/app/views/main/service/services/storm.js index 406c46f..3546cd0 100644 --- a/ambari-web/app/views/main/service/services/storm.js +++ b/ambari-web/app/views/main/service/services/storm.js @@ -23,6 +23,14 @@ App.MainDashboardServiceStormView = App.MainDashboardServiceView.extend({ templateName: require('templates/main/service/services/storm'), serviceName: 'STORM', + /** + * this parameter is used to fiter hosts by component name + * used in mainHostController.filterByComponent() method + */ + filterComponent: function() { +return Em.Object.create({componentName: 'SUPERVISOR'}); + }.property(), + freeSlotsPercentage: function() { return Math.round(this.get('service.freeSlots')/this.get('service.totalSlots')*100); }.property('service.freeSlots', 'service.totalSlots'),
[2/2] git commit: Merge remote-tracking branch 'origin/branch-1.7.0' into branch-1.7.0
Merge remote-tracking branch 'origin/branch-1.7.0' into branch-1.7.0 Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bf9fb919 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bf9fb919 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bf9fb919 Branch: refs/heads/branch-1.7.0 Commit: bf9fb9192c8f5583889e7d908902b07a547021f8 Parents: c93e0b9 662df7f Author: Oleg Nechiporenko onechipore...@apache.org Authored: Mon Oct 6 18:06:28 2014 +0300 Committer: Oleg Nechiporenko onechipore...@apache.org Committed: Mon Oct 6 18:06:28 2014 +0300 -- ambari-web/app/templates/main/service/services/storm.hbs | 2 +- ambari-web/app/views/main/service/services/storm.js | 8 2 files changed, 9 insertions(+), 1 deletion(-) --
[1/2] git commit: AMBARI-7645. Slider View: App actions should be available in all states of an app. (onechiporenko)
Repository: ambari Updated Branches: refs/heads/branch-1.7.0 662df7f26 - bf9fb9192 AMBARI-7645. Slider View: App actions should be available in all states of an app. (onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c93e0b99 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c93e0b99 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c93e0b99 Branch: refs/heads/branch-1.7.0 Commit: c93e0b995c563394db58d2fdfd3a52a2b658474c Parents: 06ebead Author: Oleg Nechiporenko onechipore...@apache.org Authored: Mon Oct 6 18:06:07 2014 +0300 Committer: Oleg Nechiporenko onechipore...@apache.org Committed: Mon Oct 6 18:06:07 2014 +0300 -- .../ui/app/controllers/slider_app_controller.js | 89 .../main/resources/ui/app/models/slider_app.js | 33 .../ui/test/integration/pages/index_test.js | 13 ++- .../controllers/slider_app_controller_test.js | 64 ++ 4 files changed, 148 insertions(+), 51 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c93e0b99/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js -- diff --git a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js index 2754891..622c9f9 100644 --- a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js +++ b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js @@ -42,6 +42,49 @@ App.SliderAppController = Ember.ObjectController.extend(App.AjaxErrorHandler, { }.property('model.quickLinks.content.content.length'), /** + * List of all possible actions for slider app + * @type {Em.Object} + */ + appActions: Em.Object.create({ +stop: { + title: 'Stop', + action: 'freeze', + confirm: true +}, +flex: { + title: 'Flex', + action: 'flex', + confirm: false +}, +destroy: { + title: 'Destroy', + action: 'destroy', + customConfirm: 'confirmDestroy' +}, +start: { + title: 'Start', + action: 'thaw', + confirm: false +} + }), + + /** + * map of available action for slider app according to its status + * key - status, value - list of actions + * @type {Em.Object} + */ + statusActionsMap: Em.Object.create({ +NEW: ['stop'], +NEW_SAVING: ['stop'], +ACCEPTED: ['stop'], +RUNNING: ['stop', 'flex'], +FINISHED: ['start', 'destroy'], +FAILED: ['destroy'], +KILLED: ['destroy'], +FROZEN: ['start', 'destroy'] + }), + + /** * List of available for model actions * Based on codemodel.status/code * @type {Ember.Object[]} @@ -49,40 +92,19 @@ App.SliderAppController = Ember.ObjectController.extend(App.AjaxErrorHandler, { availableActions: function() { var actions = Em.A([]), advanced = Em.A([]), + appActions = this.get('appActions'), + statusActionsMap = this.get('statusActionsMap'), status = this.get('model.status'); -if ('RUNNING' === status) { - actions.pushObject({ -title: 'Stop', -action: 'freeze', -confirm: true - }); -} -if ('RUNNING' == status) { - actions.push({ -title: 'Flex', -action: 'flex', -confirm: false - }); -} -if ('FROZEN' === status) { - actions.pushObject({ -title: 'Start', -action: 'thaw', -confirm: false - }); - advanced.pushObject({ -title: 'Destroy', -action: 'destroy', -customConfirm: 'confirmDestroy' - }); -} -if ('FAILED' === status) { - advanced.pushObject({ -title: 'Destroy', -action: 'destroy', -customConfirm: 'confirmDestroy' - }); -} + +statusActionsMap[status].forEach(function(action) { + if ('destroy' === action) { +advanced.pushObject(appActions[action]); + } + else { +actions.pushObject(appActions[action]); + } +}); + if (advanced.length) { actions.pushObject({ title: 'Advanced', @@ -405,7 +427,6 @@ App.SliderAppController = Ember.ObjectController.extend(App.AjaxErrorHandler, { this.tryDoAction(); } } - return true; } } http://git-wip-us.apache.org/repos/asf/ambari/blob/c93e0b99/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js -- diff --git a/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js b/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js index
[2/7] git commit: AMBARI-7645. Slider View: App actions should be available in all states of an app. (onechiporenko)
AMBARI-7645. Slider View: App actions should be available in all states of an app. (onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/26c4cc80 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/26c4cc80 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/26c4cc80 Branch: refs/heads/branch-alerts-dev Commit: 26c4cc800dd87802e5758576629c1313bd11db3d Parents: 0e959b0 Author: Oleg Nechiporenko onechipore...@apache.org Authored: Mon Oct 6 13:51:00 2014 +0300 Committer: Oleg Nechiporenko onechipore...@apache.org Committed: Mon Oct 6 13:51:00 2014 +0300 -- .../ui/app/controllers/slider_app_controller.js | 89 .../main/resources/ui/app/models/slider_app.js | 33 .../ui/test/integration/pages/index_test.js | 13 ++- .../controllers/slider_app_controller_test.js | 64 ++ 4 files changed, 148 insertions(+), 51 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/26c4cc80/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js -- diff --git a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js index 2754891..622c9f9 100644 --- a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js +++ b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js @@ -42,6 +42,49 @@ App.SliderAppController = Ember.ObjectController.extend(App.AjaxErrorHandler, { }.property('model.quickLinks.content.content.length'), /** + * List of all possible actions for slider app + * @type {Em.Object} + */ + appActions: Em.Object.create({ +stop: { + title: 'Stop', + action: 'freeze', + confirm: true +}, +flex: { + title: 'Flex', + action: 'flex', + confirm: false +}, +destroy: { + title: 'Destroy', + action: 'destroy', + customConfirm: 'confirmDestroy' +}, +start: { + title: 'Start', + action: 'thaw', + confirm: false +} + }), + + /** + * map of available action for slider app according to its status + * key - status, value - list of actions + * @type {Em.Object} + */ + statusActionsMap: Em.Object.create({ +NEW: ['stop'], +NEW_SAVING: ['stop'], +ACCEPTED: ['stop'], +RUNNING: ['stop', 'flex'], +FINISHED: ['start', 'destroy'], +FAILED: ['destroy'], +KILLED: ['destroy'], +FROZEN: ['start', 'destroy'] + }), + + /** * List of available for model actions * Based on codemodel.status/code * @type {Ember.Object[]} @@ -49,40 +92,19 @@ App.SliderAppController = Ember.ObjectController.extend(App.AjaxErrorHandler, { availableActions: function() { var actions = Em.A([]), advanced = Em.A([]), + appActions = this.get('appActions'), + statusActionsMap = this.get('statusActionsMap'), status = this.get('model.status'); -if ('RUNNING' === status) { - actions.pushObject({ -title: 'Stop', -action: 'freeze', -confirm: true - }); -} -if ('RUNNING' == status) { - actions.push({ -title: 'Flex', -action: 'flex', -confirm: false - }); -} -if ('FROZEN' === status) { - actions.pushObject({ -title: 'Start', -action: 'thaw', -confirm: false - }); - advanced.pushObject({ -title: 'Destroy', -action: 'destroy', -customConfirm: 'confirmDestroy' - }); -} -if ('FAILED' === status) { - advanced.pushObject({ -title: 'Destroy', -action: 'destroy', -customConfirm: 'confirmDestroy' - }); -} + +statusActionsMap[status].forEach(function(action) { + if ('destroy' === action) { +advanced.pushObject(appActions[action]); + } + else { +actions.pushObject(appActions[action]); + } +}); + if (advanced.length) { actions.pushObject({ title: 'Advanced', @@ -405,7 +427,6 @@ App.SliderAppController = Ember.ObjectController.extend(App.AjaxErrorHandler, { this.tryDoAction(); } } - return true; } } http://git-wip-us.apache.org/repos/asf/ambari/blob/26c4cc80/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js -- diff --git a/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js b/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js index 3702b35..9534d98 100644 ---
[4/7] git commit: AMBARI-7647 Oozie and Falcon service checks fail on HDP2.2 (dsen)
AMBARI-7647 Oozie and Falcon service checks fail on HDP2.2 (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bb1b5135 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bb1b5135 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bb1b5135 Branch: refs/heads/branch-alerts-dev Commit: bb1b5135bd6ec9f872232a1000d7b683f57b6bff Parents: 7f0ea26 Author: Dmytro Sen d...@hortonworks.com Authored: Mon Oct 6 15:26:20 2014 +0300 Committer: Dmytro Sen d...@hortonworks.com Committed: Mon Oct 6 15:26:20 2014 +0300 -- .../services/OOZIE/package/scripts/oozie.py | 2 +- .../services/OOZIE/package/scripts/params.py| 2 - .../services/OOZIE/configuration/oozie-site.xml | 75 .../stacks/2.0.6/OOZIE/test_oozie_server.py | 10 +++ 4 files changed, 86 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/bb1b5135/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py index 608b9b1..bba2e09 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py @@ -121,7 +121,7 @@ def oozie_server_specific( not_if=ls {pid_file} /dev/null 21 !(ps `cat {pid_file}` /dev/null 21) ) - oozie_server_directorties = [params.oozie_pid_dir, params.oozie_log_dir, params.oozie_tmp_dir, params.oozie_data_dir, params.oozie_lib_dir, params.oozie_webapps_dir, params.oozie_webapps_conf_dir] + oozie_server_directorties = [params.oozie_pid_dir, params.oozie_log_dir, params.oozie_tmp_dir, params.oozie_data_dir, params.oozie_lib_dir, params.oozie_webapps_dir, params.oozie_webapps_conf_dir, params.oozie_server_dir] Directory( oozie_server_directorties, owner = params.oozie_user, mode = 0755, http://git-wip-us.apache.org/repos/asf/ambari/blob/bb1b5135/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py index aeccc75..17b26a0 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py @@ -33,7 +33,6 @@ rpm_version = default(/configurations/cluster-env/rpm_version, None) if rpm_version: hadoop_bin_dir = /usr/hdp/current/hadoop/bin hadoop_lib_home = /usr/hdp/current/hadoop/lib - mapreduce_libs_path = /usr/hdp/current/hadoop-mapreduce/* oozie_lib_dir = /usr/hdp/current/oozie/ oozie_setup_sh = /usr/hdp/current/oozie/bin/oozie-setup.sh oozie_webapps_dir = /usr/hdp/current/oozie/oozie-server/webapps @@ -47,7 +46,6 @@ if rpm_version: else: hadoop_bin_dir = /usr/bin hadoop_lib_home = /usr/lib/hadoop/lib - mapreduce_libs_path = /usr/lib/hadoop-mapreduce/* oozie_lib_dir = /var/lib/oozie/ oozie_setup_sh = /usr/lib/oozie/bin/oozie-setup.sh oozie_webapps_dir = /var/lib/oozie/oozie-server/webapps/ http://git-wip-us.apache.org/repos/asf/ambari/blob/bb1b5135/ambari-server/src/main/resources/stacks/HDP/2.2/services/OOZIE/configuration/oozie-site.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/OOZIE/configuration/oozie-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/OOZIE/configuration/oozie-site.xml index dc56d8b..4a8eab7 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/OOZIE/configuration/oozie-site.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/OOZIE/configuration/oozie-site.xml @@ -28,5 +28,80 @@ additional system stress. /description /property + property +nameoozie.services/name +value + org.apache.oozie.service.SchedulerService, + org.apache.oozie.service.InstrumentationService, + org.apache.oozie.service.MemoryLocksService, + org.apache.oozie.service.UUIDService, + org.apache.oozie.service.ELService, + org.apache.oozie.service.AuthorizationService, + org.apache.oozie.service.UserGroupInformationService, + org.apache.oozie.service.HadoopAccessorService, + org.apache.oozie.service.JobsConcurrencyService, +
[6/7] git commit: AMBARI-7648 Supervisors link in the Storm service summary page does not do anything upon clicking. (ababiichuk)
AMBARI-7648 Supervisors link in the Storm service summary page does not do anything upon clicking. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/76e3bb4b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/76e3bb4b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/76e3bb4b Branch: refs/heads/branch-alerts-dev Commit: 76e3bb4ba1528173b6ed399fb2872c5a69c744f8 Parents: 5ce6ebf Author: aBabiichuk ababiic...@cybervisiontech.com Authored: Mon Oct 6 18:00:14 2014 +0300 Committer: aBabiichuk ababiic...@cybervisiontech.com Committed: Mon Oct 6 18:00:23 2014 +0300 -- ambari-web/app/templates/main/service/services/storm.hbs | 2 +- ambari-web/app/views/main/service/services/storm.js | 8 2 files changed, 9 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/76e3bb4b/ambari-web/app/templates/main/service/services/storm.hbs -- diff --git a/ambari-web/app/templates/main/service/services/storm.hbs b/ambari-web/app/templates/main/service/services/storm.hbs index 5382612..804adfd 100644 --- a/ambari-web/app/templates/main/service/services/storm.hbs +++ b/ambari-web/app/templates/main/service/services/storm.hbs @@ -19,7 +19,7 @@ {{view App.SummaryMasterComponentsView mastersCompBinding=view.parentView.mastersObj}} tr td -a href=# {{action filterHosts view.superVisorComponents.[0]}} +a href=# {{action filterHosts view.filterComponent}} {{t dashboard.services.storm.supervisors}} /a /td http://git-wip-us.apache.org/repos/asf/ambari/blob/76e3bb4b/ambari-web/app/views/main/service/services/storm.js -- diff --git a/ambari-web/app/views/main/service/services/storm.js b/ambari-web/app/views/main/service/services/storm.js index 406c46f..3546cd0 100644 --- a/ambari-web/app/views/main/service/services/storm.js +++ b/ambari-web/app/views/main/service/services/storm.js @@ -23,6 +23,14 @@ App.MainDashboardServiceStormView = App.MainDashboardServiceView.extend({ templateName: require('templates/main/service/services/storm'), serviceName: 'STORM', + /** + * this parameter is used to fiter hosts by component name + * used in mainHostController.filterByComponent() method + */ + filterComponent: function() { +return Em.Object.create({componentName: 'SUPERVISOR'}); + }.property(), + freeSlotsPercentage: function() { return Math.round(this.get('service.freeSlots')/this.get('service.totalSlots')*100); }.property('service.freeSlots', 'service.totalSlots'),
[3/7] git commit: AMBARI-7646 Zookeeper server stops after starting on HDP 2.2 (dsen)
AMBARI-7646 Zookeeper server stops after starting on HDP 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/7f0ea265 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7f0ea265 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7f0ea265 Branch: refs/heads/branch-alerts-dev Commit: 7f0ea265c877b665e4744272fc4bd2c72e698bcb Parents: 26c4cc8 Author: Dmytro Sen d...@hortonworks.com Authored: Mon Oct 6 14:52:19 2014 +0300 Committer: Dmytro Sen d...@hortonworks.com Committed: Mon Oct 6 14:52:30 2014 +0300 -- .../HDP/2.0.6/services/ZOOKEEPER/configuration/zookeeper-env.xml | 1 + .../stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/params.py | 2 ++ 2 files changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7f0ea265/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/configuration/zookeeper-env.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/configuration/zookeeper-env.xml b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/configuration/zookeeper-env.xml index b0d55e6..4c305b0 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/configuration/zookeeper-env.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/configuration/zookeeper-env.xml @@ -69,6 +69,7 @@ descriptionThis is the jinja template for zookeeper-env.sh file/description value export JAVA_HOME={{java64_home}} +export ZOOKEEPER_HOME={{zk_home}} export ZOO_LOG_DIR={{zk_log_dir}} export ZOOPIDFILE={{zk_pid_file}} export SERVER_JVMFLAGS={{zk_server_heapsize}} http://git-wip-us.apache.org/repos/asf/ambari/blob/7f0ea265/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/params.py index 89d1089..9e09d5f 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/params.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/package/scripts/params.py @@ -31,9 +31,11 @@ rpm_version = default(/configurations/cluster-env/rpm_version, None) #hadoop params if rpm_version: + zk_home = '/usr/hdp/current/zookeeper' zk_bin = '/usr/hdp/current/zookeeper/bin' smoke_script = '/usr/hdp/current/zookeeper/bin/zkCli.sh' else: + zk_home = '/usr' zk_bin = '/usr/lib/zookeeper/bin' smoke_script = /usr/lib/zookeeper/bin/zkCli.sh
[1/2] git commit: AMBARI-7650. RestMetricsPropertyProvider adds Storm metrics to all components (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-1.7.0 a70258b92 - 8c1dc9514 refs/heads/trunk 76e3bb4ba - a5551b730 AMBARI-7650. RestMetricsPropertyProvider adds Storm metrics to all components (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a5551b73 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a5551b73 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a5551b73 Branch: refs/heads/trunk Commit: a5551b730b1c5111ae2fd6c1e369edded393323c Parents: 76e3bb4 Author: Andrew Onishuk aonis...@hortonworks.com Authored: Mon Oct 6 19:54:49 2014 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Mon Oct 6 19:54:49 2014 +0300 -- .../internal/StackDefinedPropertyProvider.java | 10 ++ .../metrics/RestMetricsPropertyProvider.java | 19 +-- 2 files changed, 19 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a5551b73/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackDefinedPropertyProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackDefinedPropertyProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackDefinedPropertyProvider.java index 32411e9..4ecc2f0 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackDefinedPropertyProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackDefinedPropertyProvider.java @@ -168,7 +168,8 @@ public class StackDefinedPropertyProvider implements PropertyProvider { pp = getDelegate(m, streamProvider, metricsHostProvider, clusterNamePropertyId, hostNamePropertyId, - componentNamePropertyId, resourceStatePropertyId); + componentNamePropertyId, resourceStatePropertyId, + componentName); } if(pp != null) { additional.add(pp); @@ -292,7 +293,8 @@ public class StackDefinedPropertyProvider implements PropertyProvider { String clusterNamePropertyId, String hostNamePropertyId, String componentNamePropertyId, - String statePropertyId) { + String statePropertyId, + String componentName) { MapString, PropertyInfo metrics = getPropertyInfo(definition); HashMapString, MapString, PropertyInfo componentMetrics = new HashMapString, MapString, PropertyInfo(); @@ -325,13 +327,13 @@ public class StackDefinedPropertyProvider implements PropertyProvider { */ Constructor? ct = clz.getConstructor(Injector.class, Map.class, Map.class, StreamProvider.class, MetricsHostProvider.class, -String.class, String.class, String.class, String.class); +String.class, String.class, String.class, String.class, String.class); Object o = ct.newInstance( injector, definition.getProperties(), componentMetrics, streamProvider, metricsHostProvider, clusterNamePropertyId, hostNamePropertyId, -componentNamePropertyId, statePropertyId); +componentNamePropertyId, statePropertyId, componentName); return PropertyProvider.class.cast(o); } catch (Exception e) { LOG.info(Could not find contructor for type ' + http://git-wip-us.apache.org/repos/asf/ambari/blob/a5551b73/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProvider.java index 48d06b8..e8b054f 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProvider.java @@ -77,6 +77,7 @@ public class RestMetricsPropertyProvider extends MetricsProvider { private final String componentNamePropertyId; private final String statePropertyId; private MetricsHostProvider metricsHostProvider; + private final String componentName; private static final String DEFAULT_PORT_PROPERTY = default_port; private static final String
[2/2] git commit: AMBARI-7650. RestMetricsPropertyProvider adds Storm metrics to all components (aonishuk)
AMBARI-7650. RestMetricsPropertyProvider adds Storm metrics to all components (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8c1dc951 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8c1dc951 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8c1dc951 Branch: refs/heads/branch-1.7.0 Commit: 8c1dc9514bcf02cf15d3a0238cfb4b432b6b1924 Parents: a70258b Author: Andrew Onishuk aonis...@hortonworks.com Authored: Mon Oct 6 19:54:51 2014 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Mon Oct 6 19:54:51 2014 +0300 -- .../internal/StackDefinedPropertyProvider.java | 10 ++ .../metrics/RestMetricsPropertyProvider.java | 19 +-- 2 files changed, 19 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8c1dc951/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackDefinedPropertyProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackDefinedPropertyProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackDefinedPropertyProvider.java index 32411e9..4ecc2f0 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackDefinedPropertyProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackDefinedPropertyProvider.java @@ -168,7 +168,8 @@ public class StackDefinedPropertyProvider implements PropertyProvider { pp = getDelegate(m, streamProvider, metricsHostProvider, clusterNamePropertyId, hostNamePropertyId, - componentNamePropertyId, resourceStatePropertyId); + componentNamePropertyId, resourceStatePropertyId, + componentName); } if(pp != null) { additional.add(pp); @@ -292,7 +293,8 @@ public class StackDefinedPropertyProvider implements PropertyProvider { String clusterNamePropertyId, String hostNamePropertyId, String componentNamePropertyId, - String statePropertyId) { + String statePropertyId, + String componentName) { MapString, PropertyInfo metrics = getPropertyInfo(definition); HashMapString, MapString, PropertyInfo componentMetrics = new HashMapString, MapString, PropertyInfo(); @@ -325,13 +327,13 @@ public class StackDefinedPropertyProvider implements PropertyProvider { */ Constructor? ct = clz.getConstructor(Injector.class, Map.class, Map.class, StreamProvider.class, MetricsHostProvider.class, -String.class, String.class, String.class, String.class); +String.class, String.class, String.class, String.class, String.class); Object o = ct.newInstance( injector, definition.getProperties(), componentMetrics, streamProvider, metricsHostProvider, clusterNamePropertyId, hostNamePropertyId, -componentNamePropertyId, statePropertyId); +componentNamePropertyId, statePropertyId, componentName); return PropertyProvider.class.cast(o); } catch (Exception e) { LOG.info(Could not find contructor for type ' + http://git-wip-us.apache.org/repos/asf/ambari/blob/8c1dc951/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProvider.java index 48d06b8..e8b054f 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProvider.java @@ -77,6 +77,7 @@ public class RestMetricsPropertyProvider extends MetricsProvider { private final String componentNamePropertyId; private final String statePropertyId; private MetricsHostProvider metricsHostProvider; + private final String componentName; private static final String DEFAULT_PORT_PROPERTY = default_port; private static final String PORT_CONFIG_TYPE_PROPERTY = port_config_type; @@ -123,7 +124,8 @@ public class RestMetricsPropertyProvider extends MetricsProvider {
git commit: AMBARI-7652 WebHCat server start fails for HDP2.2 if PIG isn't deployed (dsen)
Repository: ambari Updated Branches: refs/heads/trunk a5551b730 - 0e869ffbf AMBARI-7652 WebHCat server start fails for HDP2.2 if PIG isn't deployed (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0e869ffb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0e869ffb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0e869ffb Branch: refs/heads/trunk Commit: 0e869ffbfa2ecc7f3485b4ed2241ed1ed3fb28ab Parents: a5551b7 Author: Dmytro Sen d...@hortonworks.com Authored: Mon Oct 6 19:55:05 2014 +0300 Committer: Dmytro Sen d...@hortonworks.com Committed: Mon Oct 6 19:55:34 2014 +0300 -- .../main/resources/stacks/HDP/2.2/services/HIVE/metainfo.xml| 5 + 1 file changed, 5 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0e869ffb/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/metainfo.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/metainfo.xml index 752eac7..892a82e 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/metainfo.xml @@ -64,6 +64,11 @@ /packages /osSpecific /osSpecifics + + requiredServices +servicePIG/service + /requiredServices + /service /services /metainfo
git commit: AMBARI-7657. Slider View: No items are displayed in Apps table after Clear Filters action. (Max Shepel via akovalenko)
Repository: ambari Updated Branches: refs/heads/trunk 94d76a414 - af9ceed0f AMBARI-7657. Slider View: No items are displayed in Apps table after Clear Filters action. (Max Shepel via akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/af9ceed0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/af9ceed0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/af9ceed0 Branch: refs/heads/trunk Commit: af9ceed0f62ea58813207c04cc45a72f224b508c Parents: 94d76a4 Author: Aleksandr Kovalenko akovale...@hortonworks.com Authored: Mon Oct 6 21:22:57 2014 +0300 Committer: Aleksandr Kovalenko akovale...@hortonworks.com Committed: Mon Oct 6 21:22:57 2014 +0300 -- .../ui/app/views/common/filter_view.js | 2 +- .../resources/ui/app/views/common/table_view.js | 2 +- .../resources/ui/app/views/slider_apps_view.js | 3 +- .../ui/test/unit/views/slider_apps_view_test.js | 37 4 files changed, 41 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/af9ceed0/contrib/views/slider/src/main/resources/ui/app/views/common/filter_view.js -- diff --git a/contrib/views/slider/src/main/resources/ui/app/views/common/filter_view.js b/contrib/views/slider/src/main/resources/ui/app/views/common/filter_view.js index 2d357e3..64f2413 100644 --- a/contrib/views/slider/src/main/resources/ui/app/views/common/filter_view.js +++ b/contrib/views/slider/src/main/resources/ui/app/views/common/filter_view.js @@ -271,7 +271,7 @@ module.exports = { attributeBindings: ['disabled','multiple'], disabled: false }); -config.emptyValue = Em.I18n.t('any'); +config.emptyValue = config.emptyValue || Em.I18n.t('any'); return wrapperView.extend(config); }, http://git-wip-us.apache.org/repos/asf/ambari/blob/af9ceed0/contrib/views/slider/src/main/resources/ui/app/views/common/table_view.js -- diff --git a/contrib/views/slider/src/main/resources/ui/app/views/common/table_view.js b/contrib/views/slider/src/main/resources/ui/app/views/common/table_view.js index cb78c88..4d5df4a 100644 --- a/contrib/views/slider/src/main/resources/ui/app/views/common/table_view.js +++ b/contrib/views/slider/src/main/resources/ui/app/views/common/table_view.js @@ -356,7 +356,7 @@ App.TableView = Em.View.extend({ var assoc = this.get('colPropAssoc'); if (filterConditions.length) { result = content.filter(function (item) { - var match = true; +var match = true; filterConditions.forEach(function (condition) { var filterFunc = filters.getFilterByType(condition.type, false); if (match condition.value != condition.defaultValue) { http://git-wip-us.apache.org/repos/asf/ambari/blob/af9ceed0/contrib/views/slider/src/main/resources/ui/app/views/slider_apps_view.js -- diff --git a/contrib/views/slider/src/main/resources/ui/app/views/slider_apps_view.js b/contrib/views/slider/src/main/resources/ui/app/views/slider_apps_view.js index 307dad4..787378b 100644 --- a/contrib/views/slider/src/main/resources/ui/app/views/slider_apps_view.js +++ b/contrib/views/slider/src/main/resources/ui/app/views/slider_apps_view.js @@ -120,7 +120,8 @@ App.SliderAppsView = App.TableView.extend({ }.property('parentView.statusList'), onChangeValue: function(){ this.get('parentView').updateFilter(this.get('column'), this.get('value'), 'string', this.get('defaultValue')); -} +}, +emptyValue: 'All Status' }), typeFilterView: filters.createTextView({ http://git-wip-us.apache.org/repos/asf/ambari/blob/af9ceed0/contrib/views/slider/src/main/resources/ui/test/unit/views/slider_apps_view_test.js -- diff --git a/contrib/views/slider/src/main/resources/ui/test/unit/views/slider_apps_view_test.js b/contrib/views/slider/src/main/resources/ui/test/unit/views/slider_apps_view_test.js new file mode 100644 index 000..a3cd020 --- /dev/null +++ b/contrib/views/slider/src/main/resources/ui/test/unit/views/slider_apps_view_test.js @@ -0,0 +1,37 @@ +/** + * 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
git commit: AMBARI-7657. Slider View: No items are displayed in Apps table after Clear Filters action. (Max Shepel via akovalenko)
Repository: ambari Updated Branches: refs/heads/branch-1.7.0 c6ece0896 - 5fbaece3d AMBARI-7657. Slider View: No items are displayed in Apps table after Clear Filters action. (Max Shepel via akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5fbaece3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5fbaece3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5fbaece3 Branch: refs/heads/branch-1.7.0 Commit: 5fbaece3d705d8ac3c77050bc2a0e8862fca073a Parents: c6ece08 Author: Aleksandr Kovalenko akovale...@hortonworks.com Authored: Mon Oct 6 21:30:35 2014 +0300 Committer: Aleksandr Kovalenko akovale...@hortonworks.com Committed: Mon Oct 6 21:30:35 2014 +0300 -- .../ui/app/views/common/filter_view.js | 2 +- .../resources/ui/app/views/common/table_view.js | 2 +- .../resources/ui/app/views/slider_apps_view.js | 3 +- .../ui/test/unit/views/slider_apps_view_test.js | 37 4 files changed, 41 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5fbaece3/contrib/views/slider/src/main/resources/ui/app/views/common/filter_view.js -- diff --git a/contrib/views/slider/src/main/resources/ui/app/views/common/filter_view.js b/contrib/views/slider/src/main/resources/ui/app/views/common/filter_view.js index 2d357e3..64f2413 100644 --- a/contrib/views/slider/src/main/resources/ui/app/views/common/filter_view.js +++ b/contrib/views/slider/src/main/resources/ui/app/views/common/filter_view.js @@ -271,7 +271,7 @@ module.exports = { attributeBindings: ['disabled','multiple'], disabled: false }); -config.emptyValue = Em.I18n.t('any'); +config.emptyValue = config.emptyValue || Em.I18n.t('any'); return wrapperView.extend(config); }, http://git-wip-us.apache.org/repos/asf/ambari/blob/5fbaece3/contrib/views/slider/src/main/resources/ui/app/views/common/table_view.js -- diff --git a/contrib/views/slider/src/main/resources/ui/app/views/common/table_view.js b/contrib/views/slider/src/main/resources/ui/app/views/common/table_view.js index cb78c88..4d5df4a 100644 --- a/contrib/views/slider/src/main/resources/ui/app/views/common/table_view.js +++ b/contrib/views/slider/src/main/resources/ui/app/views/common/table_view.js @@ -356,7 +356,7 @@ App.TableView = Em.View.extend({ var assoc = this.get('colPropAssoc'); if (filterConditions.length) { result = content.filter(function (item) { - var match = true; +var match = true; filterConditions.forEach(function (condition) { var filterFunc = filters.getFilterByType(condition.type, false); if (match condition.value != condition.defaultValue) { http://git-wip-us.apache.org/repos/asf/ambari/blob/5fbaece3/contrib/views/slider/src/main/resources/ui/app/views/slider_apps_view.js -- diff --git a/contrib/views/slider/src/main/resources/ui/app/views/slider_apps_view.js b/contrib/views/slider/src/main/resources/ui/app/views/slider_apps_view.js index 4e6ed1e..e158f5f 100644 --- a/contrib/views/slider/src/main/resources/ui/app/views/slider_apps_view.js +++ b/contrib/views/slider/src/main/resources/ui/app/views/slider_apps_view.js @@ -120,7 +120,8 @@ App.SliderAppsView = App.TableView.extend({ }.property('parentView.statusList'), onChangeValue: function(){ this.get('parentView').updateFilter(this.get('column'), this.get('value'), 'string', this.get('defaultValue')); -} +}, +emptyValue: 'All Status' }), typeFilterView: filters.createTextView({ http://git-wip-us.apache.org/repos/asf/ambari/blob/5fbaece3/contrib/views/slider/src/main/resources/ui/test/unit/views/slider_apps_view_test.js -- diff --git a/contrib/views/slider/src/main/resources/ui/test/unit/views/slider_apps_view_test.js b/contrib/views/slider/src/main/resources/ui/test/unit/views/slider_apps_view_test.js new file mode 100644 index 000..a3cd020 --- /dev/null +++ b/contrib/views/slider/src/main/resources/ui/test/unit/views/slider_apps_view_test.js @@ -0,0 +1,37 @@ +/** + * 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 + * + *
git commit: AMBARI-7643. Jobs view: Input/Output bytes shows up as 0 for some jobs (alejandro)
Repository: ambari Updated Branches: refs/heads/trunk af9ceed0f - e40a21889 AMBARI-7643. Jobs view: Input/Output bytes shows up as 0 for some jobs (alejandro) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e40a2188 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e40a2188 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e40a2188 Branch: refs/heads/trunk Commit: e40a2188940909e41c38bd81d5a6072dcc008109 Parents: af9ceed Author: Alejandro Fernandez afernan...@hortonworks.com Authored: Fri Oct 3 19:07:34 2014 -0700 Committer: Alejandro Fernandez afernan...@hortonworks.com Committed: Mon Oct 6 11:46:13 2014 -0700 -- .../src/main/resources/ui/app/scripts/models/jobs/tez_dag.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e40a2188/contrib/views/jobs/src/main/resources/ui/app/scripts/models/jobs/tez_dag.js -- diff --git a/contrib/views/jobs/src/main/resources/ui/app/scripts/models/jobs/tez_dag.js b/contrib/views/jobs/src/main/resources/ui/app/scripts/models/jobs/tez_dag.js index 5797120..b4dec2b 100644 --- a/contrib/views/jobs/src/main/resources/ui/app/scripts/models/jobs/tez_dag.js +++ b/contrib/views/jobs/src/main/resources/ui/app/scripts/models/jobs/tez_dag.js @@ -162,11 +162,11 @@ App.TezDagVertex = DS.Model.extend({ recordWriteCount: DS.attr('number'), totalReadBytes: function () { -return this.get('fileReadBytes') + this.get('hdfsReadBytes'); +return (this.get('fileReadBytes') || 0) + (this.get('hdfsReadBytes') || 0); }.property('fileReadBytes', 'hdfsReadBytes'), totalWriteBytes: function () { -return this.get('fileWriteBytes') + this.get('hdfsWriteBytes'); +return (this.get('fileWriteBytes') || 0) + (this.get('hdfsWriteBytes') || 0); }.property('fileWriteBytes', 'hdfsWriteBytes'), totalReadBytesDisplay: function () {
git commit: AMBARI-7442 ServiceCheck cannot be run if there is only one stack definition (adenisso via jaoki)
Repository: ambari Updated Branches: refs/heads/trunk e40a21889 - a619219ff AMBARI-7442 ServiceCheck cannot be run if there is only one stack definition (adenisso via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a619219f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a619219f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a619219f Branch: refs/heads/trunk Commit: a619219ff6e9a812ecc283751a5c1f3e12ed182e Parents: e40a218 Author: Jun Aoki ja...@apache.org Authored: Mon Oct 6 11:50:29 2014 -0700 Committer: Jun Aoki ja...@apache.org Committed: Mon Oct 6 11:51:07 2014 -0700 -- .../server/api/util/StackExtensionHelper.java | 14 +- .../api/util/StackExtensionHelperTest.java | 27 +++ .../single_stack/ABC/1.0.0/metainfo.xml | 22 +++ .../ABC/1.0.0/services/HDFS/metainfo.xml| 193 +++ 4 files changed, 251 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a619219f/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java index 1c3f9a7..35ae9a7 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java @@ -490,11 +490,6 @@ public class StackExtensionHelper { } } -// add action for service check -if(serviceInfo.getCommandScript() != null) { - actionMetadata.addServiceCheckAction(serviceInfo.getName()); -} - } parentStack = currentStackInfo; } @@ -536,6 +531,7 @@ public class StackExtensionHelper { ParserConfigurationException, SAXException, XPathExpressionException, IOException, JAXBException { ListServiceInfo services = new ArrayListServiceInfo(); + File servicesFolder = new File(stackRoot.getAbsolutePath() + File .separator + stackInfo.getName() + File.separator + stackInfo.getVersion() + File.separator + AmbariMetaInfo.SERVICES_FOLDER_NAME); @@ -602,6 +598,14 @@ public class StackExtensionHelper { } stackInfo.getServices().addAll(services); + +// add service check actions from the target stack +for(ServiceInfo serviceInfo : stackInfo.getServices()) { + if(serviceInfo.getCommandScript() != null) { +actionMetadata.addServiceCheckAction(serviceInfo.getName()); + } +} + } http://git-wip-us.apache.org/repos/asf/ambari/blob/a619219f/ambari-server/src/test/java/org/apache/ambari/server/api/util/StackExtensionHelperTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/util/StackExtensionHelperTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/util/StackExtensionHelperTest.java index 7262dfb..84ba6aa 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/api/util/StackExtensionHelperTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/api/util/StackExtensionHelperTest.java @@ -21,6 +21,7 @@ package org.apache.ambari.server.api.util; import com.google.inject.AbstractModule; import com.google.inject.Guice; import com.google.inject.Injector; + import org.apache.ambari.server.api.services.AmbariMetaInfo; import org.apache.ambari.server.metadata.ActionMetadata; import org.apache.ambari.server.state.*; @@ -32,6 +33,7 @@ import javax.xml.bind.JAXBException; import javax.xml.namespace.QName; import javax.xml.parsers.ParserConfigurationException; import javax.xml.xpath.XPathExpressionException; + import java.io.File; import java.io.IOException; import java.util.*; @@ -353,6 +355,31 @@ public class StackExtensionHelperTest { MapString, String supports = config.get(keyword); supports.put(attributeName, value); } + + /** + * This test ensures the service status check is added into the action metadata when + * the stack has no parent and is the only stack in the stack family + * @throws Exception + */ + @Test + public void testGetServiceInfoFromSingleStack() throws Exception { +File stackRoot = new File(./src/test/resources/single_stack.replace(/, File.separator)); +StackExtensionHelper helper = new StackExtensionHelper(injector, stackRoot); +helper.fillInfo(); +ListStackInfo stackInfoList = helper.getAllAvailableStacks(); +assertEquals(1, stackInfoList.size()); + +ListServiceInfo serviceInfoList =
git commit: AMBARI-7442 ServiceCheck cannot be run if there is only one stack definition (adenisso via jaoki)
Repository: ambari Updated Branches: refs/heads/branch-1.7.0 5fbaece3d - df0f496a7 AMBARI-7442 ServiceCheck cannot be run if there is only one stack definition (adenisso via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/df0f496a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/df0f496a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/df0f496a Branch: refs/heads/branch-1.7.0 Commit: df0f496a71e5cc47d0e550eb027d5e3c0191d768 Parents: 5fbaece Author: Jun Aoki ja...@apache.org Authored: Mon Oct 6 11:52:59 2014 -0700 Committer: Jun Aoki ja...@apache.org Committed: Mon Oct 6 11:52:59 2014 -0700 -- .../server/api/util/StackExtensionHelper.java | 14 +- .../api/util/StackExtensionHelperTest.java | 27 +++ .../single_stack/ABC/1.0.0/metainfo.xml | 22 +++ .../ABC/1.0.0/services/HDFS/metainfo.xml| 193 +++ 4 files changed, 251 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/df0f496a/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java index 1c3f9a7..35ae9a7 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java @@ -490,11 +490,6 @@ public class StackExtensionHelper { } } -// add action for service check -if(serviceInfo.getCommandScript() != null) { - actionMetadata.addServiceCheckAction(serviceInfo.getName()); -} - } parentStack = currentStackInfo; } @@ -536,6 +531,7 @@ public class StackExtensionHelper { ParserConfigurationException, SAXException, XPathExpressionException, IOException, JAXBException { ListServiceInfo services = new ArrayListServiceInfo(); + File servicesFolder = new File(stackRoot.getAbsolutePath() + File .separator + stackInfo.getName() + File.separator + stackInfo.getVersion() + File.separator + AmbariMetaInfo.SERVICES_FOLDER_NAME); @@ -602,6 +598,14 @@ public class StackExtensionHelper { } stackInfo.getServices().addAll(services); + +// add service check actions from the target stack +for(ServiceInfo serviceInfo : stackInfo.getServices()) { + if(serviceInfo.getCommandScript() != null) { +actionMetadata.addServiceCheckAction(serviceInfo.getName()); + } +} + } http://git-wip-us.apache.org/repos/asf/ambari/blob/df0f496a/ambari-server/src/test/java/org/apache/ambari/server/api/util/StackExtensionHelperTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/util/StackExtensionHelperTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/util/StackExtensionHelperTest.java index 7262dfb..84ba6aa 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/api/util/StackExtensionHelperTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/api/util/StackExtensionHelperTest.java @@ -21,6 +21,7 @@ package org.apache.ambari.server.api.util; import com.google.inject.AbstractModule; import com.google.inject.Guice; import com.google.inject.Injector; + import org.apache.ambari.server.api.services.AmbariMetaInfo; import org.apache.ambari.server.metadata.ActionMetadata; import org.apache.ambari.server.state.*; @@ -32,6 +33,7 @@ import javax.xml.bind.JAXBException; import javax.xml.namespace.QName; import javax.xml.parsers.ParserConfigurationException; import javax.xml.xpath.XPathExpressionException; + import java.io.File; import java.io.IOException; import java.util.*; @@ -353,6 +355,31 @@ public class StackExtensionHelperTest { MapString, String supports = config.get(keyword); supports.put(attributeName, value); } + + /** + * This test ensures the service status check is added into the action metadata when + * the stack has no parent and is the only stack in the stack family + * @throws Exception + */ + @Test + public void testGetServiceInfoFromSingleStack() throws Exception { +File stackRoot = new File(./src/test/resources/single_stack.replace(/, File.separator)); +StackExtensionHelper helper = new StackExtensionHelper(injector, stackRoot); +helper.fillInfo(); +ListStackInfo stackInfoList = helper.getAllAvailableStacks(); +assertEquals(1, stackInfoList.size()); + +ListServiceInfo
git commit: AMBARI-7658. Fix warning when using HTTPS_ONLY for secured DN (dlysnichenko)
Repository: ambari Updated Branches: refs/heads/trunk a619219ff - 0800415ca AMBARI-7658. Fix warning when using HTTPS_ONLY for secured DN (dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0800415c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0800415c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0800415c Branch: refs/heads/trunk Commit: 0800415cacf997914941a3465914cf55bf2c573c Parents: a619219 Author: Lisnichenko Dmitro dlysniche...@hortonworks.com Authored: Mon Oct 6 19:17:46 2014 +0300 Committer: Lisnichenko Dmitro dlysniche...@hortonworks.com Committed: Mon Oct 6 22:23:04 2014 +0300 -- .../stacks/HDP/2.2/services/stack_advisor.py| 5 +- .../stacks/2.2/common/test_stack_advisor.py | 137 --- 2 files changed, 121 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0800415c/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py index 3f1faf7..19b1065 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py @@ -101,10 +101,9 @@ class HDP22StackAdvisor(HDP21StackAdvisor): # determine whether we use secure ports address_properties_with_warnings = [] if dfs_http_policy_value == HTTPS_ONLY: -any_privileged_ports_are_in_use = privileged_dfs_dn_port or privileged_dfs_https_port -if any_privileged_ports_are_in_use: +if not privileged_dfs_dn_port and (privileged_dfs_https_port or datanode_https_address not in hdfs_site): important_properties = [dfs_datanode_address, datanode_https_address] - message = You set up datanode to use some non-secure ports, but {0} is set to {1}. \ + message = You set up datanode to use some non-secure ports. \ If you want to run Datanode under non-root user in a secure cluster, \ you should set all these properties {2} \ to use non-secure ports (if property {3} does not exist, \ http://git-wip-us.apache.org/repos/asf/ambari/blob/0800415c/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py -- diff --git a/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py index 7d29ca8..3d6b2e6 100644 --- a/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py +++ b/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py @@ -113,12 +113,64 @@ class TestHDP22StackAdvisor(TestCase): validation_problems = self.stackAdvisor.validateHDFSConfigurations(properties, recommendedDefaults, configurations) self.assertEquals(validation_problems, expected) -# TEST CASE: Secure cluster, dfs.http.policy=HTTPS_ONLY, secure ports +# TEST CASE: Secure cluster, dfs.http.policy=HTTPS_ONLY, https address not defined +properties = { # hdfs-site +'dfs.http.policy': 'HTTPS_ONLY', +'dfs.datanode.address': '0.0.0.0:1019', +} +configurations = { + 'hdfs-site': { +'properties': properties, +}, + 'core-site': { +'properties': secure_cluster_core_site + } +} +expected = [ ] +validation_problems = self.stackAdvisor.validateHDFSConfigurations(properties, recommendedDefaults, configurations) +self.assertEquals(validation_problems, expected) + +# TEST CASE: Secure cluster, dfs.http.policy=HTTPS_ONLY, https address defined and secure +properties = { # hdfs-site +'dfs.http.policy': 'HTTPS_ONLY', +'dfs.datanode.address': '0.0.0.0:1019', +'dfs.datanode.https.address': '0.0.0.0:1022', +} +configurations = { + 'hdfs-site': { +'properties': properties, +}, + 'core-site': { +'properties': secure_cluster_core_site + } +} +expected = [] +validation_problems = self.stackAdvisor.validateHDFSConfigurations(properties, recommendedDefaults, configurations) +self.assertEquals(validation_problems, expected) + +# TEST CASE: Secure cluster, dfs.http.policy=HTTPS_ONLY, https address defined and non secure properties = { # hdfs-site 'dfs.http.policy': 'HTTPS_ONLY', 'dfs.datanode.address':
git commit: AMBARI-7658. Fix warning when using HTTPS_ONLY for secured DN (dlysnichenko)
Repository: ambari Updated Branches: refs/heads/branch-1.7.0 df0f496a7 - 3a2039166 AMBARI-7658. Fix warning when using HTTPS_ONLY for secured DN (dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3a203916 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3a203916 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3a203916 Branch: refs/heads/branch-1.7.0 Commit: 3a2039166800cfd74c3e3c8d67b1eaa570e26657 Parents: df0f496 Author: Lisnichenko Dmitro dlysniche...@hortonworks.com Authored: Mon Oct 6 19:17:46 2014 +0300 Committer: Lisnichenko Dmitro dlysniche...@hortonworks.com Committed: Mon Oct 6 22:25:40 2014 +0300 -- .../stacks/HDP/2.2/services/stack_advisor.py| 5 +- .../stacks/2.2/common/test_stack_advisor.py | 137 --- 2 files changed, 121 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3a203916/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py index 3f1faf7..19b1065 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py @@ -101,10 +101,9 @@ class HDP22StackAdvisor(HDP21StackAdvisor): # determine whether we use secure ports address_properties_with_warnings = [] if dfs_http_policy_value == HTTPS_ONLY: -any_privileged_ports_are_in_use = privileged_dfs_dn_port or privileged_dfs_https_port -if any_privileged_ports_are_in_use: +if not privileged_dfs_dn_port and (privileged_dfs_https_port or datanode_https_address not in hdfs_site): important_properties = [dfs_datanode_address, datanode_https_address] - message = You set up datanode to use some non-secure ports, but {0} is set to {1}. \ + message = You set up datanode to use some non-secure ports. \ If you want to run Datanode under non-root user in a secure cluster, \ you should set all these properties {2} \ to use non-secure ports (if property {3} does not exist, \ http://git-wip-us.apache.org/repos/asf/ambari/blob/3a203916/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py -- diff --git a/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py index 7d29ca8..3d6b2e6 100644 --- a/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py +++ b/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py @@ -113,12 +113,64 @@ class TestHDP22StackAdvisor(TestCase): validation_problems = self.stackAdvisor.validateHDFSConfigurations(properties, recommendedDefaults, configurations) self.assertEquals(validation_problems, expected) -# TEST CASE: Secure cluster, dfs.http.policy=HTTPS_ONLY, secure ports +# TEST CASE: Secure cluster, dfs.http.policy=HTTPS_ONLY, https address not defined +properties = { # hdfs-site +'dfs.http.policy': 'HTTPS_ONLY', +'dfs.datanode.address': '0.0.0.0:1019', +} +configurations = { + 'hdfs-site': { +'properties': properties, +}, + 'core-site': { +'properties': secure_cluster_core_site + } +} +expected = [ ] +validation_problems = self.stackAdvisor.validateHDFSConfigurations(properties, recommendedDefaults, configurations) +self.assertEquals(validation_problems, expected) + +# TEST CASE: Secure cluster, dfs.http.policy=HTTPS_ONLY, https address defined and secure +properties = { # hdfs-site +'dfs.http.policy': 'HTTPS_ONLY', +'dfs.datanode.address': '0.0.0.0:1019', +'dfs.datanode.https.address': '0.0.0.0:1022', +} +configurations = { + 'hdfs-site': { +'properties': properties, +}, + 'core-site': { +'properties': secure_cluster_core_site + } +} +expected = [] +validation_problems = self.stackAdvisor.validateHDFSConfigurations(properties, recommendedDefaults, configurations) +self.assertEquals(validation_problems, expected) + +# TEST CASE: Secure cluster, dfs.http.policy=HTTPS_ONLY, https address defined and non secure properties = { # hdfs-site 'dfs.http.policy': 'HTTPS_ONLY',
[1/2] git commit: AMBARI-7659. Security: clarify Ambari automatic download + use of JCE (dlysnichenko)
Repository: ambari Updated Branches: refs/heads/branch-1.7.0 3a2039166 - 122d0 refs/heads/trunk 0800415ca - 811ea5860 AMBARI-7659. Security: clarify Ambari automatic download + use of JCE (dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/811ea586 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/811ea586 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/811ea586 Branch: refs/heads/trunk Commit: 811ea5860bfd27fb95aa5da04073835188742b89 Parents: 0800415 Author: Lisnichenko Dmitro dlysniche...@hortonworks.com Authored: Mon Oct 6 22:32:14 2014 +0300 Committer: Lisnichenko Dmitro dlysniche...@hortonworks.com Committed: Mon Oct 6 22:55:11 2014 +0300 -- ambari-server/src/main/python/ambari-server.py | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/811ea586/ambari-server/src/main/python/ambari-server.py -- diff --git a/ambari-server/src/main/python/ambari-server.py b/ambari-server/src/main/python/ambari-server.py index 080b4ad..bb2cf75 100755 --- a/ambari-server/src/main/python/ambari-server.py +++ b/ambari-server/src/main/python/ambari-server.py @@ -1807,7 +1807,12 @@ def download_jdk(args): raise FatalException(1, err) jdk_num = str(JDK_INDEX + 1) jdk_num = get_validated_string_input( - [1] - Oracle JDK 1.7\n[2] - Oracle JDK 1.6\n[3] - Custom JDK\n==\nEnter choice ( + jdk_num + ): , + + [1] - Oracle JDK 1.7 + Java Cryptography Extension (JCE) Policy Files 7 + [2] - Oracle JDK 1.6 + Java Cryptography Extension (JCE) Policy Files 6 + [3] - Custom JDK + == + Enter choice ( + jdk_num + ):, jdk_num, ^[123]$, Invalid number., @@ -1840,11 +1845,13 @@ def download_jdk(args): if os.path.exists(dest_file): print JDK already exists, using + dest_file else: - ok = get_YN_input(To download the Oracle JDK you must accept the + ok = get_YN_input(To download the Oracle JDK and the Java Cryptography Extension (JCE) +Policy Files you must accept the license terms found at http://www.oracle.com/technetwork/java/javase/; terms/license/index.html and not accepting will -cancel the Ambari Server setup.\nDo you accept the +cancel the Ambari Server setup and you must install the JDK and JCE +files manually.\nDo you accept the Oracle Binary Code License Agreement [y/n] (y)? , True) if not ok: print 'Exiting...'
[01/10] git commit: AMBARI-7650. RestMetricsPropertyProvider adds Storm metrics to all components (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-alerts-dev 9919b3f4f - cc2d93413 AMBARI-7650. RestMetricsPropertyProvider adds Storm metrics to all components (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a5551b73 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a5551b73 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a5551b73 Branch: refs/heads/branch-alerts-dev Commit: a5551b730b1c5111ae2fd6c1e369edded393323c Parents: 76e3bb4 Author: Andrew Onishuk aonis...@hortonworks.com Authored: Mon Oct 6 19:54:49 2014 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Mon Oct 6 19:54:49 2014 +0300 -- .../internal/StackDefinedPropertyProvider.java | 10 ++ .../metrics/RestMetricsPropertyProvider.java | 19 +-- 2 files changed, 19 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a5551b73/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackDefinedPropertyProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackDefinedPropertyProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackDefinedPropertyProvider.java index 32411e9..4ecc2f0 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackDefinedPropertyProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackDefinedPropertyProvider.java @@ -168,7 +168,8 @@ public class StackDefinedPropertyProvider implements PropertyProvider { pp = getDelegate(m, streamProvider, metricsHostProvider, clusterNamePropertyId, hostNamePropertyId, - componentNamePropertyId, resourceStatePropertyId); + componentNamePropertyId, resourceStatePropertyId, + componentName); } if(pp != null) { additional.add(pp); @@ -292,7 +293,8 @@ public class StackDefinedPropertyProvider implements PropertyProvider { String clusterNamePropertyId, String hostNamePropertyId, String componentNamePropertyId, - String statePropertyId) { + String statePropertyId, + String componentName) { MapString, PropertyInfo metrics = getPropertyInfo(definition); HashMapString, MapString, PropertyInfo componentMetrics = new HashMapString, MapString, PropertyInfo(); @@ -325,13 +327,13 @@ public class StackDefinedPropertyProvider implements PropertyProvider { */ Constructor? ct = clz.getConstructor(Injector.class, Map.class, Map.class, StreamProvider.class, MetricsHostProvider.class, -String.class, String.class, String.class, String.class); +String.class, String.class, String.class, String.class, String.class); Object o = ct.newInstance( injector, definition.getProperties(), componentMetrics, streamProvider, metricsHostProvider, clusterNamePropertyId, hostNamePropertyId, -componentNamePropertyId, statePropertyId); +componentNamePropertyId, statePropertyId, componentName); return PropertyProvider.class.cast(o); } catch (Exception e) { LOG.info(Could not find contructor for type ' + http://git-wip-us.apache.org/repos/asf/ambari/blob/a5551b73/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProvider.java index 48d06b8..e8b054f 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/RestMetricsPropertyProvider.java @@ -77,6 +77,7 @@ public class RestMetricsPropertyProvider extends MetricsProvider { private final String componentNamePropertyId; private final String statePropertyId; private MetricsHostProvider metricsHostProvider; + private final String componentName; private static final String DEFAULT_PORT_PROPERTY = default_port; private static final String PORT_CONFIG_TYPE_PROPERTY =
[03/10] git commit: AMBARI-7649 - Admin : Clean up controllers/ldap API
AMBARI-7649 - Admin : Clean up controllers/ldap API Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1b06b935 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1b06b935 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1b06b935 Branch: refs/heads/branch-alerts-dev Commit: 1b06b93506beb732a6f1380e457f1d1aa1ee2595 Parents: 0e869ff Author: tbeerbower tbeerbo...@hortonworks.com Authored: Mon Oct 6 13:06:36 2014 -0400 Committer: tbeerbower tbeerbo...@hortonworks.com Committed: Mon Oct 6 13:07:00 2014 -0400 -- .../resources/ControllerResourceDefinition.java | 60 .../resources/ResourceInstanceFactoryImpl.java | 6 - .../server/api/services/ControllerService.java | 98 --- .../AbstractControllerResourceProvider.java | 2 - .../internal/ControllerResourceProvider.java| 282 --- .../controller/internal/ControllerType.java | 65 - .../ambari/server/controller/spi/Resource.java | 2 - .../src/main/resources/key_properties.json | 3 - .../src/main/resources/properties.json | 9 - 9 files changed, 527 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1b06b935/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ControllerResourceDefinition.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ControllerResourceDefinition.java b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ControllerResourceDefinition.java deleted file mode 100644 index 55e6502..000 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ControllerResourceDefinition.java +++ /dev/null @@ -1,60 +0,0 @@ -/** - * 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 and - * limitations under the License. - */ -package org.apache.ambari.server.api.resources; - -import java.util.HashSet; -import java.util.Set; - -import org.apache.ambari.server.controller.internal.ControllerType; -import org.apache.ambari.server.controller.spi.Resource; - -/** - * Controller Resource Definition - */ -public class ControllerResourceDefinition extends BaseResourceDefinition { - - private final ControllerType type; - - public ControllerResourceDefinition(ControllerType type) { -super(Resource.Type.Controller); -this.type = type; - } - - @Override - public String getPluralName() { -return controllers; - } - - @Override - public String getSingularName() { -return controller; - } - - @Override - public SetSubResourceDefinition getSubResourceDefinitions() { -final SetSubResourceDefinition subResourceDefinitions = new HashSetSubResourceDefinition(); -if (type != null) { - switch (type) { - case LDAP: -break; - } -} -return subResourceDefinitions; - } - -} http://git-wip-us.apache.org/repos/asf/ambari/blob/1b06b935/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 2676fd3..5bd3710 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 @@ -24,7 +24,6 @@ import java.util.Map; import java.util.Set; import org.apache.ambari.server.api.query.QueryImpl; -import org.apache.ambari.server.controller.internal.ControllerType; import org.apache.ambari.server.controller.spi.Resource; import org.apache.ambari.server.controller.utilities.ClusterControllerHelper; import org.apache.ambari.server.view.ViewRegistry; @@ -271,11 +270,6 @@ public class ResourceInstanceFactoryImpl implements ResourceInstanceFactory { resourceDefinition = new
[06/10] git commit: AMBARI-7643. Jobs view: Input/Output bytes shows up as 0 for some jobs (alejandro)
AMBARI-7643. Jobs view: Input/Output bytes shows up as 0 for some jobs (alejandro) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e40a2188 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e40a2188 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e40a2188 Branch: refs/heads/branch-alerts-dev Commit: e40a2188940909e41c38bd81d5a6072dcc008109 Parents: af9ceed Author: Alejandro Fernandez afernan...@hortonworks.com Authored: Fri Oct 3 19:07:34 2014 -0700 Committer: Alejandro Fernandez afernan...@hortonworks.com Committed: Mon Oct 6 11:46:13 2014 -0700 -- .../src/main/resources/ui/app/scripts/models/jobs/tez_dag.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e40a2188/contrib/views/jobs/src/main/resources/ui/app/scripts/models/jobs/tez_dag.js -- diff --git a/contrib/views/jobs/src/main/resources/ui/app/scripts/models/jobs/tez_dag.js b/contrib/views/jobs/src/main/resources/ui/app/scripts/models/jobs/tez_dag.js index 5797120..b4dec2b 100644 --- a/contrib/views/jobs/src/main/resources/ui/app/scripts/models/jobs/tez_dag.js +++ b/contrib/views/jobs/src/main/resources/ui/app/scripts/models/jobs/tez_dag.js @@ -162,11 +162,11 @@ App.TezDagVertex = DS.Model.extend({ recordWriteCount: DS.attr('number'), totalReadBytes: function () { -return this.get('fileReadBytes') + this.get('hdfsReadBytes'); +return (this.get('fileReadBytes') || 0) + (this.get('hdfsReadBytes') || 0); }.property('fileReadBytes', 'hdfsReadBytes'), totalWriteBytes: function () { -return this.get('fileWriteBytes') + this.get('hdfsWriteBytes'); +return (this.get('fileWriteBytes') || 0) + (this.get('hdfsWriteBytes') || 0); }.property('fileWriteBytes', 'hdfsWriteBytes'), totalReadBytesDisplay: function () {
[02/10] git commit: AMBARI-7652 WebHCat server start fails for HDP2.2 if PIG isn't deployed (dsen)
AMBARI-7652 WebHCat server start fails for HDP2.2 if PIG isn't deployed (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0e869ffb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0e869ffb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0e869ffb Branch: refs/heads/branch-alerts-dev Commit: 0e869ffbfa2ecc7f3485b4ed2241ed1ed3fb28ab Parents: a5551b7 Author: Dmytro Sen d...@hortonworks.com Authored: Mon Oct 6 19:55:05 2014 +0300 Committer: Dmytro Sen d...@hortonworks.com Committed: Mon Oct 6 19:55:34 2014 +0300 -- .../main/resources/stacks/HDP/2.2/services/HIVE/metainfo.xml| 5 + 1 file changed, 5 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0e869ffb/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/metainfo.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/metainfo.xml index 752eac7..892a82e 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/metainfo.xml @@ -64,6 +64,11 @@ /packages /osSpecific /osSpecifics + + requiredServices +servicePIG/service + /requiredServices + /service /services /metainfo
[07/10] git commit: AMBARI-7442 ServiceCheck cannot be run if there is only one stack definition (adenisso via jaoki)
AMBARI-7442 ServiceCheck cannot be run if there is only one stack definition (adenisso via jaoki) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a619219f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a619219f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a619219f Branch: refs/heads/branch-alerts-dev Commit: a619219ff6e9a812ecc283751a5c1f3e12ed182e Parents: e40a218 Author: Jun Aoki ja...@apache.org Authored: Mon Oct 6 11:50:29 2014 -0700 Committer: Jun Aoki ja...@apache.org Committed: Mon Oct 6 11:51:07 2014 -0700 -- .../server/api/util/StackExtensionHelper.java | 14 +- .../api/util/StackExtensionHelperTest.java | 27 +++ .../single_stack/ABC/1.0.0/metainfo.xml | 22 +++ .../ABC/1.0.0/services/HDFS/metainfo.xml| 193 +++ 4 files changed, 251 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a619219f/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java index 1c3f9a7..35ae9a7 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/util/StackExtensionHelper.java @@ -490,11 +490,6 @@ public class StackExtensionHelper { } } -// add action for service check -if(serviceInfo.getCommandScript() != null) { - actionMetadata.addServiceCheckAction(serviceInfo.getName()); -} - } parentStack = currentStackInfo; } @@ -536,6 +531,7 @@ public class StackExtensionHelper { ParserConfigurationException, SAXException, XPathExpressionException, IOException, JAXBException { ListServiceInfo services = new ArrayListServiceInfo(); + File servicesFolder = new File(stackRoot.getAbsolutePath() + File .separator + stackInfo.getName() + File.separator + stackInfo.getVersion() + File.separator + AmbariMetaInfo.SERVICES_FOLDER_NAME); @@ -602,6 +598,14 @@ public class StackExtensionHelper { } stackInfo.getServices().addAll(services); + +// add service check actions from the target stack +for(ServiceInfo serviceInfo : stackInfo.getServices()) { + if(serviceInfo.getCommandScript() != null) { +actionMetadata.addServiceCheckAction(serviceInfo.getName()); + } +} + } http://git-wip-us.apache.org/repos/asf/ambari/blob/a619219f/ambari-server/src/test/java/org/apache/ambari/server/api/util/StackExtensionHelperTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/util/StackExtensionHelperTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/util/StackExtensionHelperTest.java index 7262dfb..84ba6aa 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/api/util/StackExtensionHelperTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/api/util/StackExtensionHelperTest.java @@ -21,6 +21,7 @@ package org.apache.ambari.server.api.util; import com.google.inject.AbstractModule; import com.google.inject.Guice; import com.google.inject.Injector; + import org.apache.ambari.server.api.services.AmbariMetaInfo; import org.apache.ambari.server.metadata.ActionMetadata; import org.apache.ambari.server.state.*; @@ -32,6 +33,7 @@ import javax.xml.bind.JAXBException; import javax.xml.namespace.QName; import javax.xml.parsers.ParserConfigurationException; import javax.xml.xpath.XPathExpressionException; + import java.io.File; import java.io.IOException; import java.util.*; @@ -353,6 +355,31 @@ public class StackExtensionHelperTest { MapString, String supports = config.get(keyword); supports.put(attributeName, value); } + + /** + * This test ensures the service status check is added into the action metadata when + * the stack has no parent and is the only stack in the stack family + * @throws Exception + */ + @Test + public void testGetServiceInfoFromSingleStack() throws Exception { +File stackRoot = new File(./src/test/resources/single_stack.replace(/, File.separator)); +StackExtensionHelper helper = new StackExtensionHelper(injector, stackRoot); +helper.fillInfo(); +ListStackInfo stackInfoList = helper.getAllAvailableStacks(); +assertEquals(1, stackInfoList.size()); + +ListServiceInfo serviceInfoList = helper.getAllApplicableServices(stackInfoList.get(0)); +
[05/10] git commit: AMBARI-7657. Slider View: No items are displayed in Apps table after Clear Filters action. (Max Shepel via akovalenko)
AMBARI-7657. Slider View: No items are displayed in Apps table after Clear Filters action. (Max Shepel via akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/af9ceed0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/af9ceed0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/af9ceed0 Branch: refs/heads/branch-alerts-dev Commit: af9ceed0f62ea58813207c04cc45a72f224b508c Parents: 94d76a4 Author: Aleksandr Kovalenko akovale...@hortonworks.com Authored: Mon Oct 6 21:22:57 2014 +0300 Committer: Aleksandr Kovalenko akovale...@hortonworks.com Committed: Mon Oct 6 21:22:57 2014 +0300 -- .../ui/app/views/common/filter_view.js | 2 +- .../resources/ui/app/views/common/table_view.js | 2 +- .../resources/ui/app/views/slider_apps_view.js | 3 +- .../ui/test/unit/views/slider_apps_view_test.js | 37 4 files changed, 41 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/af9ceed0/contrib/views/slider/src/main/resources/ui/app/views/common/filter_view.js -- diff --git a/contrib/views/slider/src/main/resources/ui/app/views/common/filter_view.js b/contrib/views/slider/src/main/resources/ui/app/views/common/filter_view.js index 2d357e3..64f2413 100644 --- a/contrib/views/slider/src/main/resources/ui/app/views/common/filter_view.js +++ b/contrib/views/slider/src/main/resources/ui/app/views/common/filter_view.js @@ -271,7 +271,7 @@ module.exports = { attributeBindings: ['disabled','multiple'], disabled: false }); -config.emptyValue = Em.I18n.t('any'); +config.emptyValue = config.emptyValue || Em.I18n.t('any'); return wrapperView.extend(config); }, http://git-wip-us.apache.org/repos/asf/ambari/blob/af9ceed0/contrib/views/slider/src/main/resources/ui/app/views/common/table_view.js -- diff --git a/contrib/views/slider/src/main/resources/ui/app/views/common/table_view.js b/contrib/views/slider/src/main/resources/ui/app/views/common/table_view.js index cb78c88..4d5df4a 100644 --- a/contrib/views/slider/src/main/resources/ui/app/views/common/table_view.js +++ b/contrib/views/slider/src/main/resources/ui/app/views/common/table_view.js @@ -356,7 +356,7 @@ App.TableView = Em.View.extend({ var assoc = this.get('colPropAssoc'); if (filterConditions.length) { result = content.filter(function (item) { - var match = true; +var match = true; filterConditions.forEach(function (condition) { var filterFunc = filters.getFilterByType(condition.type, false); if (match condition.value != condition.defaultValue) { http://git-wip-us.apache.org/repos/asf/ambari/blob/af9ceed0/contrib/views/slider/src/main/resources/ui/app/views/slider_apps_view.js -- diff --git a/contrib/views/slider/src/main/resources/ui/app/views/slider_apps_view.js b/contrib/views/slider/src/main/resources/ui/app/views/slider_apps_view.js index 307dad4..787378b 100644 --- a/contrib/views/slider/src/main/resources/ui/app/views/slider_apps_view.js +++ b/contrib/views/slider/src/main/resources/ui/app/views/slider_apps_view.js @@ -120,7 +120,8 @@ App.SliderAppsView = App.TableView.extend({ }.property('parentView.statusList'), onChangeValue: function(){ this.get('parentView').updateFilter(this.get('column'), this.get('value'), 'string', this.get('defaultValue')); -} +}, +emptyValue: 'All Status' }), typeFilterView: filters.createTextView({ http://git-wip-us.apache.org/repos/asf/ambari/blob/af9ceed0/contrib/views/slider/src/main/resources/ui/test/unit/views/slider_apps_view_test.js -- diff --git a/contrib/views/slider/src/main/resources/ui/test/unit/views/slider_apps_view_test.js b/contrib/views/slider/src/main/resources/ui/test/unit/views/slider_apps_view_test.js new file mode 100644 index 000..a3cd020 --- /dev/null +++ b/contrib/views/slider/src/main/resources/ui/test/unit/views/slider_apps_view_test.js @@ -0,0 +1,37 @@ +/** + * 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,
[10/10] git commit: Merge branch 'trunk' into branch-alerts-dev
Merge branch 'trunk' into branch-alerts-dev Conflicts: ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java ambari-server/src/main/resources/key_properties.json ambari-server/src/main/resources/properties.json Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cc2d9341 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cc2d9341 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cc2d9341 Branch: refs/heads/branch-alerts-dev Commit: cc2d9341336218878af81bea0cc8ee7fc2a7d9ec Parents: 9919b3f 811ea58 Author: Jonathan Hurley jhur...@hortonworks.com Authored: Mon Oct 6 16:27:12 2014 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Mon Oct 6 16:27:12 2014 -0400 -- .../resources/ControllerResourceDefinition.java | 60 .../resources/ResourceInstanceFactoryImpl.java | 6 - .../server/api/services/ControllerService.java | 98 --- .../server/api/util/StackExtensionHelper.java | 14 +- .../AbstractControllerResourceProvider.java | 2 - .../internal/ControllerResourceProvider.java| 282 --- .../controller/internal/ControllerType.java | 65 - .../internal/StackDefinedPropertyProvider.java | 10 +- .../metrics/RestMetricsPropertyProvider.java| 19 +- .../ambari/server/controller/spi/Resource.java | 2 - ambari-server/src/main/python/ambari-server.py | 13 +- .../src/main/resources/key_properties.json | 3 - .../src/main/resources/properties.json | 9 - .../stacks/HDP/2.2/services/HIVE/metainfo.xml | 5 + .../stacks/HDP/2.2/services/stack_advisor.py| 5 +- .../api/util/StackExtensionHelperTest.java | 27 ++ .../stacks/2.2/common/test_stack_advisor.py | 137 +++-- .../single_stack/ABC/1.0.0/metainfo.xml | 22 ++ .../ABC/1.0.0/services/HDFS/metainfo.xml| 193 + .../ui/app/scripts/models/jobs/tez_dag.js | 4 +- .../main/resources/ui/app/models/slider_app.js | 16 ++ .../resources/ui/app/templates/slider_apps.hbs | 4 +- .../ui/app/views/common/filter_view.js | 4 +- .../resources/ui/app/views/common/table_view.js | 2 +- .../resources/ui/app/views/slider_apps_view.js | 15 +- .../ui/test/unit/views/slider_apps_view_test.js | 37 +++ 26 files changed, 469 insertions(+), 585 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/cc2d9341/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java -- http://git-wip-us.apache.org/repos/asf/ambari/blob/cc2d9341/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java -- diff --cc ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java index f3f92a1,17df861..5810633 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java @@@ -149,16 -149,8 +149,14 @@@ public abstract class AbstractControlle return new RecommendationResourceProvider(propertyIds, keyPropertyIds, managementController); case Validation: return new ValidationResourceProvider(propertyIds, keyPropertyIds, managementController); + case Alert: +return new AlertResourceProvider(propertyIds, keyPropertyIds, managementController); case AlertDefinition: return new AlertDefinitionResourceProvider(propertyIds, keyPropertyIds, managementController); + case AlertGroup: +return new AlertGroupResourceProvider(propertyIds, keyPropertyIds, managementController); + case AlertTarget: +return new AlertTargetResourceProvider(propertyIds, keyPropertyIds, managementController); - case Controller: - return new ControllerResourceProvider(propertyIds, keyPropertyIds, managementController); case ClientConfig: return new ClientConfigResourceProvider(propertyIds, keyPropertyIds, managementController); default: http://git-wip-us.apache.org/repos/asf/ambari/blob/cc2d9341/ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java -- http://git-wip-us.apache.org/repos/asf/ambari/blob/cc2d9341/ambari-server/src/main/resources/key_properties.json -- diff --cc
[04/10] git commit: AMBARI-7654 Slider View: Apps table start/end time columns not filtering properly and showing GMT. (ababiichuk)
AMBARI-7654 Slider View: Apps table start/end time columns not filtering properly and showing GMT. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/94d76a41 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/94d76a41 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/94d76a41 Branch: refs/heads/branch-alerts-dev Commit: 94d76a41458fc53a9ff8abb35c636c810e8b9010 Parents: 1b06b93 Author: aBabiichuk ababiic...@cybervisiontech.com Authored: Mon Oct 6 20:49:02 2014 +0300 Committer: aBabiichuk ababiic...@cybervisiontech.com Committed: Mon Oct 6 20:54:27 2014 +0300 -- .../src/main/resources/ui/app/models/slider_app.js | 16 .../main/resources/ui/app/templates/slider_apps.hbs | 4 ++-- .../resources/ui/app/views/common/filter_view.js| 2 +- .../main/resources/ui/app/views/slider_apps_view.js | 12 +--- 4 files changed, 20 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/94d76a41/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js -- diff --git a/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js b/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js index 9534d98..e59f931 100644 --- a/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js +++ b/contrib/views/slider/src/main/resources/ui/app/models/slider_app.js @@ -49,11 +49,27 @@ App.SliderApp = DS.Model.extend({ started: DS.attr('number'), /** + * @type {String} + */ + + startedToLocalTime: function () { +return new Date(this.get('started')).toString().replace((FLE Daylight Time),); + }.property('started'), + + /** * @type {number} */ ended: DS.attr('number'), /** + * @type {String} + */ + + endedToLocalTime: function () { +return new Date(this.get('ended')).toString().replace((FLE Daylight Time),); + }.property('ended'), + + /** * @type {App.SliderAppType} */ appType: DS.belongsTo('sliderAppType'), http://git-wip-us.apache.org/repos/asf/ambari/blob/94d76a41/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs -- diff --git a/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs b/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs index 626dfb0..129db30 100644 --- a/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs +++ b/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs @@ -54,9 +54,9 @@ td{{slider.user}}/td - td{{slider.started}}/td + td{{slider.startedToLocalTime}}/td - td{{slider.ended}}/td + td{{slider.endedToLocalTime}}/td {{/view}} {{/each}} http://git-wip-us.apache.org/repos/asf/ambari/blob/94d76a41/contrib/views/slider/src/main/resources/ui/app/views/common/filter_view.js -- diff --git a/contrib/views/slider/src/main/resources/ui/app/views/common/filter_view.js b/contrib/views/slider/src/main/resources/ui/app/views/common/filter_view.js index 3390a44..2d357e3 100644 --- a/contrib/views/slider/src/main/resources/ui/app/views/common/filter_view.js +++ b/contrib/views/slider/src/main/resources/ui/app/views/common/filter_view.js @@ -291,7 +291,7 @@ module.exports = { case 'date': return function (rowValue, rangeExp) { var match = false; - var timePassed = new Date().getTime() - rowValue; + var timePassed = new Date().getTime() - new Date(rowValue).getTime(); switch (rangeExp) { case 'Past 1 hour': match = timePassed = 360; http://git-wip-us.apache.org/repos/asf/ambari/blob/94d76a41/contrib/views/slider/src/main/resources/ui/app/views/slider_apps_view.js -- diff --git a/contrib/views/slider/src/main/resources/ui/app/views/slider_apps_view.js b/contrib/views/slider/src/main/resources/ui/app/views/slider_apps_view.js index fa8ae98..307dad4 100644 --- a/contrib/views/slider/src/main/resources/ui/app/views/slider_apps_view.js +++ b/contrib/views/slider/src/main/resources/ui/app/views/slider_apps_view.js @@ -141,23 +141,13 @@ App.SliderAppsView = App.TableView.extend({ startFilterView: filters.createSelectView({ column: 4, -fieldType: 'filter-input-width', -content: ['', 'Past 1 hour', 'Past 1 Day', 'Past 2 Days', 'Past 7 Days', 'Past 14 Days', 'Past 30 Days', 'Custom'], -onChangeValue: function(){ - this.get('parentView').updateFilter(this.get('column'), this.get('value'),
[09/10] git commit: AMBARI-7659. Security: clarify Ambari automatic download + use of JCE (dlysnichenko)
AMBARI-7659. Security: clarify Ambari automatic download + use of JCE (dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/811ea586 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/811ea586 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/811ea586 Branch: refs/heads/branch-alerts-dev Commit: 811ea5860bfd27fb95aa5da04073835188742b89 Parents: 0800415 Author: Lisnichenko Dmitro dlysniche...@hortonworks.com Authored: Mon Oct 6 22:32:14 2014 +0300 Committer: Lisnichenko Dmitro dlysniche...@hortonworks.com Committed: Mon Oct 6 22:55:11 2014 +0300 -- ambari-server/src/main/python/ambari-server.py | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/811ea586/ambari-server/src/main/python/ambari-server.py -- diff --git a/ambari-server/src/main/python/ambari-server.py b/ambari-server/src/main/python/ambari-server.py index 080b4ad..bb2cf75 100755 --- a/ambari-server/src/main/python/ambari-server.py +++ b/ambari-server/src/main/python/ambari-server.py @@ -1807,7 +1807,12 @@ def download_jdk(args): raise FatalException(1, err) jdk_num = str(JDK_INDEX + 1) jdk_num = get_validated_string_input( - [1] - Oracle JDK 1.7\n[2] - Oracle JDK 1.6\n[3] - Custom JDK\n==\nEnter choice ( + jdk_num + ): , + + [1] - Oracle JDK 1.7 + Java Cryptography Extension (JCE) Policy Files 7 + [2] - Oracle JDK 1.6 + Java Cryptography Extension (JCE) Policy Files 6 + [3] - Custom JDK + == + Enter choice ( + jdk_num + ):, jdk_num, ^[123]$, Invalid number., @@ -1840,11 +1845,13 @@ def download_jdk(args): if os.path.exists(dest_file): print JDK already exists, using + dest_file else: - ok = get_YN_input(To download the Oracle JDK you must accept the + ok = get_YN_input(To download the Oracle JDK and the Java Cryptography Extension (JCE) +Policy Files you must accept the license terms found at http://www.oracle.com/technetwork/java/javase/; terms/license/index.html and not accepting will -cancel the Ambari Server setup.\nDo you accept the +cancel the Ambari Server setup and you must install the JDK and JCE +files manually.\nDo you accept the Oracle Binary Code License Agreement [y/n] (y)? , True) if not ok: print 'Exiting...'
[1/2] git commit: AMBARI-7651. Storm REST API Server not starting on HDP-2.2 (dlysnichenko)
Repository: ambari Updated Branches: refs/heads/branch-1.7.0 122d0 - 522467ea4 refs/heads/trunk 811ea5860 - 0d953b468 AMBARI-7651. Storm REST API Server not starting on HDP-2.2 (dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0d953b46 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0d953b46 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0d953b46 Branch: refs/heads/trunk Commit: 0d953b46868580a99c56d806994ee90cd299d40a Parents: 811ea58 Author: Lisnichenko Dmitro dlysniche...@hortonworks.com Authored: Mon Oct 6 20:08:13 2014 +0300 Committer: Lisnichenko Dmitro dlysniche...@hortonworks.com Committed: Mon Oct 6 23:40:53 2014 +0300 -- .../main/resources/stacks/HDP/2.2/services/STORM/metainfo.xml | 6 ++ ambari-web/app/data/HDP2.2/site_properties.js | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0d953b46/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/metainfo.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/metainfo.xml index 2e8dcd4..f9e1bc9 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/metainfo.xml @@ -23,6 +23,12 @@ nameSTORM/name displayNameStorm/displayName version0.9.3.2.2.0.0/version + components +component + nameSTORM_REST_API/name + deletedtrue/deleted +/component + /components osSpecifics osSpecific osFamilyany/osFamily http://git-wip-us.apache.org/repos/asf/ambari/blob/0d953b46/ambari-web/app/data/HDP2.2/site_properties.js -- diff --git a/ambari-web/app/data/HDP2.2/site_properties.js b/ambari-web/app/data/HDP2.2/site_properties.js index a70f080..3ff1cb8 100644 --- a/ambari-web/app/data/HDP2.2/site_properties.js +++ b/ambari-web/app/data/HDP2.2/site_properties.js @@ -20,7 +20,7 @@ var App = require('app'); var hdp2properties = require('data/HDP2/site_properties').configProperties; var hdp22properties = hdp2properties.filter(function (item){ //In HDP2.2 storm.thrift.transport property is computed on server - return item.name !== 'storm.thrift.transport'; + return item.name !== 'storm.thrift.transport' item.name !== 'storm_rest_api_host'; }); module.exports =
[2/2] git commit: AMBARI-7651. Storm REST API Server not starting on HDP-2.2 (dlysnichenko)
AMBARI-7651. Storm REST API Server not starting on HDP-2.2 (dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/522467ea Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/522467ea Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/522467ea Branch: refs/heads/branch-1.7.0 Commit: 522467ea4dabec7111861d666043a7e2c9ca84cc Parents: 122d111 Author: Lisnichenko Dmitro dlysniche...@hortonworks.com Authored: Mon Oct 6 20:08:13 2014 +0300 Committer: Lisnichenko Dmitro dlysniche...@hortonworks.com Committed: Mon Oct 6 23:41:33 2014 +0300 -- .../main/resources/stacks/HDP/2.2/services/STORM/metainfo.xml | 6 ++ ambari-web/app/data/HDP2.2/site_properties.js | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/522467ea/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/metainfo.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/metainfo.xml index 2e8dcd4..f9e1bc9 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/metainfo.xml @@ -23,6 +23,12 @@ nameSTORM/name displayNameStorm/displayName version0.9.3.2.2.0.0/version + components +component + nameSTORM_REST_API/name + deletedtrue/deleted +/component + /components osSpecifics osSpecific osFamilyany/osFamily http://git-wip-us.apache.org/repos/asf/ambari/blob/522467ea/ambari-web/app/data/HDP2.2/site_properties.js -- diff --git a/ambari-web/app/data/HDP2.2/site_properties.js b/ambari-web/app/data/HDP2.2/site_properties.js index a70f080..3ff1cb8 100644 --- a/ambari-web/app/data/HDP2.2/site_properties.js +++ b/ambari-web/app/data/HDP2.2/site_properties.js @@ -20,7 +20,7 @@ var App = require('app'); var hdp2properties = require('data/HDP2/site_properties').configProperties; var hdp22properties = hdp2properties.filter(function (item){ //In HDP2.2 storm.thrift.transport property is computed on server - return item.name !== 'storm.thrift.transport'; + return item.name !== 'storm.thrift.transport' item.name !== 'storm_rest_api_host'; }); module.exports =
[19/50] [abbrv] git commit: Merge branch 'trunk' into branch-alerts-dev
Merge branch 'trunk' into branch-alerts-dev Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/05da121a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/05da121a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/05da121a Branch: refs/heads/trunk Commit: 05da121a58e5768d0d0eda2527bd127c7355a23a Parents: 1f1059c 813f16c Author: Jonathan Hurley jhur...@hortonworks.com Authored: Wed Sep 10 09:02:43 2014 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Wed Sep 10 09:02:43 2014 -0400 -- .../main/resources/ui/admin-web/app/index.html | 2 + .../resources/ui/admin-web/app/scripts/app.js | 1 + .../controllers/ambariViews/ViewsEditCtrl.js| 8 + .../clusters/ClustersManageAccessCtrl.js| 8 + .../controllers/groups/GroupsEditCtrl.js| 9 + .../scripts/controllers/users/UsersShowCtrl.js | 13 + .../app/scripts/directives/editableList.js | 199 .../ui/admin-web/app/scripts/services/Group.js | 6 + .../ui/admin-web/app/scripts/services/User.js | 7 + .../resources/ui/admin-web/app/styles/main.css | 212 +++- .../admin-web/app/views/ambariViews/edit.html | 29 +- .../app/views/clusters/manageAccess.html| 31 +- .../app/views/directives/editableList.html | 44 ++ .../ui/admin-web/app/views/groups/edit.html | 23 +- .../ui/admin-web/app/views/leftNavbar.html | 8 +- .../ui/admin-web/app/views/users/show.html | 22 +- .../src/main/resources/ui/admin-web/bower.json | 3 +- .../libraries/script/script.py | 23 +- ambari-server/conf/unix/ambari.properties | 3 + .../ambari/server/api/AmbariPersistFilter.java | 1 - .../stackadvisor/StackAdvisorHelper.java| 6 +- .../StackAdvisorRequestException.java | 27 + .../stackadvisor/StackAdvisorRunner.java| 34 +- .../commands/StackAdvisorCommand.java | 14 +- .../server/configuration/Configuration.java | 58 ++- .../server/controller/AmbariHandlerList.java| 43 +- .../controller/AmbariManagementController.java | 16 +- .../AmbariManagementControllerImpl.java | 34 +- .../ambari/server/controller/AmbariServer.java | 52 +- .../server/controller/ControllerModule.java | 69 ++- .../controller/FailsafeServletResponse.java | 22 +- .../internal/ControllerResourceProvider.java| 22 +- .../internal/PrivilegeResourceProvider.java | 6 +- .../RecommendationResourceProvider.java | 9 +- .../internal/ValidationResourceProvider.java| 9 +- .../internal/ViewInstanceResourceProvider.java | 44 +- .../ViewPermissionResourceProvider.java | 8 +- .../internal/ViewPrivilegeResourceProvider.java | 28 +- .../internal/ViewVersionResourceProvider.java | 6 +- .../apache/ambari/server/orm/dao/GroupDAO.java | 30 +- .../apache/ambari/server/orm/dao/MemberDAO.java | 34 +- .../ambari/server/orm/dao/PrincipalDAO.java | 27 +- .../ambari/server/orm/dao/PrincipalTypeDAO.java | 29 +- .../apache/ambari/server/orm/dao/UserDAO.java | 49 +- .../server/orm/entities/MemberEntity.java | 7 +- .../server/orm/entities/PrincipalEntity.java| 2 +- .../ambari/server/orm/entities/UserEntity.java | 5 +- .../ambari/server/orm/entities/ViewEntity.java | 9 + .../server/orm/entities/ViewInstanceEntity.java | 89 .../ambari/server/security/SecurityFilter.java | 2 +- .../AmbariAuthorizationFilter.java | 35 +- .../authorization/AmbariLdapDataPopulator.java | 409 --- .../server/security/authorization/User.java | 2 +- .../server/security/authorization/Users.java| 158 +- .../security/ldap/AmbariLdapDataPopulator.java | 430 .../server/security/ldap/LdapBatchDto.java | 67 +++ .../server/security/ldap/LdapGroupDto.java | 113 + .../server/security/ldap/LdapSyncDto.java | 72 +++ .../server/security/ldap/LdapUserDto.java | 133 + .../security/ldap/LdapUserGroupMemberDto.java | 82 +++ .../ambari/server/state/ConfigHelper.java | 3 +- .../apache/ambari/server/view/ViewRegistry.java | 4 + ambari-server/src/main/python/ambari-server.py | 6 +- .../src/main/resources/META-INF/persistence.xml | 4 + .../src/main/resources/scripts/stack_advisor.py | 8 +- .../1.3.2/hooks/before-START/scripts/params.py | 23 +- .../HDFS/package/scripts/hdfs_client.py | 6 + .../services/HDFS/package/scripts/params.py | 16 +- .../MAPREDUCE/configuration/mapred-env.xml | 20 + .../MAPREDUCE/package/scripts/client.py | 7 + .../MAPREDUCE/package/scripts/params.py | 13 + .../HDP/1.3.2/services/SQOOP/metainfo.xml | 2 +- .../stacks/HDP/1.3.2/services/stack_advisor.py | 19 +- .../2.0.6/services/HIVE/package/scripts/hcat.py | 2 +-
[01/50] [abbrv] git commit: Merge branch 'trunk' into branch-alerts-dev
Repository: ambari Updated Branches: refs/heads/trunk 0d953b468 - 80bceaf3a Merge branch 'trunk' into branch-alerts-dev Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6ba11a2a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6ba11a2a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6ba11a2a Branch: refs/heads/trunk Commit: 6ba11a2a94d1646a08bf49215e6776870302325e Parents: 7bb0194 3c13f40 Author: Jonathan Hurley jhur...@hortonworks.com Authored: Mon Aug 25 08:31:55 2014 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Mon Aug 25 08:31:55 2014 -0400 -- .../scripts/controllers/users/UsersShowCtrl.js | 65 +++-- .../ui/admin-web/app/scripts/services/User.js | 3 +- .../resources/ui/admin-web/app/styles/main.css | 12 +- .../admin-web/app/views/ambariViews/create.html | 6 +- .../admin-web/app/views/ambariViews/edit.html | 95 .../admin-web/app/views/ambariViews/list.html | 81 --- .../app/views/ambariViews/listTable.html| 2 +- .../app/views/clusters/manageAccess.html| 75 +++--- .../ui/admin-web/app/views/groups/list.html | 10 +- .../ui/admin-web/app/views/users/show.html | 2 +- ambari-admin/src/main/resources/view.xml| 1 + .../libraries/providers/hdfs_directory.py | 2 +- .../api/services/ConfigurationService.java | 2 +- .../server/api/util/StackExtensionHelper.java | 69 -- .../server/configuration/Configuration.java | 8 - .../server/controller/AmbariHandlerList.java| 151 .../ambari/server/controller/AmbariServer.java | 13 +- .../server/controller/ControllerModule.java | 2 + .../server/controller/FailsafeHandlerList.java | 40 +++- .../internal/ClientConfigResourceProvider.java | 2 +- .../internal/ConfigGroupResourceProvider.java | 26 +- .../internal/ViewInstanceResourceProvider.java | 6 +- .../ambari/server/orm/dao/PrincipalDAO.java | 16 +- .../apache/ambari/server/orm/dao/RoleDAO.java | 69 -- .../ambari/server/orm/dao/ServiceConfigDAO.java | 9 +- .../apache/ambari/server/orm/dao/UserDAO.java | 8 - .../server/orm/entities/ConfigGroupEntity.java | 11 + .../server/orm/entities/PrincipalEntity.java| 5 + .../ambari/server/orm/entities/RoleEntity.java | 70 -- .../ambari/server/orm/entities/UserEntity.java | 11 - .../server/orm/entities/ViewInstanceEntity.java | 20 ++ .../AmbariLdapAuthoritiesPopulator.java | 134 +-- .../AmbariLocalUserDetailsService.java | 8 +- .../server/security/authorization/User.java | 9 - .../server/security/authorization/Users.java| 147 +--- .../internal/InternalAuthenticationToken.java | 30 ++- .../server/state/cluster/ClusterImpl.java | 8 +- .../server/state/configgroup/ConfigGroup.java | 4 + .../state/configgroup/ConfigGroupImpl.java | 21 ++ .../server/upgrade/UpgradeCatalog170.java | 56 +++-- .../server/view/ViewInstanceHandlerList.java| 43 .../apache/ambari/server/view/ViewRegistry.java | 58 ++--- .../main/resources/Ambari-DDL-MySQL-CREATE.sql | 16 +- .../main/resources/Ambari-DDL-Oracle-CREATE.sql | 16 +- .../resources/Ambari-DDL-Postgres-CREATE.sql| 18 +- .../Ambari-DDL-Postgres-EMBEDDED-CREATE.sql | 20 +- .../src/main/resources/META-INF/persistence.xml | 1 - .../services/HBASE/package/scripts/params.py| 1 + .../HDFS/package/scripts/hdfs_namenode.py | 2 +- .../services/HDFS/package/scripts/params.py | 1 + .../HIVE/package/scripts/hcat_service_check.py | 27 ++- .../services/HIVE/package/scripts/params.py | 1 + .../MAPREDUCE/configuration/core-site.xml | 20 -- .../MAPREDUCE/package/scripts/params.py | 1 + .../services/OOZIE/package/scripts/params.py| 1 + .../services/WEBHCAT/package/scripts/params.py | 1 + .../services/HBASE/package/scripts/params.py| 1 + .../HDFS/package/scripts/hdfs_namenode.py | 2 +- .../services/HDFS/package/scripts/params.py | 1 + .../HIVE/package/scripts/hcat_service_check.py | 27 ++- .../HIVE/package/scripts/install_jars.py| 2 +- .../services/HIVE/package/scripts/params.py | 1 + .../services/OOZIE/package/scripts/params.py| 1 + .../services/PIG/package/scripts/params.py | 1 + .../services/WEBHCAT/package/scripts/params.py | 1 + .../services/WEBHCAT/package/scripts/webhcat.py | 2 +- .../YARN/configuration-mapred/core-site.xml | 20 -- .../services/YARN/configuration/core-site.xml | 20 -- .../services/YARN/package/scripts/params.py | 1 + .../services/FALCON/package/scripts/params.py | 1 + .../services/YARN/package/scripts/params.py | 1 + .../services/FALCON/package/scripts/params.py | 1 +
[02/50] [abbrv] AMBARI-7021 - Alerts: Create Group and Target REST Endpoints (jonathanhurley)
http://git-wip-us.apache.org/repos/asf/ambari/blob/4a4644b8/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProviderTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProviderTest.java new file mode 100644 index 000..982dd4b --- /dev/null +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProviderTest.java @@ -0,0 +1,290 @@ +/** + * 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 and + * limitations under the License. + */ +package org.apache.ambari.server.controller.internal; + +import static org.easymock.EasyMock.capture; +import static org.easymock.EasyMock.createMock; +import static org.easymock.EasyMock.createStrictMock; +import static org.easymock.EasyMock.expect; +import static org.easymock.EasyMock.expectLastCall; +import static org.easymock.EasyMock.replay; +import static org.easymock.EasyMock.resetToStrict; +import static org.easymock.EasyMock.verify; +import static org.junit.Assert.assertEquals; + +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.apache.ambari.server.controller.AmbariManagementController; +import org.apache.ambari.server.controller.spi.Predicate; +import org.apache.ambari.server.controller.spi.Request; +import org.apache.ambari.server.controller.spi.Resource; +import org.apache.ambari.server.controller.utilities.PredicateBuilder; +import org.apache.ambari.server.controller.utilities.PropertyHelper; +import org.apache.ambari.server.metadata.ActionMetadata; +import org.apache.ambari.server.orm.InMemoryDefaultTestModule; +import org.apache.ambari.server.orm.dao.AlertDispatchDAO; +import org.apache.ambari.server.orm.entities.AlertTargetEntity; +import org.apache.ambari.server.state.Cluster; +import org.apache.ambari.server.state.Clusters; +import org.apache.ambari.server.state.alert.TargetType; +import org.easymock.Capture; +import org.easymock.EasyMock; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +import com.google.inject.Binder; +import com.google.inject.Guice; +import com.google.inject.Injector; +import com.google.inject.Module; +import com.google.inject.util.Modules; + +/** + * {@link AlertTargetResourceProvider} tests. + */ +public class AlertTargetResourceProviderTest { + + private static final Long ALERT_TARGET_ID = Long.valueOf(28); + private static final String ALERT_TARGET_NAME = The Administrators; + private static final String ALERT_TARGET_DESC = Admins and Others; + private static final String ALERT_TARGET_TYPE = TargetType.EMAIL.name(); + + private AlertDispatchDAO m_dao; + private Injector m_injector; + + @Before + public void before() { +m_dao = createStrictMock(AlertDispatchDAO.class); + +m_injector = Guice.createInjector(Modules.override( +new InMemoryDefaultTestModule()).with(new MockModule())); + +AlertTargetResourceProvider.init(m_injector); + } + + /** + * @throws Exception + */ + @Test + public void testGetResourcesNoPredicate() throws Exception { +Request request = PropertyHelper.getReadRequest( +AlertTargetResourceProvider.ALERT_TARGET_DESCRIPTION, +AlertTargetResourceProvider.ALERT_TARGET_ID, +AlertTargetResourceProvider.ALERT_TARGET_NAME, +AlertTargetResourceProvider.ALERT_TARGET_NOTIFICATION_TYPE); + +expect(m_dao.findAllTargets()).andReturn(getMockEntities()); +replay(m_dao); + +AmbariManagementController amc = createMock(AmbariManagementController.class); +AlertTargetResourceProvider provider = createProvider(amc); +SetResource results = provider.getResources(request, null); + +assertEquals(1, results.size()); + +Resource r = results.iterator().next(); +Assert.assertEquals(ALERT_TARGET_NAME, +r.getPropertyValue(AlertTargetResourceProvider.ALERT_TARGET_NAME)); + +verify(m_dao); + } + + /** + * @throws Exception + */ + @Test + public void
[05/50] [abbrv] git commit: AMBARI-7051 - Alerts: Expose Creation and Updating of Group Targets Definitions (jonathanhurley)
AMBARI-7051 - Alerts: Expose Creation and Updating of Group Targets Definitions (jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/76fc94ec Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/76fc94ec Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/76fc94ec Branch: refs/heads/trunk Commit: 76fc94ec1ab6ee904e0efa254c19521a201c06d4 Parents: ae8f1e7 Author: Jonathan Hurley jhur...@hortonworks.com Authored: Wed Aug 27 21:07:43 2014 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Thu Aug 28 09:38:28 2014 -0400 -- .../python/ambari_agent/alerts/base_alert.py| 45 ++- .../python/ambari_agent/alerts/port_alert.py| 42 +-- .../server/api/services/AlertGroupService.java | 10 + .../controller/AlertDefinitionResponse.java | 143 + .../internal/AlertGroupResourceProvider.java| 144 - .../server/orm/dao/AlertDefinitionDAO.java | 16 + .../ambari/server/orm/dao/AlertDispatchDAO.java | 18 +- .../orm/entities/AlertDefinitionEntity.java | 37 ++- .../server/orm/entities/AlertGroupEntity.java | 56 +++- .../server/orm/entities/AlertTargetEntity.java | 3 +- .../ambari/server/state/alert/AlertTarget.java | 37 ++- .../AlertGroupResourceProviderTest.java | 295 +++ .../AlertTargetResourceProviderTest.java| 2 +- .../server/orm/dao/AlertDefinitionDAOTest.java | 18 +- .../server/orm/dao/AlertDispatchDAOTest.java| 53 ++-- 15 files changed, 773 insertions(+), 146 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/76fc94ec/ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py b/ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py index 88c7f92..bf8ada6 100644 --- a/ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py +++ b/ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py @@ -34,7 +34,7 @@ class BaseAlert(object): self.alert_meta = alert_meta self.alert_source_meta = alert_source_meta self.cluster = '' -self.hostName = '' +self.host_name = '' self._lookup_keys = [] @@ -54,7 +54,7 @@ class BaseAlert(object): def set_cluster(self, cluster, host): ''' sets cluster information for the alert ''' self.cluster = cluster -self.hostName = host +self.host_name = host def collect(self): ''' method used for collection. defers to _collect() ''' @@ -123,4 +123,43 @@ class BaseAlert(object): res[0] = the result code res[1] = the list of arguments supplied to the reporting text for the result code ''' -raise NotImplementedError \ No newline at end of file +raise NotImplementedError + + ''' + See RFC3986, Appendix B + Tested on the following cases: +192.168.54.1 +192.168.54.2:7661 +hdfs://192.168.54.3/foo/bar +ftp://192.168.54.4:7842/foo/bar; + +Returns None if only a port is passsed in + ''' + @staticmethod + def get_host_from_url(uri): +# RFC3986, Appendix B +parts = re.findall('^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?', uri) + +# index of parts +# scheme= 1 +# authority = 3 +# path = 4 +# query = 6 +# fragment = 8 + +host_and_port = uri +if 0 == len(parts[0][1]): + host_and_port = parts[0][4] +elif 0 == len(parts[0][2]): + host_and_port = parts[0][1] +elif parts[0][2].startswith(//): + host_and_port = parts[0][3] + +if -1 == host_and_port.find(':'): + # if no : then it might only be a port; if it's a port, return this host + if host_and_port.isdigit(): +return None + + return host_and_port +else: + return host_and_port.split(':')[0] http://git-wip-us.apache.org/repos/asf/ambari/blob/76fc94ec/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py b/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py index eaf744a..1d34410 100644 --- a/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py +++ b/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py @@ -39,9 +39,11 @@ class PortAlert(BaseAlert): def _collect(self): urivalue = self._lookup_property_value(self.uri) -host = get_host_from_url(self, urivalue) port = self.port - +host = BaseAlert.get_host_from_url(urivalue) +if host is None: + host = self.host_name + try: port = int(get_port_from_url(urivalue)) except: @@ -67,39 +69,3 @@ class
[08/50] [abbrv] git commit: Merge branch 'trunk' into branch-alerts-dev
Merge branch 'trunk' into branch-alerts-dev Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c13730a0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c13730a0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c13730a0 Branch: refs/heads/trunk Commit: c13730a065646ba404c91f0f06819c71d669ebe7 Parents: 2f5c78e 866f5b2 Author: Jonathan Hurley jhur...@hortonworks.com Authored: Mon Sep 1 07:39:49 2014 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Mon Sep 1 07:39:49 2014 -0400 -- .../ambariViews/CreateViewInstanceCtrl.js | 5 +- .../controllers/ambariViews/ViewsListCtrl.js| 6 +- .../controllers/groups/GroupsCreateCtrl.js | 1 + .../controllers/users/UsersCreateCtrl.js| 1 + .../scripts/controllers/users/UsersShowCtrl.js | 21 +- .../admin-web/app/scripts/services/uiAlert.js | 21 +- .../app/views/ambariViews/listTable.html| 3 + .../ui/admin-web/app/views/leftNavbar.html | 2 +- ambari-client/groovy-client/pom.xml | 4 + .../ambari/groovy/client/AmbariClient.groovy| 506 +-- .../client/InvalidBlueprintException.groovy | 28 + .../InvalidHostGroupHostAssociation.groovy | 39 ++ .../resources/blueprints/hdp-multinode-default | 182 +++ .../resources/blueprints/hdp-singlenode-default | 133 + .../resources/blueprints/lambda-architecture| 8 +- .../resources/blueprints/multi-node-hdfs-yarn | 4 +- .../resources/blueprints/single-node-hdfs-yarn | 2 +- .../groovy/client/AmbariBlueprintsTest.groovy | 95 .../ambari/groovy/client/AmbariHostsTest.groovy | 34 +- .../groovy/client/AmbariRecommendTest.groovy| 150 ++ .../groovy/client/AmbariServicesTest.groovy | 63 +++ .../ambari/groovy/client/TestResources.groovy | 2 + .../src/test/resources/blueprint-config.json| 61 +++ .../test/resources/hdp-multinode-default.json | 200 .../test/resources/hdp-multinode-default2.json | 164 ++ .../resources/multi-node-hdfs-yarn-config.json | 89 .../test/resources/multi-node-hdfs-yarn.json| 83 +++ .../server/api/handlers/DeleteHandler.java | 9 +- .../controller/AmbariActionExecutionHelper.java | 4 +- .../AmbariManagementControllerImpl.java | 12 +- .../controller/MaintenanceStateHelper.java | 49 +- .../internal/ComponentResourceProvider.java | 2 - .../internal/ConfigGroupResourceProvider.java | 2 +- .../internal/HostResourceProvider.java | 12 +- .../internal/ServiceResourceProvider.java | 12 +- .../controller/jmx/JMXPropertyProvider.java | 81 ++- .../orm/dao/ConfigGroupHostMappingDAO.java | 2 + .../apache/ambari/server/state/ConfigImpl.java | 17 +- .../server/state/cluster/ClusterImpl.java | 52 +- .../state/configgroup/ConfigGroupImpl.java | 41 +- .../HIVE/package/scripts/hive_client.py | 3 +- .../HIVE/package/scripts/hive_metastore.py | 3 +- .../HIVE/package/scripts/hive_server.py | 3 +- .../HIVE/package/scripts/mysql_server.py| 4 +- .../services/HIVE/package/scripts/params.py | 10 + .../resources/stacks/HDP/2.1/repos/repoinfo.xml | 14 +- .../server/api/handlers/DeleteHandlerTest.java | 36 +- .../controller/MaintenanceStateHelperTest.java | 34 +- .../controller/jmx/JMXPropertyProviderTest.java | 49 +- .../server/state/cluster/ClusterTest.java | 122 - .../ambari/server/state/host/HostTest.java | 8 - .../HDP/0.1/services/MAPREDUCE/metainfo.xml | 6 + .../ambari/shell/commands/BasicCommands.java| 74 --- .../ambari/shell/commands/ClusterCommands.java | 3 +- .../ambari/shell/commands/ServiceCommands.java | 155 ++ .../apache/ambari/shell/completion/Service.java | 31 ++ .../configuration/ConverterConfiguration.java | 6 + .../shell/converter/ServiceConverter.java | 55 ++ .../ambari/shell/flash/InstallProgress.java | 2 +- .../shell/commands/ClusterCommandsTest.java | 5 +- .../shell/commands/ServiceCommandsTest.java | 70 +++ ambari-web/app/assets/licenses/NOTICE.txt | 4 +- ambari-web/app/config.js| 2 +- .../nameNode/step5_controller.js| 26 +- .../nameNode/step9_controller.js| 8 +- .../highAvailability/progress_controller.js | 23 + .../resourceManager/step4_controller.js | 11 +- .../security/security_progress_controller.js| 45 +- ambari-web/app/controllers/main/host/details.js | 22 +- ambari-web/app/controllers/main/service.js | 134 +++-- .../controllers/main/service/info/configs.js| 77 +-- .../main/service/reassign/step4_controller.js | 73 ++- .../app/controllers/wizard/step4_controller.js | 4 +- .../app/controllers/wizard/step6_controller.js | 22
[24/50] [abbrv] git commit: Merge branch 'trunk' into branch-alerts-dev
Merge branch 'trunk' into branch-alerts-dev Conflicts: ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/17b8e799 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/17b8e799 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/17b8e799 Branch: refs/heads/trunk Commit: 17b8e799048b96c7fb1074a21c52e2e7ecaaf607 Parents: 760bedf bd04a28 Author: Jonathan Hurley jhur...@hortonworks.com Authored: Tue Sep 16 08:50:14 2014 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Tue Sep 16 08:50:14 2014 -0400 -- .../ui/admin-web/app/views/leftNavbar.html | 2 +- ambari-agent/src/main/package/rpm/preremove.sh | 2 +- .../ambari_agent/TestActualConfigHandler.py | 6 +- .../test/python/ambari_agent/TestLiveStatus.py | 4 +- .../TestExecuteHadoopResource.py| 37 ++- ambari-server/docs/api/v1/services.md | 7 - .../stackadvisor/StackAdvisorRunner.java| 10 +- .../server/controller/AmbariHandlerList.java| 33 +- .../AmbariPrivilegeResourceProvider.java| 2 +- .../internal/BaseBlueprintProcessor.java| 2 +- .../BlueprintConfigurationProcessor.java| 30 +- .../RecommendationResourceProvider.java | 6 +- .../internal/ValidationResourceProvider.java| 6 +- .../internal/ViewInstanceResourceProvider.java | 10 +- .../ViewPermissionResourceProvider.java | 4 +- .../internal/ViewPrivilegeResourceProvider.java | 8 +- .../ambari/server/metadata/ActionMetadata.java | 1 - .../ambari/server/orm/entities/ViewEntity.java | 8 +- .../org/apache/ambari/server/state/Service.java | 8 +- .../server/upgrade/UpgradeCatalog170.java | 142 +++- .../apache/ambari/server/view/ViewRegistry.java | 10 +- ambari-server/src/main/package/rpm/preremove.sh | 2 +- .../custom_actions/validate_configs.py | 2 - .../scripts/shared_initialization.py| 3 +- .../stacks/HDP/1.3.2/role_command_order.json| 4 +- .../services/HIVE/configuration/webhcat-env.xml | 54 +++ .../HIVE/configuration/webhcat-site.xml | 156 + .../stacks/HDP/1.3.2/services/HIVE/metainfo.xml | 154 + .../HIVE/package/files/templetonSmoke.sh| 96 ++ .../services/HIVE/package/scripts/params.py | 31 +- .../HIVE/package/scripts/service_check.py | 2 + .../HIVE/package/scripts/status_params.py | 3 + .../services/HIVE/package/scripts/webhcat.py| 107 ++ .../HIVE/package/scripts/webhcat_server.py | 53 +++ .../HIVE/package/scripts/webhcat_service.py | 40 +++ .../package/scripts/webhcat_service_check.py| 42 +++ .../HDP/1.3.2/services/NAGIOS/metainfo.xml | 2 +- .../templates/hadoop-servicegroups.cfg.j2 | 6 - .../package/templates/hadoop-services.cfg.j2| 2 +- .../WEBHCAT/configuration/webhcat-env.xml | 54 --- .../WEBHCAT/configuration/webhcat-site.xml | 156 - .../HDP/1.3.2/services/WEBHCAT/metainfo.xml | 103 -- .../WEBHCAT/package/files/templetonSmoke.sh | 96 -- .../WEBHCAT/package/scripts/__init__.py | 20 -- .../services/WEBHCAT/package/scripts/params.py | 78 - .../WEBHCAT/package/scripts/service_check.py| 44 --- .../WEBHCAT/package/scripts/status_params.py| 26 -- .../services/WEBHCAT/package/scripts/webhcat.py | 107 -- .../WEBHCAT/package/scripts/webhcat_server.py | 53 --- .../WEBHCAT/package/scripts/webhcat_service.py | 40 --- .../stacks/HDP/1.3/role_command_order.json | 4 +- .../stacks/HDP/1.3/services/HIVE/metainfo.xml | 5 - .../services/HDFS/configuration/core-site.xml | 9 + .../scripts/shared_initialization.py| 3 +- .../stacks/HDP/2.0.6/role_command_order.json| 4 +- .../services/HDFS/configuration/core-site.xml | 10 + .../services/HIVE/configuration/webhcat-env.xml | 54 +++ .../HIVE/configuration/webhcat-site.xml | 138 .../stacks/HDP/2.0.6/services/HIVE/metainfo.xml | 165 +- .../HIVE/package/files/templetonSmoke.sh| 96 ++ .../services/HIVE/package/scripts/params.py | 44 ++- .../HIVE/package/scripts/service_check.py | 2 + .../HIVE/package/scripts/status_params.py | 1 + .../services/HIVE/package/scripts/webhcat.py| 112 +++ .../HIVE/package/scripts/webhcat_server.py | 53 +++ .../HIVE/package/scripts/webhcat_service.py | 40 +++ .../package/scripts/webhcat_service_check.py| 41 +++ .../HDP/2.0.6/services/NAGIOS/metainfo.xml | 2 +- .../templates/hadoop-servicegroups.cfg.j2 | 8 +-
[07/50] [abbrv] git commit: AMBARI-7094 - Alerts: Implement Property Updates for Alert Targets (jonathanhurley)
AMBARI-7094 - Alerts: Implement Property Updates for Alert Targets (jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2f5c78e7 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2f5c78e7 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2f5c78e7 Branch: refs/heads/trunk Commit: 2f5c78e7f90f575ab2c469da1095eaa5d252d872 Parents: 52d1af7 Author: Jonathan Hurley jhur...@hortonworks.com Authored: Sun Aug 31 08:25:14 2014 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Sun Aug 31 08:25:14 2014 -0400 -- .../resources/AlertDefResourceDefinition.java | 3 - .../server/api/services/AlertTargetService.java | 10 ++ .../services/parsers/JsonRequestBodyParser.java | 14 +- .../internal/AlertTargetResourceProvider.java | 134 -- .../ambari/server/state/ConfigFactory.java | 2 - .../ambari/server/state/alert/AlertTarget.java | 10 +- .../AlertTargetResourceProviderTest.java| 140 +-- 7 files changed, 249 insertions(+), 64 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2f5c78e7/ambari-server/src/main/java/org/apache/ambari/server/api/resources/AlertDefResourceDefinition.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/AlertDefResourceDefinition.java b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/AlertDefResourceDefinition.java index 1a63097..66e5a83 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/AlertDefResourceDefinition.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/AlertDefResourceDefinition.java @@ -21,8 +21,6 @@ import org.apache.ambari.server.controller.spi.Resource; /** * Resource Definition for AlertDefinition types. - * @author ncole - * */ public class AlertDefResourceDefinition extends BaseResourceDefinition { @@ -32,7 +30,6 @@ public class AlertDefResourceDefinition extends BaseResourceDefinition { @Override public String getPluralName() { -// TODO Auto-generated method stub return alert_definitions; } http://git-wip-us.apache.org/repos/asf/ambari/blob/2f5c78e7/ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertTargetService.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertTargetService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertTargetService.java index 86281b3..2a2ecdf 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertTargetService.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertTargetService.java @@ -23,6 +23,7 @@ import java.util.Map; import javax.ws.rs.DELETE; import javax.ws.rs.GET; import javax.ws.rs.POST; +import javax.ws.rs.PUT; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; @@ -67,6 +68,15 @@ public class AlertTargetService extends BaseService { createAlertTargetResource(null)); } + @PUT + @Produces(text/plain) + @Path({targetId}) + public Response updateGroup(String body, @Context HttpHeaders headers, + @Context UriInfo ui, @PathParam(targetId) Long targetId) { +return handleRequest(headers, body, ui, Request.Type.PUT, +createAlertTargetResource(targetId)); + } + @DELETE @Produces(text/plain) @Path({targetId}) http://git-wip-us.apache.org/repos/asf/ambari/blob/2f5c78e7/ambari-server/src/main/java/org/apache/ambari/server/api/services/parsers/JsonRequestBodyParser.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/parsers/JsonRequestBodyParser.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/parsers/JsonRequestBodyParser.java index 59dd1af..bbe7647 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/parsers/JsonRequestBodyParser.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/parsers/JsonRequestBodyParser.java @@ -18,6 +18,15 @@ package org.apache.ambari.server.api.services.parsers; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + import org.apache.ambari.server.api.services.NamedPropertySet; import org.apache.ambari.server.api.services.RequestBody; import org.apache.ambari.server.controller.utilities.PropertyHelper; @@ -26,9 +35,6 @@ import
[20/50] [abbrv] git commit: Merge branch 'trunk' into branch-alerts-dev
Merge branch 'trunk' into branch-alerts-dev Conflicts: ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2262400c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2262400c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2262400c Branch: refs/heads/trunk Commit: 2262400c6057aec451027f432b83f2c88ac1d8c3 Parents: 05da121 3035978 Author: Jonathan Hurley jhur...@hortonworks.com Authored: Thu Sep 11 15:02:05 2014 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Thu Sep 11 15:02:05 2014 -0400 -- .../ui/admin-web/app/scripts/services/View.js | 6 +- .../app/views/ambariViews/listTable.html| 2 +- ambari-server/conf/unix/ambari.properties | 1 + .../server/api/services/ComponentService.java | 5 +- .../api/services/HostComponentService.java | 5 +- .../server/configuration/Configuration.java | 4 + .../controller/RequestStatusResponse.java | 12 + .../internal/AbstractResourceProvider.java | 3 + .../AmbariPrivilegeResourceProvider.java| 8 +- .../internal/BaseBlueprintProcessor.java| 7 +- .../internal/ClientConfigResourceProvider.java | 5 +- .../internal/ClusterResourceProvider.java | 17 +- .../internal/ServiceResourceProvider.java | 14 +- .../internal/ViewVersionResourceProvider.java | 3 + .../server/orm/entities/AlertCurrentEntity.java | 19 ++ .../ambari/server/orm/entities/ViewEntity.java | 29 +- .../server/upgrade/UpgradeCatalog161.java | 2 +- .../server/upgrade/UpgradeCatalog170.java | 86 ++ .../server/view/configuration/ViewConfig.java | 14 + ambari-server/src/main/python/bootstrap.py | 24 +- .../main/resources/Ambari-DDL-MySQL-CREATE.sql | 3 +- .../main/resources/Ambari-DDL-Oracle-CREATE.sql | 3 +- .../resources/Ambari-DDL-Postgres-CREATE.sql| 3 +- .../Ambari-DDL-Postgres-EMBEDDED-CREATE.sql | 3 +- .../services/HIVE/package/scripts/params.py | 6 +- .../services/OOZIE/package/scripts/oozie.py | 2 +- .../OOZIE/package/scripts/oozie_service.py | 2 +- .../services/OOZIE/package/scripts/params.py| 10 + .../2.1.GlusterFS/services/STORM/metainfo.xml | 5 + .../2.1.GlusterFS/services/YARN/metainfo.xml| 1 + .../AmbariPrivilegeResourceProviderTest.java| 1 + .../internal/BlueprintResourceProviderTest.java | 15 + .../ClientConfigResourceProviderTest.java | 16 +- .../internal/ClusterResourceProviderTest.java | 239 --- .../internal/RequestResourceProviderTest.java | 16 +- .../internal/ServiceResourceProviderTest.java | 122 +++- .../server/orm/entities/ViewEntityTest.java | 11 + .../server/upgrade/UpgradeCatalog161Test.java | 2 +- .../server/upgrade/UpgradeCatalog170Test.java | 49 +++- .../view/configuration/ViewConfigTest.java | 23 ++ ambari-server/src/test/python/TestBootstrap.py | 29 +- ambari-web/app/app.js | 3 + .../app/controllers/wizard/step5_controller.js | 2 +- .../app/controllers/wizard/step6_controller.js | 2 +- .../app/controllers/wizard/step8_controller.js | 2 +- ambari-web/app/data/HDP2/config_mapping.js | 4 +- ambari-web/app/data/config_mapping.js | 4 +- ambari-web/app/data/site_properties.js | 2 +- ambari-web/app/styles/application.less | 9 +- .../common/configs/config_history_flow.hbs | 12 +- .../main/dashboard/widgets/cluster_metrics.hbs | 2 +- .../main/dashboard/widgets/hbase_links.hbs | 2 +- .../main/dashboard/widgets/hdfs_links.hbs | 2 +- .../main/dashboard/widgets/mapreduce_links.hbs | 2 +- .../main/dashboard/widgets/mapreduce_slots.hbs | 2 +- .../main/dashboard/widgets/pie_chart.hbs| 2 +- .../main/dashboard/widgets/simple_text.hbs | 2 +- .../templates/main/dashboard/widgets/uptime.hbs | 2 +- ambari-web/app/utils/config.js | 19 +- .../views/common/configs/config_history_flow.js | 5 + ambari-web/app/views/main/dashboard/widget.js | 4 +- ambari-web/app/views/main/dashboard/widgets.js | 14 + ambari-web/vendor/scripts/jquery.hoverIntent.js | 115 contrib/views/slider/pom.xml| 8 - .../view/slider/SliderAppsViewController.java | 5 + .../slider/SliderAppsViewControllerImpl.java| 262 + .../apache/ambari/view/slider/ViewStatus.java | 33 +-- .../view/slider/clients/AmbariClient.java | 3 - .../slider/clients/AmbariInternalClient.java| 292 --- .../slider/rest/client/JMXMetricHolder.java | 50 .../slider/rest/client/SliderAppJmxHelper.java | 1 - .../resources/ui/app/assets/data/apps/apps.json | 16 +-
[36/50] [abbrv] git commit: Merge branch 'trunk' into branch-alerts-dev
Merge branch 'trunk' into branch-alerts-dev Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/24483521 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/24483521 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/24483521 Branch: refs/heads/trunk Commit: 24483521f96f395b61b786e12c444901c90073c7 Parents: ae9bf4c 7d6731b Author: Jonathan Hurley jhur...@hortonworks.com Authored: Wed Sep 24 13:50:41 2014 -0700 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Wed Sep 24 13:50:41 2014 -0700 -- .../TestExecuteHadoopResource.py| 14 +- .../libraries/resources/execute_hadoop.py |2 +- .../server/configuration/Configuration.java | 14 +- .../BlueprintConfigurationProcessor.java| 28 +- .../ambari/server/orm/dao/PermissionDAO.java| 25 +- .../server/security/authorization/Users.java| 24 +- .../server/upgrade/UpgradeCatalog170.java | 33 + ambari-server/src/main/python/ambari-server.py | 14 +- .../services/HBASE/package/scripts/params.py|3 +- .../HBASE/package/scripts/service_check.py |4 +- .../stacks/HDP/1.3.2/services/HIVE/metainfo.xml |2 +- .../OOZIE/configuration/oozie-log4j.xml |2 +- .../stacks/HDP/2.0.6.GlusterFS/metainfo.xml |6 +- .../HDP/2.0.6.GlusterFS/repos/repoinfo.xml | 39 + .../HDP/2.0.6.GlusterFS/role_command_order.json | 30 +- .../GLUSTERFS/configuration/core-site.xml | 272 +- .../services/GLUSTERFS/configuration/global.xml | 35 - .../GLUSTERFS/configuration/hadoop-env.xml | 209 + .../services/GLUSTERFS/metainfo.xml | 36 +- .../services/HBASE/configuration/hbase-site.xml | 370 + .../2.0.6.GlusterFS/services/HBASE/metainfo.xml | 34 + .../2.0.6.GlusterFS/services/HDFS/metainfo.xml | 46 +- .../2.0.6.GlusterFS/services/HDFS/metrics.json | 7840 -- .../services/HIVE/configuration/hive-site.xml | 502 ++ .../HIVE/etc/hive-schema-0.13.0.mysql.sql | 889 ++ .../HIVE/etc/hive-schema-0.13.0.oracle.sql | 835 ++ .../HIVE/etc/hive-schema-0.13.0.postgres.sql| 1538 .../etc/upgrade-0.12.0-to-0.13.0.oracle.sql | 165 + .../services/HIVE/etc/upgrade-0.13.0.oracle.sql | 38 + .../2.0.6.GlusterFS/services/HIVE/metainfo.xml | 100 + .../services/OOZIE/configuration/oozie-site.xml | 313 + .../2.0.6.GlusterFS/services/OOZIE/metainfo.xml | 78 + .../PIG/configuration/pig-properties.xml| 91 + .../2.0.6.GlusterFS/services/PIG/metainfo.xml | 27 + .../2.0.6.GlusterFS/services/SQOOP/metainfo.xml | 32 + .../YARN/configuration-mapred/core-site.xml.2 | 20 + .../YARN/configuration-mapred/mapred-site.xml | 88 + .../YARN/configuration-mapred/mapred-site.xml.2 | 68 + .../YARN/configuration/capacity-scheduler.xml | 124 + .../YARN/configuration/mapred-site.xml.2| 68 + .../services/YARN/configuration/yarn-env.xml| 181 + .../services/YARN/configuration/yarn-site.xml | 413 + .../2.0.6.GlusterFS/services/YARN/metainfo.xml | 143 + .../2.0.6.GlusterFS/services/YARN/metrics.json | 2534 ++ .../files/validateYarnComponentStatus.py| 170 + .../services/YARN/package/scripts/__init__.py | 20 + .../scripts/application_timeline_server.py | 55 + .../YARN/package/scripts/historyserver.py | 53 + .../package/scripts/mapred_service_check.py | 73 + .../YARN/package/scripts/mapreduce2_client.py | 42 + .../YARN/package/scripts/nodemanager.py | 59 + .../services/YARN/package/scripts/params.py | 143 + .../YARN/package/scripts/resourcemanager.py | 90 + .../services/YARN/package/scripts/service.py| 62 + .../YARN/package/scripts/service_check.py | 67 + .../YARN/package/scripts/status_params.py | 35 + .../services/YARN/package/scripts/yarn.py | 163 + .../YARN/package/scripts/yarn_client.py | 42 + .../package/templates/container-executor.cfg.j2 | 22 + .../YARN/package/templates/mapreduce.conf.j2| 17 + .../YARN/package/templates/yarn-env.sh.j2 | 128 + .../YARN/package/templates/yarn.conf.j2 | 17 + .../services/ZOOKEEPER/metainfo.xml | 28 + .../services/HBASE/package/scripts/params.py|3 +- .../stacks/HDP/2.0.6/services/HIVE/metainfo.xml |2 +- .../NAGIOS/package/files/nagios_alerts.php |2 +- .../OOZIE/configuration/oozie-log4j.xml |2 +- .../package/templates/oozie-log4j.properties.j2 |2 +- .../scripts/application_timeline_server.py |2 +- .../services/STORM/package/scripts/params.py|5 +- .../services/STORM/package/scripts/service.py | 10 +- .../STORM/package/scripts/service_check.py |6 +- .../services/STORM/configuration/storm-site.xml | 12 +- .../src/main/resources/stacks/stack_advisor.py
[40/50] [abbrv] git commit: Merge branch 'trunk' into branch-alerts-dev
Merge branch 'trunk' into branch-alerts-dev Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f923fd88 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f923fd88 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f923fd88 Branch: refs/heads/trunk Commit: f923fd880b49548bc1cc289e89c18039fc3552b0 Parents: 10f1f73 f1557e8 Author: Jonathan Hurley jhur...@hortonworks.com Authored: Mon Sep 29 08:13:51 2014 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Mon Sep 29 08:13:51 2014 -0400 -- .../admin-web/app/scripts/services/Cluster.js | 2 +- .../resources/ui/admin-web/app/styles/main.css | 15 ++ .../admin-web/app/views/ambariViews/create.html | 2 +- .../admin-web/app/views/ambariViews/edit.html | 2 +- .../ui/admin-web/app/views/leftNavbar.html | 3 +- .../resources/ui/admin-web/app/views/main.html | 4 +- ambari-agent/pom.xml| 3 +- ambari-server/pom.xml | 8 +- ambari-server/src/main/assemblies/server.xml| 3 +- .../ambari/server/controller/AmbariServer.java | 2 +- .../server/orm/entities/ViewInstanceEntity.java | 34 +-- .../AmbariAuthorizationFilter.java | 91 ++- .../server/security/authorization/Users.java| 3 +- .../server/upgrade/UpgradeCatalog170.java | 139 ++ .../apache/ambari/server/view/ViewRegistry.java | 26 +- .../GANGLIA/configuration/ganglia-env.xml | 2 +- .../services/GANGLIA/package/scripts/params.py | 7 +- .../services/OOZIE/configuration/oozie-env.xml | 2 +- .../services/OOZIE/package/files/oozieSmoke2.sh | 27 +- .../services/OOZIE/package/scripts/oozie.py | 8 +- .../OOZIE/package/scripts/oozie_service.py | 17 +- .../services/OOZIE/package/scripts/params.py| 30 ++- .../OOZIE/package/scripts/service_check.py | 5 +- .../stacks/HDP/2.2/services/SLIDER/metainfo.xml | 5 +- .../services/SLIDER/package/scripts/params.py | 6 +- .../orm/entities/ViewInstanceEntityTest.java| 19 +- .../AmbariAuthorizationFilterTest.java | 266 ++- .../security/authorization/TestUsers.java | 1 + .../server/upgrade/UpgradeCatalog170Test.java | 63 - .../ambari/server/upgrade/UpgradeTest.java | 11 +- .../stacks/2.0.6/OOZIE/test_oozie_server.py | 12 + .../stacks/2.0.6/OOZIE/test_service_check.py| 3 +- .../service/manage_config_groups_controller.js | 57 +++- ambari-web/app/controllers/wizard.js| 1 + .../app/controllers/wizard/step7_controller.js | 14 +- ambari-web/app/models/config_group.js | 5 + .../manage_configuration_groups_popup.hbs | 2 +- contrib/views/jobs/src/main/resources/view.xml | 4 +- .../slider/SliderAppsViewControllerImpl.java| 4 +- .../app/controllers/slider_apps_controller.js | 3 +- .../ui/app/controllers/slider_controller.js | 11 +- .../ui/app/mappers/slider_apps_mapper.js| 7 +- .../ui/app/templates/unavailable_apps.hbs | 3 + .../src/main/resources/ui/app/translations.js | 2 +- .../views/slider/src/main/resources/view.xml| 2 +- docs/pom.xml| 16 +- pom.xml | 1 + 47 files changed, 741 insertions(+), 212 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f923fd88/ambari-agent/pom.xml -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f923fd88/ambari-server/pom.xml -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f923fd88/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f923fd88/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java -- diff --cc ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java index 338fede,d86bf35..f8f6f5b --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java @@@ -69,8 -70,8 +70,9 @@@ import org.apache.ambari.server.state.C import org.apache.ambari.server.state.Clusters; import org.apache.ambari.server.state.Config; import org.apache.ambari.server.state.ConfigHelper; +import org.apache.ambari.server.state.alert.Scope; import org.apache.ambari.server.utils.StageUtils; + import org.apache.ambari.server.view.ViewRegistry; import org.slf4j.Logger;
[25/50] [abbrv] git commit: AMBARI-7336 - Alerts: Create Default AlertGroup When Service Is Installed (jonathanhurley)
AMBARI-7336 - Alerts: Create Default AlertGroup When Service Is Installed (jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b7ae2d74 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b7ae2d74 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b7ae2d74 Branch: refs/heads/trunk Commit: b7ae2d74adcd07759b2308bc2a7b0f8115480a7e Parents: 17b8e79 Author: Jonathan Hurley jhur...@hortonworks.com Authored: Tue Sep 16 12:26:36 2014 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Tue Sep 16 12:26:36 2014 -0400 -- .../server/controller/ControllerModule.java | 2 + .../apache/ambari/server/events/AlertEvent.java | 2 +- .../ambari/server/events/AmbariEvent.java | 75 ++ .../ambari/server/events/ServiceEvent.java | 75 ++ .../server/events/ServiceInstalledEvent.java| 52 +++ .../events/listeners/AlertReceivedListener.java | 4 +- .../listeners/AlertServiceStateListener.java| 147 +++ .../listeners/AlertStateChangedListener.java| 2 + .../events/publishers/AlertEventPublisher.java | 8 +- .../events/publishers/AmbariEventPublisher.java | 66 + .../apache/ambari/server/state/ServiceImpl.java | 49 ++- .../state/alerts/AlertEventPublisherTest.java | 132 + 12 files changed, 572 insertions(+), 42 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b7ae2d74/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java index 8413762..349e465 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java @@ -52,6 +52,7 @@ import org.apache.ambari.server.controller.internal.MemberResourceProvider; import org.apache.ambari.server.controller.internal.ServiceResourceProvider; import org.apache.ambari.server.controller.spi.ResourceProvider; import org.apache.ambari.server.events.listeners.AlertReceivedListener; +import org.apache.ambari.server.events.listeners.AlertServiceStateListener; import org.apache.ambari.server.events.listeners.AlertStateChangedListener; import org.apache.ambari.server.orm.DBAccessor; import org.apache.ambari.server.orm.DBAccessorImpl; @@ -313,5 +314,6 @@ public class ControllerModule extends AbstractModule { // them as eager singletons to have them register with the eventbus bind(AlertReceivedListener.class).asEagerSingleton(); bind(AlertStateChangedListener.class).asEagerSingleton(); +bind(AlertServiceStateListener.class).asEagerSingleton(); } } http://git-wip-us.apache.org/repos/asf/ambari/blob/b7ae2d74/ambari-server/src/main/java/org/apache/ambari/server/events/AlertEvent.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/events/AlertEvent.java b/ambari-server/src/main/java/org/apache/ambari/server/events/AlertEvent.java index a75477d..767cb6b 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/events/AlertEvent.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/events/AlertEvent.java @@ -20,7 +20,7 @@ package org.apache.ambari.server.events; import org.apache.ambari.server.state.Alert; /** - * The {@link AlertEvent} class the base for all events related to alerts. + * The {@link AlertEvent} class is the base for all events related to alerts. */ public abstract class AlertEvent { http://git-wip-us.apache.org/repos/asf/ambari/blob/b7ae2d74/ambari-server/src/main/java/org/apache/ambari/server/events/AmbariEvent.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/events/AmbariEvent.java b/ambari-server/src/main/java/org/apache/ambari/server/events/AmbariEvent.java new file mode 100644 index 000..dda18c7 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/events/AmbariEvent.java @@ -0,0 +1,75 @@ +/** + * 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 + * + *
[11/50] [abbrv] git commit: Merge branch 'trunk' into branch-alerts-dev
Merge branch 'trunk' into branch-alerts-dev Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/03a5be1e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/03a5be1e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/03a5be1e Branch: refs/heads/trunk Commit: 03a5be1e193d6ade127fe38cd56d63688b9d5598 Parents: 8697c91 ca2106f Author: Nate Cole nc...@hortonworks.com Authored: Wed Sep 3 07:38:07 2014 -0400 Committer: Nate Cole nc...@hortonworks.com Committed: Wed Sep 3 07:38:07 2014 -0400 -- .../controllers/ambariViews/ViewsEditCtrl.js| 1 + .../clusters/ClustersManageAccessCtrl.js| 1 + .../controllers/groups/GroupsListCtrl.js| 2 +- .../scripts/controllers/users/UsersListCtrl.js | 2 +- .../scripts/controllers/users/UsersShowCtrl.js | 2 +- .../admin-web/app/views/ambariViews/create.html | 2 +- .../admin-web/app/views/ambariViews/edit.html | 4 +- .../app/views/clusters/manageAccess.html| 4 +- .../ui/admin-web/app/views/groups/list.html | 9 .../ui/admin-web/app/views/users/show.html | 2 +- .../main/resources/ui/admin-web/package.json| 2 +- .../stacks/HDP/2.0.6/services/YARN/metainfo.xml | 2 +- .../stacks/HDP/2.1/services/YARN/metainfo.xml | 1 + ambari-web/app/app.js | 15 +++--- .../app/controllers/global/update_controller.js | 3 +- .../main/admin/serviceAccounts_controller.js| 17 -- .../controllers/main/service/info/configs.js| 7 +-- ambari-web/app/data/secure_properties.js| 1 + ambari-web/app/models/service_config.js | 9 +++- ambari-web/app/views/main/service/item.js | 2 +- ambari-web/test/app_test.js | 55 .../admin/serviceAccounts_controller_test.js| 24 - 22 files changed, 49 insertions(+), 118 deletions(-) --
[50/50] [abbrv] git commit: Merge branch 'branch-alerts-dev' into trunk
Merge branch 'branch-alerts-dev' into trunk Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/80bceaf3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/80bceaf3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/80bceaf3 Branch: refs/heads/trunk Commit: 80bceaf3abc8028e7d6b9f9d3a7738132ece6b8a Parents: 0d953b4 cc2d934 Author: Jonathan Hurley jhur...@hortonworks.com Authored: Mon Oct 6 17:02:54 2014 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Mon Oct 6 17:02:54 2014 -0400 -- ambari-agent/pom.xml| 1 + .../ambari_agent/AlertSchedulerHandler.py | 371 ++ .../src/main/python/ambari_agent/Controller.py | 35 +- .../src/main/python/ambari_agent/Heartbeat.py | 8 +- .../main/python/ambari_agent/alerts/__init__.py | 18 + .../python/ambari_agent/alerts/base_alert.py| 204 ++ .../python/ambari_agent/alerts/collector.py | 70 ++ .../python/ambari_agent/alerts/metric_alert.py | 174 + .../python/ambari_agent/alerts/port_alert.py| 71 ++ .../python/ambari_agent/alerts/script_alert.py | 70 ++ .../python/ambari_agent/apscheduler/__init__.py | 3 + .../python/ambari_agent/apscheduler/events.py | 64 ++ .../main/python/ambari_agent/apscheduler/job.py | 137 .../apscheduler/jobstores/__init__.py | 0 .../ambari_agent/apscheduler/jobstores/base.py | 25 + .../apscheduler/jobstores/mongodb_store.py | 84 +++ .../apscheduler/jobstores/ram_store.py | 25 + .../apscheduler/jobstores/redis_store.py| 91 +++ .../apscheduler/jobstores/shelve_store.py | 74 ++ .../apscheduler/jobstores/sqlalchemy_store.py | 91 +++ .../ambari_agent/apscheduler/scheduler.py | 607 + .../ambari_agent/apscheduler/threadpool.py | 133 .../apscheduler/triggers/__init__.py| 3 + .../apscheduler/triggers/cron/__init__.py | 144 .../apscheduler/triggers/cron/expressions.py| 194 ++ .../apscheduler/triggers/cron/fields.py | 100 +++ .../apscheduler/triggers/interval.py| 39 ++ .../ambari_agent/apscheduler/triggers/simple.py | 17 + .../python/ambari_agent/apscheduler/util.py | 230 +++ .../src/test/python/ambari_agent/TestAlerts.py | 357 ++ .../test/python/ambari_agent/TestController.py | 1 + .../ambari_agent/dummy_files/definitions.json | 37 + .../ambari_agent/dummy_files/test_script.py | 3 + ambari-project/pom.xml | 7 +- ambari-server/pom.xml | 22 +- .../apache/ambari/server/EagerSingleton.java| 43 ++ .../apache/ambari/server/agent/ActionQueue.java | 51 +- .../ambari/server/agent/AgentCommand.java | 37 +- .../server/agent/AlertDefinitionCommand.java| 168 + .../server/agent/AlertExecutionCommand.java | 74 ++ .../ambari/server/agent/CancelCommand.java | 5 +- .../ambari/server/agent/ExecutionCommand.java | 109 +-- .../apache/ambari/server/agent/HeartBeat.java | 6 + .../ambari/server/agent/HeartBeatHandler.java | 174 +++-- .../ambari/server/agent/HeartBeatResponse.java | 119 +++- .../ambari/server/agent/HeartbeatMonitor.java | 40 +- .../ambari/server/agent/NagiosAlertCommand.java | 11 +- .../server/agent/RegistrationResponse.java | 50 +- .../ambari/server/agent/StatusCommand.java | 43 +- .../resources/AlertDefResourceDefinition.java | 3 - .../resources/AlertGroupResourceDefinition.java | 50 ++ .../api/resources/AlertResourceDefinition.java | 41 ++ .../AlertTargetResourceDefinition.java | 50 ++ .../resources/ClusterResourceDefinition.java| 1 + .../api/resources/HostResourceDefinition.java | 7 +- .../resources/ResourceInstanceFactoryImpl.java | 12 + .../resources/ServiceResourceDefinition.java| 5 +- .../server/api/services/AlertGroupService.java | 121 .../server/api/services/AlertService.java | 93 +++ .../server/api/services/AlertTargetService.java | 106 +++ .../server/api/services/AmbariMetaInfo.java | 368 +++--- .../server/api/services/ClusterService.java | 82 ++- .../ambari/server/api/services/HostService.java | 11 + .../server/api/services/ServiceService.java | 9 + .../services/parsers/JsonRequestBodyParser.java | 14 +- .../controller/AlertDefinitionResponse.java | 143 .../ambari/server/controller/AmbariServer.java | 26 +- .../server/controller/ControllerModule.java | 71 +- .../AbstractControllerResourceProvider.java | 12 +- .../internal/AbstractProviderModule.java| 41 +- .../AlertDefinitionResourceProvider.java| 465 + .../internal/AlertGroupResourceProvider.java| 403 +++ .../internal/AlertResourceProvider.java | 191 ++
[30/50] [abbrv] git commit: Merge branch 'trunk' into branch-alerts-dev
Merge branch 'trunk' into branch-alerts-dev Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e2e79668 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e2e79668 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e2e79668 Branch: refs/heads/trunk Commit: e2e79668ed94266487fe9d1d2ccba2003922e883 Parents: 179290e d7ed431 Author: Jonathan Hurley jhur...@hortonworks.com Authored: Fri Sep 19 13:18:45 2014 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Fri Sep 19 13:18:45 2014 -0400 -- .../clusters/ClustersManageAccessCtrl.js|2 +- .../app/scripts/directives/editableList.js | 18 +- .../resources/ui/admin-web/app/styles/main.css | 14 +- .../app/views/directives/editableList.html |2 +- .../ui/admin-web/app/views/groups/list.html |2 +- .../ui/admin-web/app/views/leftNavbar.html |9 +- .../resources/ui/admin-web/app/views/main.html |3 +- .../ui/admin-web/app/views/users/list.html |2 +- .../test/python/ambari_agent/TestController.py |4 +- .../TestCustomServiceOrchestrator.py|3 +- .../resource_management/TestCopyFromLocal.py|8 +- .../TestExecuteHadoopResource.py| 12 +- .../resource_management/TestExecuteResource.py |3 +- .../core/providers/system.py| 12 +- .../python/resource_management/core/shell.py| 24 +- .../libraries/providers/copy_from_local.py |4 + .../libraries/providers/execute_hadoop.py |6 +- .../libraries/providers/hdfs_directory.py |6 +- .../libraries/resources/copy_from_local.py |1 + ambari-server/pom.xml |8 + .../server/api/util/StackExtensionHelper.java | 122 +- .../controller/MaintenanceStateHelper.java |2 +- .../server/upgrade/UpgradeCatalog170.java | 43 +- .../src/main/resources/properties.json |1 + .../1.3.2/hooks/before-START/scripts/params.py |2 +- .../services/HIVE/configuration/hcat-env.xml| 57 + .../stacks/HDP/1.3.2/services/HIVE/metainfo.xml | 19 +- .../1.3.2/services/HIVE/package/scripts/hcat.py | 13 +- .../services/HIVE/package/scripts/params.py |2 + .../HIVE/package/templates/hcat-env.sh.j2 | 44 - .../configuration/capacity-scheduler.xml|2 +- .../2.0.6/hooks/after-INSTALL/scripts/params.py | 11 +- .../scripts/shared_initialization.py|4 + .../2.0.6/hooks/before-START/scripts/params.py | 13 +- .../services/FLUME/package/scripts/flume.py |2 +- .../services/FLUME/package/scripts/params.py|6 +- .../GANGLIA/configuration/ganglia-env.xml |2 +- .../services/GANGLIA/package/scripts/params.py |8 +- .../services/HBASE/package/scripts/params.py| 16 +- .../services/HDFS/package/scripts/params.py | 18 +- .../HDFS/package/scripts/service_check.py |2 +- .../services/HIVE/configuration/hcat-env.xml| 57 + .../stacks/HDP/2.0.6/services/HIVE/metainfo.xml | 19 +- .../2.0.6/services/HIVE/package/scripts/hcat.py | 15 +- .../HIVE/package/scripts/hcat_service_check.py | 10 +- .../HIVE/package/scripts/install_jars.py|2 + .../services/HIVE/package/scripts/params.py | 71 +- .../services/HIVE/package/scripts/webhcat.py|4 + .../HIVE/package/templates/hcat-env.sh.j2 | 43 - .../services/PIG/package/scripts/params.py | 12 +- .../2.0.6/services/PIG/package/scripts/pig.py |1 + .../services/SQOOP/package/scripts/params.py| 11 +- .../YARN/configuration/capacity-scheduler.xml |2 +- .../package/scripts/mapred_service_check.py |4 + .../services/YARN/package/scripts/params.py | 24 +- .../YARN/package/scripts/service_check.py |2 +- .../ZOOKEEPER/package/scripts/params.py |7 +- .../services/FALCON/package/scripts/params.py | 12 +- .../services/STORM/package/scripts/params.py| 11 +- .../stacks/HDP/2.2/services/FALCON/metainfo.xml |2 +- .../stacks/HDP/2.2/services/FLUME/metainfo.xml |2 +- .../stacks/HDP/2.2/services/HBASE/metainfo.xml |2 +- .../services/HDFS/configuration/hadoop-env.xml |2 +- .../services/HDFS/configuration/hdfs-site.xml | 34 - .../stacks/HDP/2.2/services/HDFS/metainfo.xml |4 +- .../HIVE/configuration/webhcat-site.xml | 14 +- .../stacks/HDP/2.2/services/HIVE/metainfo.xml |6 +- .../services/OOZIE/configuration/oozie-site.xml | 13 - .../stacks/HDP/2.2/services/OOZIE/metainfo.xml |6 +- .../stacks/HDP/2.2/services/PIG/metainfo.xml|2 +- .../services/SLIDER/package/scripts/params.py |4 +- .../stacks/HDP/2.2/services/SQOOP/metainfo.xml |2 +- .../services/STORM/configuration/storm-env.xml | 29 -
[13/50] [abbrv] git commit: Merge branch 'trunk' into branch-alerts-dev
Merge branch 'trunk' into branch-alerts-dev Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/91ae5f27 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/91ae5f27 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/91ae5f27 Branch: refs/heads/trunk Commit: 91ae5f27e98ec4d81c7299480b8adb3619e31c5b Parents: 0de98b0 ad983de Author: Nate Cole nc...@hortonworks.com Authored: Thu Sep 4 18:35:01 2014 -0400 Committer: Nate Cole nc...@hortonworks.com Committed: Thu Sep 4 18:35:01 2014 -0400 -- .../src/main/resources/ui/admin-web/gulpfile.js | 51 - .../main/resources/ui/admin-web/package.json|9 - ambari-agent/pom.xml| 12 +- .../src/main/python/ambari_agent/HostInfo.py|2 +- .../test/python/ambari_agent/TestHardware.py|4 +- .../resource_management/TestContentSources.py |2 +- .../resource_management/TestPackageResource.py |8 +- .../TestRepositoryResource.py | 16 +- .../src/main/python/ambari_commons/os_check.py |8 +- .../src/main/python/ambari_jinja2/AUTHORS | 31 + .../src/main/python/ambari_jinja2/CHANGES | 235 +++ .../src/main/python/ambari_jinja2/LICENSE | 31 + .../src/main/python/ambari_jinja2/MANIFEST.in | 12 + .../src/main/python/ambari_jinja2/Makefile |4 + .../ambari_jinja2/ambari_jinja2/__init__.py | 73 + .../ambari_jinja2/ambari_jinja2/_debugsupport.c | 78 + .../ambari_jinja2/_markupsafe/__init__.py | 225 +++ .../ambari_jinja2/_markupsafe/_bundle.py| 49 + .../ambari_jinja2/_markupsafe/_constants.py | 267 +++ .../ambari_jinja2/_markupsafe/_native.py| 45 + .../ambari_jinja2/_markupsafe/tests.py | 80 + .../ambari_jinja2/ambari_jinja2/_stringdefs.py | 130 ++ .../ambari_jinja2/ambari_jinja2/bccache.py | 280 +++ .../ambari_jinja2/ambari_jinja2/compiler.py | 1640 ++ .../ambari_jinja2/ambari_jinja2/constants.py| 32 + .../python/ambari_jinja2/ambari_jinja2/debug.py | 308 .../ambari_jinja2/ambari_jinja2/defaults.py | 40 + .../ambari_jinja2/ambari_jinja2/environment.py | 1118 .../ambari_jinja2/ambari_jinja2/exceptions.py | 143 ++ .../python/ambari_jinja2/ambari_jinja2/ext.py | 610 +++ .../ambari_jinja2/ambari_jinja2/filters.py | 719 .../python/ambari_jinja2/ambari_jinja2/lexer.py | 681 .../ambari_jinja2/ambari_jinja2/loaders.py | 449 + .../python/ambari_jinja2/ambari_jinja2/meta.py | 102 ++ .../python/ambari_jinja2/ambari_jinja2/nodes.py | 901 ++ .../ambari_jinja2/ambari_jinja2/optimizer.py| 68 + .../ambari_jinja2/ambari_jinja2/parser.py | 896 ++ .../ambari_jinja2/ambari_jinja2/runtime.py | 544 ++ .../ambari_jinja2/ambari_jinja2/sandbox.py | 271 +++ .../python/ambari_jinja2/ambari_jinja2/tests.py | 146 ++ .../ambari_jinja2/testsuite/__init__.py | 95 + .../ambari_jinja2/testsuite/api.py | 240 +++ .../ambari_jinja2/testsuite/core_tags.py| 286 +++ .../ambari_jinja2/testsuite/debug.py| 60 + .../ambari_jinja2/testsuite/doctests.py | 29 + .../ambari_jinja2/testsuite/ext.py | 455 + .../ambari_jinja2/testsuite/filters.py | 291 .../ambari_jinja2/testsuite/imports.py | 144 ++ .../ambari_jinja2/testsuite/inheritance.py | 208 +++ .../ambari_jinja2/testsuite/lexnparse.py| 390 + .../ambari_jinja2/testsuite/loader.py | 191 ++ .../ambari_jinja2/testsuite/regression.py | 258 +++ .../testsuite/res/templates/broken.html |3 + .../testsuite/res/templates/foo/test.html |1 + .../testsuite/res/templates/syntaxerror.html|4 + .../testsuite/res/templates/test.html |1 + .../ambari_jinja2/testsuite/security.py | 134 ++ .../ambari_jinja2/testsuite/tests.py| 87 + .../ambari_jinja2/testsuite/utils.py| 85 + .../python/ambari_jinja2/ambari_jinja2/utils.py | 601 +++ .../ambari_jinja2/ambari_jinja2/visitor.py | 87 + .../python/ambari_jinja2/artwork/jinjalogo.svg | 132 ++ .../custom_fixers/fix_alt_unicode.py| 13 + .../custom_fixers/fix_broken_reraising.py | 21 + .../ambari_jinja2/custom_fixers/fix_xrange2.py | 11 + .../src/main/python/ambari_jinja2/docs/Makefile | 75 + .../python/ambari_jinja2/docs/_static/jinja.js | 26 + .../python/ambari_jinja2/docs/_static/print.css |5 + .../python/ambari_jinja2/docs/_static/style.css | 390 + .../ambari_jinja2/docs/_templates/genindex.html | 36 + .../ambari_jinja2/docs/_templates/layout.html | 77 + .../docs/_templates/opensearch.xml |9 + .../ambari_jinja2/docs/_templates/page.html
[44/50] [abbrv] git commit: Merge branch 'trunk' into branch-alerts-dev
Merge branch 'trunk' into branch-alerts-dev Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6f9398f0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6f9398f0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6f9398f0 Branch: refs/heads/trunk Commit: 6f9398f0ff45da86c001eb86322695a3d76b7232 Parents: 054745d bd851c1 Author: Jonathan Hurley jhur...@hortonworks.com Authored: Wed Oct 1 11:26:26 2014 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Wed Oct 1 11:26:26 2014 -0400 -- .../resources/ui/admin-web/app/styles/main.css | 2 +- .../src/main/python/ambari_agent/ActionQueue.py | 5 +- .../python/ambari_agent/ActualConfigHandler.py | 5 +- .../test/python/ambari_agent/TestActionQueue.py |55 + .../ambari_agent/TestActualConfigHandler.py |25 +- ambari-server/pom.xml | 2 + ambari-server/sbin/ambari-server| 2 +- .../ambari/server/agent/ExecutionCommand.java | 1 + .../server/api/util/StackExtensionHelper.java | 6 + .../AmbariManagementControllerImpl.java |28 + .../ambari/server/state/ComponentInfo.java |21 +- .../server/upgrade/UpgradeCatalog170.java | 2 + ambari-server/src/main/python/ambari-server.py | 162 +- .../0.8/blueprints/multinode-default.json | 182 + .../0.8/blueprints/singlenode-default.json | 136 + .../BIGTOP/0.8/configuration/cluster-env.xml|56 + .../0.8/hooks/after-INSTALL/scripts/hook.py |35 + .../0.8/hooks/after-INSTALL/scripts/params.py |68 + .../scripts/shared_initialization.py|52 + .../BIGTOP/0.8/hooks/before-ANY/scripts/hook.py |33 + .../0.8/hooks/before-ANY/scripts/params.py |33 + .../before-ANY/scripts/shared_initialization.py |58 + .../before-INSTALL/files/changeToSecureUid.sh |50 + .../0.8/hooks/before-INSTALL/scripts/hook.py|39 + .../0.8/hooks/before-INSTALL/scripts/params.py | 118 + .../scripts/repo_initialization.py |57 + .../scripts/shared_initialization.py|94 + .../before-INSTALL/templates/repo_suse_rhel.j2 | 7 + .../before-INSTALL/templates/repo_ubuntu.j2 | 1 + .../0.8/hooks/before-RESTART/scripts/hook.py|29 + .../hooks/before-START/files/checkForFormat.sh |62 + .../before-START/files/task-log4j.properties| 134 + .../0.8/hooks/before-START/scripts/hook.py |38 + .../0.8/hooks/before-START/scripts/params.py| 146 + .../scripts/shared_initialization.py| 175 + .../templates/commons-logging.properties.j2 |43 + .../templates/exclude_hosts_list.j2 |21 + .../templates/hadoop-metrics2.properties.j2 |65 + .../before-START/templates/health_check-v2.j2 |81 + .../before-START/templates/health_check.j2 | 109 + .../templates/include_hosts_list.j2 |21 + .../resources/stacks/BIGTOP/0.8/metainfo.xml|22 + .../stacks/BIGTOP/0.8/repos/repoinfo.xml|35 + .../stacks/BIGTOP/0.8/role_command_order.json |74 + .../services/FLUME/configuration/flume-conf.xml |31 + .../services/FLUME/configuration/flume-env.xml |40 + .../FLUME/configuration/flume-log4j.xml |31 + .../BIGTOP/0.8/services/FLUME/metainfo.xml |69 + .../BIGTOP/0.8/services/FLUME/metrics.json | 716 + .../0.8/services/FLUME/package/scripts/flume.py | 250 + .../FLUME/package/scripts/flume_check.py|40 + .../FLUME/package/scripts/flume_handler.py | 121 + .../services/FLUME/package/scripts/params.py|60 + .../FLUME/package/templates/flume.conf.j2 |24 + .../FLUME/package/templates/log4j.properties.j2 |67 + .../GANGLIA/configuration/ganglia-env.xml |72 + .../BIGTOP/0.8/services/GANGLIA/metainfo.xml| 127 + .../GANGLIA/package/files/checkGmetad.sh|37 + .../GANGLIA/package/files/checkGmond.sh |62 + .../GANGLIA/package/files/checkRrdcached.sh |34 + .../services/GANGLIA/package/files/gmetad.init |73 + .../services/GANGLIA/package/files/gmetadLib.sh | 204 + .../services/GANGLIA/package/files/gmond.init |73 + .../services/GANGLIA/package/files/gmondLib.sh | 539 + .../GANGLIA/package/files/rrdcachedLib.sh |47 + .../GANGLIA/package/files/setupGanglia.sh | 141 + .../GANGLIA/package/files/startGmetad.sh|68 + .../GANGLIA/package/files/startGmond.sh |85 + .../GANGLIA/package/files/startRrdcached.sh |79 + .../GANGLIA/package/files/stopGmetad.sh |43 + .../services/GANGLIA/package/files/stopGmond.sh |54 + .../GANGLIA/package/files/stopRrdcached.sh |41 + .../GANGLIA/package/files/teardownGanglia.sh|28 +
[32/50] [abbrv] git commit: Merge branch 'trunk' into branch-alerts-dev
Merge branch 'trunk' into branch-alerts-dev Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e6cc0587 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e6cc0587 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e6cc0587 Branch: refs/heads/trunk Commit: e6cc05872462d53f9b420837f129921d0e2e0b24 Parents: 7f86e75 802df76 Author: Jonathan Hurley jhur...@hortonworks.com Authored: Mon Sep 22 10:47:55 2014 -0700 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Mon Sep 22 10:47:55 2014 -0700 -- ambari-server/pom.xml | 22 .../internal/ClientConfigResourceProvider.java | 33 - .../internal/ConfigGroupResourceProvider.java | 15 ++- .../server/upgrade/UpgradeCatalog170.java | 68 +- .../main/resources/slider_resources/README.txt | 17 +++ .../services/GANGLIA/package/scripts/params.py | 5 +- .../services/GANGLIA/package/scripts/params.py | 6 +- .../services/OOZIE/package/scripts/oozie.py | 10 +- .../services/OOZIE/package/scripts/params.py| 13 +- .../services/SQOOP/package/scripts/params.py| 2 + .../SQOOP/package/scripts/service_check.py | 1 + .../services/FALCON/package/scripts/falcon.py | 4 + .../services/STORM/configuration/storm-site.xml | 6 +- .../services/SLIDER/package/scripts/slider.py | 3 +- .../services/STORM/configuration/storm-site.xml | 6 +- .../ClientConfigResourceProviderTest.java | 9 +- .../ConfigGroupResourceProviderTest.java| 37 +- .../server/upgrade/UpgradeCatalog170Test.java | 125 --- .../stacks/2.0.6/OOZIE/test_oozie_client.py | 18 +-- .../stacks/2.0.6/OOZIE/test_oozie_server.py | 18 +-- .../stacks/2.0.6/SQOOP/test_service_check.py| 2 + .../stacks/2.1/FALCON/test_falcon_client.py | 4 + .../stacks/2.1/FALCON/test_falcon_server.py | 4 + .../stacks/2.2/SLIDER/test_slider_client.py | 4 +- .../main/dashboard/config_history_controller.js | 1 + ambari-web/app/controllers/main/service/item.js | 28 - ambari-web/app/templates/main/host/details.hbs | 2 +- ambari-web/app/templates/main/service/item.hbs | 13 +- ambari-web/app/views/common/filter_view.js | 74 ++- .../views/main/dashboard/config_history_view.js | 10 +- ambari-web/app/views/main/service/item.js | 6 +- contrib/views/slider/docs/index.md | 63 ++ .../view/slider/SliderAppsViewController.java | 8 ++ .../slider/SliderAppsViewControllerImpl.java| 69 +- .../assets/data/resource/slider-properties.json | 7 +- .../ui/app/controllers/slider_controller.js | 20 ++- .../src/main/resources/ui/app/helpers/ajax.js | 7 +- .../resources/ui/app/models/slider_config.js| 8 +- .../src/main/resources/ui/app/routes/main.js| 7 +- .../src/main/resources/ui/app/translations.js | 1 + .../views/slider/src/main/resources/view.xml| 25 41 files changed, 596 insertions(+), 185 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e6cc0587/ambari-server/pom.xml -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e6cc0587/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java --
[33/50] [abbrv] git commit: AMBARI-7443 - Alerts: Implement Email Dispatcher (jonathanhurley)
AMBARI-7443 - Alerts: Implement Email Dispatcher (jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d838ca95 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d838ca95 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d838ca95 Branch: refs/heads/trunk Commit: d838ca95b644a3222c27b7415f2711373affcd83 Parents: e6cc058 Author: Jonathan Hurley jhur...@hortonworks.com Authored: Mon Sep 22 23:45:06 2014 -0700 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Tue Sep 23 09:02:11 2014 -0700 -- .../internal/AlertTargetResourceProvider.java | 15 +- .../server/events/AlertStateChangeEvent.java| 2 +- .../events/listeners/AlertReceivedListener.java | 46 +++-- .../listeners/AlertServiceStateListener.java| 1 - .../notifications/DispatchCredentials.java | 44 + .../server/notifications/DispatchFactory.java | 16 ++ .../server/notifications/Notification.java | 18 ++ .../ambari/server/notifications/Recipient.java | 45 + .../dispatchers/EmailDispatcher.java| 129 +- .../apache/ambari/server/orm/dao/AlertsDAO.java | 114 +++- .../server/orm/entities/AlertCurrentEntity.java | 13 +- .../services/AlertNoticeDispatchService.java| 175 ++- .../stacks/HDP/2.0.6/services/HDFS/alerts.json | 2 +- .../AlertTargetResourceProviderTest.java| 58 ++ .../notifications/EmailDispatcherTest.java | 117 + .../server/notifications/MockDispatcher.java| 46 + .../ambari/server/orm/dao/AlertsDAOTest.java| 133 +- .../alerts/AlertStateChangedEventTest.java | 139 +++ 18 files changed, 984 insertions(+), 129 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d838ca95/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java index f2b82d6..b0cc52b 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java @@ -20,6 +20,7 @@ package org.apache.ambari.server.controller.internal; import java.text.MessageFormat; import java.util.ArrayList; import java.util.Arrays; +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; @@ -45,7 +46,6 @@ import org.apache.ambari.server.state.alert.AlertTarget; import org.apache.commons.lang.StringUtils; import com.google.gson.Gson; -import com.google.gson.JsonObject; import com.google.inject.Inject; import com.google.inject.Injector; @@ -351,22 +351,19 @@ public class AlertTargetResourceProvider extends * {@code null} if none. */ private String extractProperties( MapString, Object requestMap ){ -JsonObject jsonObject = new JsonObject(); +MapString, Object normalizedMap = new HashMapString, Object( +requestMap.size()); + for (EntryString, Object entry : requestMap.entrySet()) { String key = entry.getKey(); String propCat = PropertyHelper.getPropertyCategory(key); if (propCat.equals(ALERT_TARGET_PROPERTIES)) { String propKey = PropertyHelper.getPropertyName(key); -jsonObject.addProperty(propKey, entry.getValue().toString()); +normalizedMap.put(propKey, entry.getValue()); } } -String properties = null; -if (jsonObject.entrySet().size() 0) { - properties = jsonObject.toString(); -} - -return properties; +return s_gson.toJson(normalizedMap); } } http://git-wip-us.apache.org/repos/asf/ambari/blob/d838ca95/ambari-server/src/main/java/org/apache/ambari/server/events/AlertStateChangeEvent.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/events/AlertStateChangeEvent.java b/ambari-server/src/main/java/org/apache/ambari/server/events/AlertStateChangeEvent.java index ab2c3dd..efb7119 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/events/AlertStateChangeEvent.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/events/AlertStateChangeEvent.java @@ -25,7 +25,7 @@ import org.apache.ambari.server.state.AlertState; * The {@link AlertStateChangeEvent} is fired when an {@link Alert} instance has * its {@link AlertState} changed. */ -public final class
[37/50] [abbrv] git commit: AMBARI-7508 - Alerts: Reschedule Individual Alerts on Agents (jonathanhurley)
AMBARI-7508 - Alerts: Reschedule Individual Alerts on Agents (jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7db82c92 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7db82c92 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7db82c92 Branch: refs/heads/trunk Commit: 7db82c923c2903a2e2fab3d302fb9337423da08b Parents: 2448352 Author: Jonathan Hurley jhur...@hortonworks.com Authored: Thu Sep 25 22:19:49 2014 -0700 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Fri Sep 26 09:38:10 2014 -0700 -- .../ambari_agent/AlertSchedulerHandler.py | 98 ++- .../python/ambari_agent/alerts/base_alert.py| 37 ++- .../python/ambari_agent/alerts/collector.py | 21 +- .../src/test/python/ambari_agent/TestAlerts.py | 50 .../ambari_agent/dummy_files/definitions.json | 1 + ambari-project/pom.xml | 7 +- ambari-server/pom.xml | 12 +- .../internal/AlertGroupResourceProvider.java| 33 ++- .../events/AlertDefinitionDeleteEvent.java | 55 .../ambari/server/events/AmbariEvent.java | 7 +- .../listeners/AlertLifecycleListener.java | 54 +++- .../events/listeners/AlertReceivedListener.java | 8 + .../server/orm/dao/AlertDefinitionDAO.java | 13 + .../apache/ambari/server/orm/dao/AlertsDAO.java | 1 + .../orm/entities/AlertDefinitionEntity.java | 15 +- .../server/orm/entities/AlertGroupEntity.java | 5 +- .../state/alert/AggregateDefinitionMapping.java | 31 +- .../server/state/alert/AlertDefinition.java | 19 ++ .../state/alert/AlertDefinitionFactory.java | 1 + .../server/state/alert/AlertDefinitionHash.java | 293 +++ .../AlertGroupResourceProviderTest.java | 87 ++ .../server/orm/dao/AlertDefinitionDAOTest.java | 6 +- .../alerts/AlertDefinitionEqualityTest.java | 1 + .../state/alerts/AlertEventPublisherTest.java | 68 - .../alerts/AlertStateChangedEventTest.java | 12 +- .../state/cluster/AlertDataManagerTest.java | 2 +- 26 files changed, 755 insertions(+), 182 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7db82c92/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py b/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py index 7cce533..8dcce50 100644 --- a/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py +++ b/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py @@ -61,22 +61,25 @@ class AlertSchedulerHandler(): logger.critical(Could not create the cache directory {0}.format(cachedir)) pass +self._collector = AlertCollector() self.__scheduler = Scheduler(AlertSchedulerHandler.APS_CONFIG) self.__in_minutes = in_minutes -self.__collector = AlertCollector() self.__config_maps = {} + - def update_definitions(self, alert_commands, refresh_jobs=False): + def update_definitions(self, alert_commands, reschedule_jobs=False): ''' updates the persisted definitions and restarts the scheduler ''' with open(os.path.join(self.cachedir, self.FILENAME), 'w') as f: json.dump(alert_commands, f, indent=2) -if refresh_jobs: - self.start() +if reschedule_jobs: + self.reschedule() + def __make_function(self, alert_def): return lambda: alert_def.collect() + def start(self): ''' loads definitions from file and starts the scheduler ''' @@ -90,26 +93,72 @@ class AlertSchedulerHandler(): alert_callables = self.__load_definitions() +# schedule each definition for _callable in alert_callables: - if self.__in_minutes: -self.__scheduler.add_interval_job(self.__make_function(_callable), - minutes=_callable.interval()) - else: -self.__scheduler.add_interval_job(self.__make_function(_callable), - seconds=_callable.interval()) + self.schedule_definition(_callable) logger.debug(Starting scheduler {0}; currently running: {1}.format( str(self.__scheduler), str(self.__scheduler.running))) + self.__scheduler.start() + def stop(self): if not self.__scheduler is None: self.__scheduler.shutdown(wait=False) self.__scheduler = Scheduler(AlertSchedulerHandler.APS_CONFIG) + + + def reschedule(self): +''' +Removes jobs that are scheduled where their UUID no longer is valid. +Schedules jobs where the definition UUID is not currently scheduled. +''' +jobs_scheduled = 0 +jobs_removed = 0 + +definitions
[49/50] [abbrv] git commit: Merge branch 'trunk' into branch-alerts-dev
Merge branch 'trunk' into branch-alerts-dev Conflicts: ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java ambari-server/src/main/resources/key_properties.json ambari-server/src/main/resources/properties.json Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cc2d9341 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cc2d9341 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cc2d9341 Branch: refs/heads/trunk Commit: cc2d9341336218878af81bea0cc8ee7fc2a7d9ec Parents: 9919b3f 811ea58 Author: Jonathan Hurley jhur...@hortonworks.com Authored: Mon Oct 6 16:27:12 2014 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Mon Oct 6 16:27:12 2014 -0400 -- .../resources/ControllerResourceDefinition.java | 60 .../resources/ResourceInstanceFactoryImpl.java | 6 - .../server/api/services/ControllerService.java | 98 --- .../server/api/util/StackExtensionHelper.java | 14 +- .../AbstractControllerResourceProvider.java | 2 - .../internal/ControllerResourceProvider.java| 282 --- .../controller/internal/ControllerType.java | 65 - .../internal/StackDefinedPropertyProvider.java | 10 +- .../metrics/RestMetricsPropertyProvider.java| 19 +- .../ambari/server/controller/spi/Resource.java | 2 - ambari-server/src/main/python/ambari-server.py | 13 +- .../src/main/resources/key_properties.json | 3 - .../src/main/resources/properties.json | 9 - .../stacks/HDP/2.2/services/HIVE/metainfo.xml | 5 + .../stacks/HDP/2.2/services/stack_advisor.py| 5 +- .../api/util/StackExtensionHelperTest.java | 27 ++ .../stacks/2.2/common/test_stack_advisor.py | 137 +++-- .../single_stack/ABC/1.0.0/metainfo.xml | 22 ++ .../ABC/1.0.0/services/HDFS/metainfo.xml| 193 + .../ui/app/scripts/models/jobs/tez_dag.js | 4 +- .../main/resources/ui/app/models/slider_app.js | 16 ++ .../resources/ui/app/templates/slider_apps.hbs | 4 +- .../ui/app/views/common/filter_view.js | 4 +- .../resources/ui/app/views/common/table_view.js | 2 +- .../resources/ui/app/views/slider_apps_view.js | 15 +- .../ui/test/unit/views/slider_apps_view_test.js | 37 +++ 26 files changed, 469 insertions(+), 585 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/cc2d9341/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java -- http://git-wip-us.apache.org/repos/asf/ambari/blob/cc2d9341/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java -- diff --cc ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java index f3f92a1,17df861..5810633 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java @@@ -149,16 -149,8 +149,14 @@@ public abstract class AbstractControlle return new RecommendationResourceProvider(propertyIds, keyPropertyIds, managementController); case Validation: return new ValidationResourceProvider(propertyIds, keyPropertyIds, managementController); + case Alert: +return new AlertResourceProvider(propertyIds, keyPropertyIds, managementController); case AlertDefinition: return new AlertDefinitionResourceProvider(propertyIds, keyPropertyIds, managementController); + case AlertGroup: +return new AlertGroupResourceProvider(propertyIds, keyPropertyIds, managementController); + case AlertTarget: +return new AlertTargetResourceProvider(propertyIds, keyPropertyIds, managementController); - case Controller: - return new ControllerResourceProvider(propertyIds, keyPropertyIds, managementController); case ClientConfig: return new ClientConfigResourceProvider(propertyIds, keyPropertyIds, managementController); default: http://git-wip-us.apache.org/repos/asf/ambari/blob/cc2d9341/ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java -- http://git-wip-us.apache.org/repos/asf/ambari/blob/cc2d9341/ambari-server/src/main/resources/key_properties.json -- diff --cc
[28/50] [abbrv] git commit: AMBARI-7391 - Alerts: Scan Database For Pending AlertNoticeEntity (jonathanhurley)
AMBARI-7391 - Alerts: Scan Database For Pending AlertNoticeEntity (jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ba325d08 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ba325d08 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ba325d08 Branch: refs/heads/trunk Commit: ba325d0831e9816992849490766e511450ef7f3a Parents: f1018b1 Author: Jonathan Hurley jhur...@hortonworks.com Authored: Thu Sep 18 11:20:44 2014 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Thu Sep 18 15:21:26 2014 -0400 -- ambari-server/pom.xml | 10 + .../ambari/server/controller/AmbariServer.java | 12 + .../server/controller/ControllerModule.java | 22 ++ .../events/listeners/AlertReceivedListener.java | 7 +- .../listeners/AlertServiceStateListener.java| 20 +- .../listeners/AlertStateChangedListener.java| 4 +- .../events/publishers/AlertEventPublisher.java | 14 +- .../server/notifications/DispatchCallback.java | 50 .../server/notifications/DispatchFactory.java | 62 + .../server/notifications/DispatchRunnable.java | 60 + .../server/notifications/Notification.java | 57 + .../notifications/NotificationDispatcher.java | 47 .../dispatchers/EmailDispatcher.java| 60 + .../server/orm/dao/AlertDefinitionDAO.java | 15 +- .../ambari/server/orm/dao/AlertDispatchDAO.java | 69 +- .../server/orm/entities/AlertCurrentEntity.java | 38 +-- .../server/orm/entities/AlertGroupEntity.java | 3 +- .../server/orm/entities/AlertNoticeEntity.java | 2 + .../ambari/server/state/alert/TargetType.java | 15 +- .../server/state/cluster/ClusterImpl.java | 7 +- .../services/AlertNoticeDispatchService.java| 231 +++ .../apache/ambari/server/orm/OrmTestHelper.java | 37 +++ .../server/orm/dao/AlertDefinitionDAOTest.java | 11 +- .../server/orm/dao/AlertDispatchDAOTest.java| 40 +++- 24 files changed, 847 insertions(+), 46 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ba325d08/ambari-server/pom.xml -- diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml index b07afbf..d83db61 100644 --- a/ambari-server/pom.xml +++ b/ambari-server/pom.xml @@ -1418,6 +1418,16 @@ artifactIdvelocity/artifactId version1.7/version /dependency +dependency + groupIdcom.sun.mail/groupId + artifactIdmailapi/artifactId + version1.5.2/version +/dependency +dependency + groupIdcom.sun.mail/groupId + artifactIdsmtp/artifactId + version1.5.2/version +/dependency /dependencies !--reporting plugins plugin groupIdorg.codehaus.mojo/groupId artifactIdfindbugs-maven-plugin/artifactId version2.5.2/version /plugin http://git-wip-us.apache.org/repos/asf/ambari/blob/ba325d08/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 7354706..57b678a 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 @@ -113,10 +113,12 @@ import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.support.GenericWebApplicationContext; import org.springframework.web.filter.DelegatingFilterProxy; +import com.google.common.util.concurrent.ServiceManager; import com.google.gson.Gson; import com.google.inject.Guice; import com.google.inject.Inject; import com.google.inject.Injector; +import com.google.inject.Scopes; import com.google.inject.Singleton; import com.google.inject.name.Named; import com.google.inject.persist.Transactional; @@ -147,6 +149,13 @@ public class AmbariServer { @Inject @Named(dbInitNeeded) boolean dbInitNeeded; + + /** + * Guava service manager singleton (bound with {@link Scopes#SINGLETON}). + */ + @Inject + private ServiceManager serviceManager; + /** * The singleton view registry. */ @@ -473,6 +482,9 @@ public class AmbariServer { executionScheduleManager.start(); LOG.info(* Started Scheduled Request Manager **); + serviceManager.startAsync(); + LOG.info(* Started Services **); + server.join(); LOG.info(Joined the Server); } catch (BadPaddingException bpe){
[47/50] [abbrv] git commit: Merge branch 'trunk' into branch-alerts-dev
Merge branch 'trunk' into branch-alerts-dev Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/445a53cf Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/445a53cf Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/445a53cf Branch: refs/heads/trunk Commit: 445a53cf5bcbba89ff04131d9802e205bfc3ab42 Parents: 3e54f95 e069b30 Author: Jonathan Hurley jhur...@hortonworks.com Authored: Fri Oct 3 23:15:57 2014 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Fri Oct 3 23:15:57 2014 -0400 -- ambari-admin/pom.xml| 19 +- .../main/resources/ui/admin-web/app/index.html |4 +- .../resources/ui/admin-web/app/scripts/app.js |1 - .../app/scripts/controllers/NavbarCtrl.js |8 +- .../ambariViews/CreateViewInstanceCtrl.js |8 +- .../controllers/ambariViews/ViewsEditCtrl.js| 22 +- .../controllers/ambariViews/ViewsListCtrl.js|5 +- .../clusters/ClustersManageAccessCtrl.js|6 +- .../controllers/groups/GroupsCreateCtrl.js |7 +- .../controllers/groups/GroupsEditCtrl.js| 34 +- .../app/scripts/controllers/mainCtrl.js | 17 +- .../controllers/users/UsersCreateCtrl.js|7 +- .../scripts/controllers/users/UsersShowCtrl.js | 49 +- .../ui/admin-web/app/scripts/services/Alert.js | 106 ++ .../ui/admin-web/app/scripts/services/Auth.js |9 +- .../ui/admin-web/app/scripts/services/Group.js |2 +- .../app/scripts/services/PermissionLoader.js|8 +- .../ui/admin-web/app/scripts/services/User.js |2 +- .../admin-web/app/scripts/services/uiAlert.js | 115 -- .../resources/ui/admin-web/app/styles/main.css | 96 ++ .../admin-web/app/views/ambariViews/edit.html |2 +- .../src/main/resources/ui/admin-web/bower.json | 15 +- .../main/resources/ui/admin-web/package.json| 19 + .../resources/ui/admin-web/test/e2e/signout.js | 43 + .../resources/ui/admin-web/test/karma.conf.js | 58 + .../ui/admin-web/test/protractor-conf.js| 51 + .../resources/ui/admin-web/test/spec/test.js| 30 - .../test/unit/controllers/mainCtrl_test.js | 54 + .../resource_management/TestFileSystem.py | 117 ++ .../python/resource_management/core/logger.py | 18 +- .../resource_management/core/providers/mount.py | 86 +- .../libraries/functions/dfs_datanode_helper.py | 149 +++ .../libraries/functions/file_system.py | 72 ++ ambari-server/pom.xml |9 + .../internal/AbstractProviderModule.java| 24 +- .../BlueprintConfigurationProcessor.java|4 + .../controller/internal/ResourceImpl.java | 19 +- .../internal/StackDefinedPropertyProvider.java | 227 ++-- .../server/controller/jmx/JMXHostProvider.java | 13 - .../controller/jmx/JMXPropertyProvider.java | 274 + .../controller/metrics/MetricsHostProvider.java | 38 + .../controller/metrics/MetricsProvider.java | 302 + .../metrics/RestMetricsPropertyProvider.java| 448 .../apache/ambari/server/view/ViewRegistry.java |2 +- .../src/main/package/deb/control/preinst|8 + .../src/main/package/rpm/preinstall.sh |8 + ambari-server/src/main/python/ambari-server.py |6 +- .../YARN/configuration/capacity-scheduler.xml |2 +- .../0.8/services/YARN/package/scripts/yarn.py |9 +- .../services/HDFS/configuration/hadoop-env.xml |6 + .../HDFS/package/scripts/hdfs_datanode.py | 38 +- .../services/HDFS/package/scripts/params.py |2 + .../configuration/capacity-scheduler.xml|2 +- .../YARN/configuration/capacity-scheduler.xml |2 +- .../services/YARN/package/scripts/yarn.py | 19 +- .../HBASE/package/scripts/hbase_decommission.py | 62 +- .../services/HBASE/package/scripts/params.py|2 +- .../services/HDFS/configuration/hadoop-env.xml |7 +- .../HDFS/package/scripts/hdfs_datanode.py | 27 +- .../services/HDFS/package/scripts/params.py | 12 +- .../services/HDFS/package/scripts/utils.py | 91 +- .../2.0.6/services/HIVE/package/scripts/hive.py | 30 +- .../YARN/configuration/capacity-scheduler.xml |2 +- .../2.0.6/services/YARN/package/scripts/yarn.py |9 +- .../templates/zookeeper_client_jaas.conf.j2 |1 - .../stacks/HDP/2.0.6/services/stack_advisor.py | 27 +- .../YARN/configuration/capacity-scheduler.xml |2 +- .../services/YARN/package/scripts/yarn.py | 19 +- .../FALCON/configuration/falcon-env.xml |2 +- .../services/FALCON/package/scripts/falcon.py |6 +- .../package/templates/startup.properties.j2 | 89 -- .../stacks/HDP/2.1/services/STORM/metrics.json | 55 +- .../YARN/configuration/capacity-scheduler.xml |2 +-
[41/50] [abbrv] git commit: AMBARI-7540 - Alerts: Stack Alerts Should Not Be Merged Into the DB (jonathanhurley)
AMBARI-7540 - Alerts: Stack Alerts Should Not Be Merged Into the DB (jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a42b7272 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a42b7272 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a42b7272 Branch: refs/heads/trunk Commit: a42b727260fde066429347f640c4cb1958f712e3 Parents: f923fd8 Author: Jonathan Hurley jhur...@hortonworks.com Authored: Mon Sep 29 11:06:22 2014 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Mon Sep 29 12:17:53 2014 -0400 -- .../ambari_agent/dummy_files/definitions.json | 2 +- .../server/api/services/AmbariMetaInfo.java | 17 ++-- .../stacks/HDP/2.0.6/services/HDFS/alerts.json | 6 +++ .../server/api/services/AmbariMetaInfoTest.java | 42 4 files changed, 62 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a42b7272/ambari-agent/src/test/python/ambari_agent/dummy_files/definitions.json -- diff --git a/ambari-agent/src/test/python/ambari_agent/dummy_files/definitions.json b/ambari-agent/src/test/python/ambari_agent/dummy_files/definitions.json index 8e01833..6e80dea 100644 --- a/ambari-agent/src/test/python/ambari_agent/dummy_files/definitions.json +++ b/ambari-agent/src/test/python/ambari_agent/dummy_files/definitions.json @@ -15,7 +15,7 @@ component: NAMENODE, label: NameNode process, interval: 6, -scope: host, +scope: HOST, uuid: 3f82ae27-fa6a-465b-b77d-67963ac55d2f, enabled: true, source: { http://git-wip-us.apache.org/repos/asf/ambari/blob/a42b7272/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java index c15f73b..28dd397 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java @@ -197,6 +197,7 @@ public class AmbariMetaInfo { alertDefinitionFactory = injector.getInstance(AlertDefinitionFactory.class); alertDefinitionDao = injector.getInstance(AlertDefinitionDAO.class); +eventPublisher = injector.getInstance(AmbariEventPublisher.class); } /** @@ -1275,12 +1276,20 @@ public class AmbariMetaInfo { continue; } -// if the definition exists in the stack and the database and they are -// not deeply equal, then merge the stack definition into the database +// definitions from the stack that are altered will not be overwritten; +// use the REST APIs to modify them instead AlertDefinition databaseDefinition = alertDefinitionFactory.coerce(entity); if (!stackDefinition.deeplyEquals(databaseDefinition)) { - entity = alertDefinitionFactory.merge(stackDefinition, entity); - persist.add(entity); + // this is the code that would normally merge the stack definition + // into the database; this is not the behavior we want today + + // entity = alertDefinitionFactory.merge(stackDefinition, entity); + // persist.add(entity); + + LOG.debug( + The alert named {} has been modified from the stack definition and will not be merged, + stackDefinition.getName()); + continue; } } http://git-wip-us.apache.org/repos/asf/ambari/blob/a42b7272/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/alerts.json -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/alerts.json b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/alerts.json index 620c89f..d81170a 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/alerts.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/alerts.json @@ -5,6 +5,7 @@ label: Percent DataNodes Live, interval: 1, scope: SERVICE, + enabled: true, source: { type: AGGREGATE, alert_name: datanode_process, @@ -30,6 +31,7 @@ label: NameNode Process, interval: 1, scope: ANY, + enabled: true, source: { type: PORT, uri: {{hdfs-site/dfs.namenode.http-address}}, @@ -49,6 +51,7 @@ label: NameNode host CPU utilization, interval: 2, scope: ANY, + enabled:
[12/50] [abbrv] git commit: AMBARI-7118. Alerts: populate incoming alert data to history and current (ncole)
AMBARI-7118. Alerts: populate incoming alert data to history and current (ncole) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0de98b02 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0de98b02 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0de98b02 Branch: refs/heads/trunk Commit: 0de98b0207b48007f39610f8dc8c0d13de6e7d92 Parents: 03a5be1 Author: Nate Cole nc...@hortonworks.com Authored: Tue Sep 2 16:24:51 2014 -0400 Committer: Nate Cole nc...@hortonworks.com Committed: Wed Sep 3 07:59:40 2014 -0400 -- .../ambari_agent/AlertSchedulerHandler.py | 2 - .../python/ambari_agent/alerts/base_alert.py| 2 + .../ambari/server/agent/HeartBeatHandler.java | 13 ++ .../apache/ambari/server/orm/dao/AlertsDAO.java | 14 ++ .../server/orm/entities/AlertCurrentEntity.java | 4 +- .../org/apache/ambari/server/state/Alert.java | 21 ++- .../server/state/cluster/AlertDataManager.java | 110 +++ .../server/orm/dao/AlertDefinitionDAOTest.java | 2 +- .../ambari/server/orm/dao/AlertsDAOTest.java| 14 ++ .../state/cluster/AlertDataManagerTest.java | 181 +++ 10 files changed, 358 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0de98b02/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py b/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py index cc5be92..e987dae 100644 --- a/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py +++ b/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py @@ -57,8 +57,6 @@ class AlertSchedulerHandler(): except: logger.critical(Could not create the cache directory {0}.format(cachedir)) pass - - self.__scheduler = Scheduler(AlertSchedulerHandler.APS_CONFIG) self.__in_minutes = in_minutes http://git-wip-us.apache.org/repos/asf/ambari/blob/0de98b02/ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py b/ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py index bf8ada6..adb872a 100644 --- a/ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py +++ b/ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py @@ -20,6 +20,7 @@ limitations under the License. import logging import re +import time import traceback logger = logging.getLogger() @@ -78,6 +79,7 @@ class BaseAlert(object): data['cluster'] = self.cluster data['service'] = self._find_value('serviceName') data['component'] = self._find_value('componentName') +data['timestamp'] = long(time.time() * 1000) self.collector.put(self.cluster, data) http://git-wip-us.apache.org/repos/asf/ambari/blob/0de98b02/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java b/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java index d0d5a13..492d832 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java @@ -60,6 +60,7 @@ import org.apache.ambari.server.state.StackInfo; import org.apache.ambari.server.state.State; import org.apache.ambari.server.state.alert.AlertDefinition; import org.apache.ambari.server.state.alert.AlertDefinitionHash; +import org.apache.ambari.server.state.cluster.AlertDataManager; import org.apache.ambari.server.state.fsm.InvalidStateTransitionException; import org.apache.ambari.server.state.host.HostHealthyHeartbeatEvent; import org.apache.ambari.server.state.host.HostRegistrationRequestEvent; @@ -114,6 +115,9 @@ public class HeartBeatHandler { @Inject private AlertDefinitionHash alertDefinitionHash; + + @Inject + private AlertDataManager alertManager; private MapString, Long hostResponseIds = new ConcurrentHashMapString, Long(); @@ -232,6 +236,15 @@ public class HeartBeatHandler { if (null == hostname || null == heartbeat) { return; } + +if (null != heartbeat.getAlerts()) { + for (Alert alert : heartbeat.getAlerts()) { +if (null == alert.getHost()) + alert.setHost(hostname); +Cluster cluster = clusterFsm.getCluster(alert.getCluster()); +alertManager.add(cluster.getClusterId(), alert); + } +} for (Cluster
[48/50] [abbrv] git commit: Merge branch 'trunk' into branch-alerts-dev
Merge branch 'trunk' into branch-alerts-dev Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9919b3f4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9919b3f4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9919b3f4 Branch: refs/heads/trunk Commit: 9919b3f4faf0ead6d7495d28e910f21cbc0f42f5 Parents: 445a53c 76e3bb4 Author: Jonathan Hurley jhur...@hortonworks.com Authored: Mon Oct 6 11:12:39 2014 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Mon Oct 6 11:12:39 2014 -0400 -- .../src/main/python/ambari_agent/Facter.py | 17 ++-- .../src/main/python/ambari_commons/os_check.py | 17 .../ambari/server/agent/HeartBeatHandler.java | 1 + .../ViewInstanceResourceDefinition.java | 5 +- .../server/api/services/AmbariMetaInfo.java | 2 +- .../apache/ambari/server/view/ViewRegistry.java | 35 .../src/main/python/ambari_server/utils.py | 4 +- ambari-server/src/main/resources/os_family.json | 6 ++ .../services/OOZIE/package/scripts/oozie.py | 2 +- .../services/OOZIE/package/scripts/params.py| 2 - .../ZOOKEEPER/configuration/zookeeper-env.xml | 1 + .../ZOOKEEPER/package/scripts/params.py | 2 + .../services/OOZIE/configuration/oozie-site.xml | 75 + .../ambari/server/view/ViewRegistryTest.java| 28 +++--- .../stacks/2.0.6/OOZIE/test_oozie_server.py | 10 +++ .../templates/main/service/services/storm.hbs | 2 +- .../app/views/main/service/services/storm.js| 8 ++ .../ui/app/controllers/slider_app_controller.js | 89 .../main/resources/ui/app/models/slider_app.js | 33 .../ui/test/integration/pages/index_test.js | 13 ++- .../controllers/slider_app_controller_test.js | 64 ++ 21 files changed, 322 insertions(+), 94 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9919b3f4/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9919b3f4/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java --
[18/50] [abbrv] git commit: AMBARI-7221 - Ambari Server REST API Memory Leak (jonathanhurley)
AMBARI-7221 - Ambari Server REST API Memory Leak (jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/813f16c0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/813f16c0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/813f16c0 Branch: refs/heads/trunk Commit: 813f16c0c731d6f6a35d8462d16194a3abac9f98 Parents: c91fab7 Author: Jonathan Hurley jhur...@hortonworks.com Authored: Tue Sep 9 21:30:46 2014 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Wed Sep 10 09:01:51 2014 -0400 -- ambari-server/conf/unix/ambari.properties | 3 ++ .../server/configuration/Configuration.java | 44 ++-- .../ambari/server/controller/AmbariServer.java | 22 +++--- 3 files changed, 52 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/813f16c0/ambari-server/conf/unix/ambari.properties -- diff --git a/ambari-server/conf/unix/ambari.properties b/ambari-server/conf/unix/ambari.properties index b77ae32..a0557b7 100644 --- a/ambari-server/conf/unix/ambari.properties +++ b/ambari-server/conf/unix/ambari.properties @@ -52,3 +52,6 @@ agent.threadpool.size.max=25 # linux open-file limit ulimit.open.files=1 + +# Server HTTP settings +server.http.session.inactive_timeout=60 http://git-wip-us.apache.org/repos/asf/ambari/blob/813f16c0/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java index a21f98c..2839c2c 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java @@ -260,12 +260,11 @@ public class Configuration { private static final String RESOURCES_DIR_DEFAULT = /var/lib/ambari-server/resources/; private static final String ANONYMOUS_AUDIT_NAME_KEY = anonymous.audit.name; - private static final String CLIENT_SECURITY_DEFAULT = local; + private static final int CLIENT_API_PORT_DEFAULT = 8080; private static final int CLIENT_API_SSL_PORT_DEFAULT = 8443; - private static final String USER_ROLE_NAME_DEFAULT = user; - private static final String ADMIN_ROLE_NAME_DEFAULT = admin; private static final String LDAP_BIND_ANONYMOUSLY_DEFAULT = true; + //TODO For embedded server only - should be removed later private static final String LDAP_PRIMARY_URL_DEFAULT = localhost:33389; private static final String LDAP_BASE_DN_DEFAULT = dc=ambari,dc=apache,dc=org; @@ -309,6 +308,8 @@ public class Configuration { private static final String VIEW_EXTRACTION_THREADPOOL_TIMEOUT_KEY = view.extraction.threadpool.timeout; private static final long VIEW_EXTRACTION_THREADPOOL_TIMEOUT_DEFAULT = 10L; + private static final String SERVER_HTTP_SESSION_INACTIVE_TIMEOUT = server.http.session.inactive_timeout; + private static final Logger LOG = LoggerFactory.getLogger( Configuration.class); private Properties properties; @@ -401,7 +402,7 @@ public class Configuration { } configsMap.put(SRVR_CRT_PASS_KEY, password); -if (this.getApiSSLAuthentication()) { +if (getApiSSLAuthentication()) { LOG.info(API SSL Authentication is turned on.); File httpsPassFile = new File(configsMap.get(CLIENT_API_SSL_KSTR_DIR_NAME_KEY) + File.separator + configsMap.get(CLIENT_API_SSL_CRT_PASS_FILE_NAME_KEY)); @@ -464,14 +465,14 @@ public class Configuration { private synchronized void loadCredentialProvider() { if (!credentialProviderInitialized) { try { -this.credentialProvider = new CredentialProvider(null, +credentialProvider = new CredentialProvider(null, getMasterKeyLocation(), isMasterKeyPersisted()); } catch (Exception e) { LOG.info(Credential provider creation failed. Reason: + e.getMessage()); if (LOG.isDebugEnabled()) { e.printStackTrace(); } -this.credentialProvider = null; +credentialProvider = null; } credentialProviderInitialized = true; } @@ -487,8 +488,9 @@ public class Configuration { //Get property file stream from classpath InputStream inputStream = Configuration.class.getClassLoader().getResourceAsStream(CONFIG_FILE); -if (inputStream == null) +if (inputStream == null) { throw new RuntimeException(CONFIG_FILE + not found in classpath); +} // load the properties try { @@ -531,8 +533,9
[29/50] [abbrv] git commit: AMBARI-7410. Alerts: add aggregate type and processing (ncole)
AMBARI-7410. Alerts: add aggregate type and processing (ncole) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/179290e0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/179290e0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/179290e0 Branch: refs/heads/trunk Commit: 179290e0fc5370b9d46a18d5ba9d187d6c1112c8 Parents: ba325d0 Author: Nate Cole nc...@hortonworks.com Authored: Fri Sep 19 10:55:54 2014 -0400 Committer: Nate Cole nc...@hortonworks.com Committed: Fri Sep 19 10:56:10 2014 -0400 -- .../server/api/services/AmbariMetaInfo.java | 22 ++- .../AlertDefinitionResourceProvider.java| 11 +- .../listeners/AlertAggregateListener.java | 144 +++ .../events/listeners/AlertReceivedListener.java | 14 +- .../apache/ambari/server/orm/dao/AlertsDAO.java | 52 ++ .../server/orm/entities/AlertCurrentEntity.java | 1 + .../orm/entities/AlertDefinitionEntity.java | 14 +- .../state/alert/AlertDefinitionFactory.java | 2 +- .../ambari/server/state/alert/MetricSource.java | 46 - .../stacks/HDP/2.0.6/services/HBASE/alerts.json | 4 +- .../stacks/HDP/2.0.6/services/HDFS/alerts.json | 30 +++- .../server/api/services/AmbariMetaInfoTest.java | 4 +- .../AlertDefinitionResourceProviderTest.java| 4 +- .../AlertGroupResourceProviderTest.java | 2 +- .../apache/ambari/server/orm/OrmTestHelper.java | 3 +- .../server/orm/dao/AlertDefinitionDAOTest.java | 9 +- .../server/orm/dao/AlertDispatchDAOTest.java| 3 +- .../ambari/server/orm/dao/AlertsDAOTest.java| 83 - .../state/cluster/AlertDataManagerTest.java | 174 ++- .../stacks/HDP/2.0.5/services/HDFS/alerts.json | 19 +- 20 files changed, 592 insertions(+), 49 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/179290e0/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java index e3e5779..ec53afc 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java @@ -31,7 +31,6 @@ import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Scanner; import java.util.Set; import java.util.concurrent.ExecutorService; @@ -48,6 +47,7 @@ import org.apache.ambari.server.api.util.StackExtensionHelper; import org.apache.ambari.server.configuration.Configuration; import org.apache.ambari.server.customactions.ActionDefinition; import org.apache.ambari.server.customactions.ActionDefinitionManager; +import org.apache.ambari.server.events.listeners.AlertAggregateListener; import org.apache.ambari.server.orm.dao.AlertDefinitionDAO; import org.apache.ambari.server.orm.dao.MetainfoDAO; import org.apache.ambari.server.orm.entities.AlertDefinitionEntity; @@ -66,6 +66,7 @@ import org.apache.ambari.server.state.StackId; import org.apache.ambari.server.state.StackInfo; import org.apache.ambari.server.state.alert.AlertDefinition; import org.apache.ambari.server.state.alert.AlertDefinitionFactory; +import org.apache.ambari.server.state.alert.SourceType; import org.apache.ambari.server.state.stack.LatestRepoCallable; import org.apache.ambari.server.state.stack.MetricDefinition; import org.apache.ambari.server.state.stack.RepositoryXml; @@ -1205,9 +1206,7 @@ public class AmbariMetaInfo { } // for every cluster -SetEntryString, Cluster clusterEntries = clusterMap.entrySet(); -for (EntryString, Cluster clusterEntry : clusterEntries) { - Cluster cluster = clusterEntry.getValue(); +for (Cluster cluster : clusterMap.values()) { long clusterId = cluster.getClusterId(); StackId stackId = cluster.getDesiredStackVersion(); StackInfo stackInfo = getStackInfo(stackId.getStackName(), @@ -1246,7 +1245,7 @@ public class AmbariMetaInfo { ListAlertDefinitionEntity persist = new ArrayListAlertDefinitionEntity(); ListAlertDefinitionEntity entities = alertDefinitionDao.findAll(clusterId); - // create a map of the enntities for fast extraction + // create a map of the entities for fast extraction MapString, AlertDefinitionEntity mappedEntities = new HashMapString, AlertDefinitionEntity(100); for (AlertDefinitionEntity entity : entities) { mappedEntities.put(entity.getDefinitionName(), entity); @@ -1279,9 +1278,20 @@ public class AmbariMetaInfo {
[46/50] [abbrv] git commit: AMBARI-7642 - Alerts: Maintenance Mode Should Prevent Alert Notifications (jonathanhurley)
AMBARI-7642 - Alerts: Maintenance Mode Should Prevent Alert Notifications (jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3e54f956 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3e54f956 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3e54f956 Branch: refs/heads/trunk Commit: 3e54f95689d7854fc17a31a2734aea080efd7d71 Parents: 6f9398f Author: Jonathan Hurley jhur...@hortonworks.com Authored: Fri Oct 3 16:23:31 2014 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Fri Oct 3 23:13:44 2014 -0400 -- .../apache/ambari/server/EagerSingleton.java| 43 ++ .../server/controller/ControllerModule.java | 56 ++- .../server/events/AlertStateChangeEvent.java| 26 +- .../ambari/server/events/AmbariEvent.java | 7 +- .../server/events/MaintenanceModeEvent.java | 175 +++ .../listeners/AlertAggregateListener.java | 2 + .../listeners/AlertLifecycleListener.java | 2 + .../listeners/AlertMaintenanceModeListener.java | 199 .../events/listeners/AlertReceivedListener.java | 6 +- .../listeners/AlertServiceStateListener.java| 2 + .../listeners/AlertStateChangedListener.java| 11 + .../apache/ambari/server/state/ServiceImpl.java | 5 + .../ambari/server/state/host/HostImpl.java | 133 +++--- .../svccomphost/ServiceComponentHostImpl.java | 13 + .../apache/ambari/server/events/EventsTest.java | 188 .../ambari/server/events/MockEventListener.java | 99 .../ambari/server/orm/dao/AlertsDAOTest.java| 456 --- .../state/cluster/AlertDataManagerTest.java | 10 +- 18 files changed, 1280 insertions(+), 153 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3e54f956/ambari-server/src/main/java/org/apache/ambari/server/EagerSingleton.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/EagerSingleton.java b/ambari-server/src/main/java/org/apache/ambari/server/EagerSingleton.java new file mode 100644 index 000..dde4143 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/EagerSingleton.java @@ -0,0 +1,43 @@ +/** + * 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 and + * limitations under the License. + */ +package org.apache.ambari.server; + +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import com.google.inject.Module; +import com.google.inject.ScopeAnnotation; +import com.google.inject.Singleton; +import com.google.inject.binder.AnnotatedBindingBuilder; + +/** + * The {@link EagerSingleton} annotation is used to mark a {@link Singleton} + * class as being needed to be eagerly registered by a {@link Module}. + * p/ + * Classes marked with this annotation should also be {@link Singleton}. They + * will be discovered on the classpath and then + * {@link AnnotatedBindingBuilder#asEagerSingleton()} will be invoked on them. + */ +@Target({ ElementType.TYPE }) +@Retention(RUNTIME) +@ScopeAnnotation +public @interface EagerSingleton { +} http://git-wip-us.apache.org/repos/asf/ambari/blob/3e54f956/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java index da78639..535a75e 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java @@ -39,6 +39,7 @@ import java.util.Map.Entry; import java.util.Properties; import java.util.Set; +import org.apache.ambari.server.EagerSingleton; import org.apache.ambari.server.actionmanager.ActionDBAccessor; import
[06/50] [abbrv] git commit: Merge branch 'trunk' into branch-alerts-dev
Merge branch 'trunk' into branch-alerts-dev Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/52d1af76 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/52d1af76 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/52d1af76 Branch: refs/heads/trunk Commit: 52d1af7634e4a13ea4f9b94e34a1734c2bcd416c Parents: 76fc94e 869b00c Author: Jonathan Hurley jhur...@hortonworks.com Authored: Thu Aug 28 13:49:15 2014 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Thu Aug 28 13:49:15 2014 -0400 -- .../resource_management/TestPackageResource.py | 6 +- .../core/providers/package/apt.py | 11 +- .../libraries/script/script.py | 9 +- ambari-server/pom.xml | 22 ++ .../ambari/server/api/query/QueryImpl.java | 1 - .../resources/ResourceInstanceFactoryImpl.java | 4 + ...ackLevelConfigurationResourceDefinition.java | 53 +++ .../StackVersionResourceDefinition.java | 1 + .../server/api/services/AmbariMetaInfo.java | 34 +- .../server/api/services/StacksService.java | 35 +- .../server/api/util/StackExtensionHelper.java | 105 -- .../controller/AmbariManagementController.java | 8 + .../AmbariManagementControllerImpl.java | 44 +++ .../StackLevelConfigurationRequest.java | 42 +++ .../StackLevelConfigurationResponse.java| 37 +++ .../server/controller/StackVersionResponse.java | 14 +- .../AbstractControllerResourceProvider.java | 2 + ...StackLevelConfigurationResourceProvider.java | 159 + .../internal/StackVersionResourceProvider.java | 6 + .../ambari/server/controller/spi/Resource.java | 4 +- .../apache/ambari/server/state/ServiceInfo.java | 1 + .../apache/ambari/server/state/StackInfo.java | 26 +- .../ambari/server/view/ViewContextImpl.java | 9 + .../apache/ambari/server/view/ViewRegistry.java | 30 +- .../main/resources/custom_actions/check_host.py | 2 +- .../src/main/resources/key_properties.json | 5 + .../src/main/resources/properties.json | 11 + .../src/main/resources/scripts/stack_advisor.py | 2 +- .../HDP/1.3.2/configuration/cluster-env.xml | 49 +++ .../1.3.2/hooks/before-START/scripts/params.py | 4 +- .../HDP/1.3.2/services/HBASE/metainfo.xml | 2 +- .../stacks/HDP/1.3.2/services/HDFS/metainfo.xml | 4 +- .../HIVE/package/scripts/hive_service.py| 2 +- .../HDP/1.3.2/services/MAPREDUCE/metainfo.xml | 9 +- .../OOZIE/package/scripts/oozie_service.py | 2 +- .../stacks/HDP/1.3.2/services/PIG/metainfo.xml | 2 +- .../HDP/1.3.2/services/ZOOKEEPER/metainfo.xml | 2 +- .../stacks/HDP/1.3.2/services/stack_advisor.py | 4 +- .../HDP/2.0.6/configuration/cluster-env.xml | 49 +++ .../HDP/2.0.6/services/HBASE/metainfo.xml | 2 +- .../stacks/HDP/2.0.6/services/HDFS/metainfo.xml | 4 +- .../HIVE/package/scripts/hive_service.py| 2 +- .../OOZIE/package/scripts/oozie_service.py | 2 +- .../stacks/HDP/2.0.6/services/PIG/metainfo.xml | 10 +- .../stacks/HDP/2.0.6/services/YARN/metainfo.xml | 4 +- .../HDP/2.0.6/services/ZOOKEEPER/metainfo.xml | 2 +- .../stacks/HDP/2.0.6/services/stack_advisor.py | 60 ++-- .../services/FALCON/configuration/global.xml| 63 .../2.1.GlusterFS/services/FALCON/metainfo.xml | 19 +- .../GLUSTERFS/configuration/core-site.xml | 169 -- .../services/GLUSTERFS/configuration/global.xml | 59 .../services/GLUSTERFS/metainfo.xml | 1 + .../services/STORM/configuration/global.xml | 39 --- .../2.1.GlusterFS/services/STORM/metainfo.xml | 1 + .../services/TEZ/configuration/global.xml | 29 -- .../HDP/2.1.GlusterFS/services/TEZ/metainfo.xml | 22 +- .../stacks/HDP/2.1/services/FALCON/metainfo.xml | 10 + .../stacks/HDP/2.1/services/stack_advisor.py| 14 +- .../main/resources/stacks/HDP/stack_advisor.py | 37 --- .../src/main/resources/stacks/stack_advisor.py | 37 +++ .../ambari/server/api/query/QueryImplTest.java | 2 +- .../server/api/services/AmbariMetaInfoTest.java | 4 +- .../api/util/StackExtensionHelperTest.java | 23 +- .../AmbariManagementControllerTest.java | 2 +- .../internal/AbstractResourceProviderTest.java | 45 +++ ...kLevelConfigurationResourceProviderTest.java | 181 +++ .../ambari/server/view/ViewRegistryTest.java| 50 +++ ambari-server/src/test/python/TestCheckHost.py | 2 +- .../src/test/python/TestResourceFilesKeeper.py | 2 +- .../src/test/python/TestStackAdvisor.py | 93 ++ .../stacks/1.3.2/HIVE/test_hive_metastore.py| 4 +- .../stacks/1.3.2/HIVE/test_hive_server.py | 4 +- .../hooks/before-START/test_before_start.py | 2 +- .../stacks/2.0.6/HDFS/test_hdfs_client.py | 4 +
[39/50] [abbrv] git commit: AMBARI-7534 - Alerts: Disabling an Alert Should Propagate to Agent (jonathanhurley)
AMBARI-7534 - Alerts: Disabling an Alert Should Propagate to Agent (jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/10f1f73b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/10f1f73b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/10f1f73b Branch: refs/heads/trunk Commit: 10f1f73b810e2c84d5818314ff9d1743c644a3bf Parents: 7324374 Author: Jonathan Hurley jhur...@hortonworks.com Authored: Sat Sep 27 09:33:43 2014 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Sat Sep 27 09:33:43 2014 -0400 -- .../ambari_agent/AlertSchedulerHandler.py | 27 ++-- .../python/ambari_agent/alerts/base_alert.py| 12 +++- .../src/test/python/ambari_agent/TestAlerts.py | 68 +++- .../ambari_agent/dummy_files/definitions.json | 1 + 4 files changed, 101 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/10f1f73b/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py b/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py index 8dcce50..c645cba 100644 --- a/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py +++ b/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py @@ -125,7 +125,7 @@ class AlertSchedulerHandler(): uuid_valid = False for definition in definitions: -definition_uuid = definition.definition_uuid() +definition_uuid = definition.get_uuid() if scheduled_job.name == definition_uuid: uuid_valid = True break @@ -141,7 +141,7 @@ class AlertSchedulerHandler(): for definition in definitions: definition_scheduled = False for scheduled_job in scheduled_jobs: -definition_uuid = definition.definition_uuid() +definition_uuid = definition.get_uuid() if definition_uuid == scheduled_job.name: definition_scheduled = True break @@ -264,7 +264,16 @@ class AlertSchedulerHandler(): ''' Schedule a definition (callable). Scheduled jobs are given the UUID as their name so that they can be identified later on. +p/ +This function can be called with a definition that is disabled; it will +simply NOOP. ''' +# NOOP if the definition is disabled; don't schedule it +if definition.is_enabled() == False: + logger.info(The alert {0} with UUID {1} is disabled and will not be scheduled.format( + definition.get_name(),definition.get_uuid())) + return + job = None if self.__in_minutes: @@ -277,10 +286,20 @@ class AlertSchedulerHandler(): # although the documentation states that Job(kwargs) takes a name # key/value pair, it does not actually set the name; do it manually if job is not None: - job.name = definition.definition_uuid() + job.name = definition.get_uuid() logger.info(Scheduling {0} with UUID {1}.format( - definition.definition_name(), definition.definition_uuid())) + definition.get_name(), definition.get_uuid())) + + def get_job_count(self): +''' +Gets the number of jobs currently scheduled. This is mainly used for +test verification of scheduling +''' +if self.__scheduler is None: + return 0 + +return len(self.__scheduler.get_jobs()) def main(): args = list(sys.argv) http://git-wip-us.apache.org/repos/asf/ambari/blob/10f1f73b/ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py b/ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py index 10dcff8..a3eb404 100644 --- a/ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py +++ b/ambari-agent/src/main/python/ambari_agent/alerts/base_alert.py @@ -48,14 +48,21 @@ class BaseAlert(object): return 1 if interval 1 else interval - def definition_name(self): + def is_enabled(self): +''' +gets whether the definition is enabled +''' +return self.alert_meta['enabled'] + + + def get_name(self): ''' gets the unique name of the alert definition ''' return self.alert_meta['name'] - def definition_uuid(self): + def get_uuid(self): ''' gets the unique has of the alert definition ''' @@ -101,6 +108,7 @@ class BaseAlert(object): data['component'] = self._find_value('componentName') data['timestamp'] = long(time.time() * 1000) data['uuid'] = self._find_value('uuid') +data['enabled'] = self._find_value('enabled') if
[27/50] [abbrv] git commit: Merge branch 'trunk' into branch-alerts-dev
Merge branch 'trunk' into branch-alerts-dev Conflicts: ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f1018b17 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f1018b17 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f1018b17 Branch: refs/heads/trunk Commit: f1018b176a64451c2d62fcd3e2f5238e4587ab02 Parents: a4e97aa 5fc5828 Author: Jonathan Hurley jhur...@hortonworks.com Authored: Thu Sep 18 10:43:23 2014 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Thu Sep 18 10:43:23 2014 -0400 -- .../ui/admin-web/app/scripts/services/View.js | 19 +-- .../resources/ui/admin-web/app/styles/main.css | 87 ++ .../app/views/ambariViews/listTable.html| 19 ++- ambari-admin/src/main/resources/view.xml| 1 + .../resource_management/TestCopyFromLocal.py| 8 +- .../ambari/groovy/client/AmbariClient.groovy| 7 +- .../libraries/providers/copy_from_local.py | 12 +- .../libraries/resources/copy_from_local.py | 3 +- .../server/api/util/StackExtensionHelper.java | 9 +- .../internal/ClientConfigResourceProvider.java | 35 +++- .../server/orm/entities/AlertNoticeEntity.java | 51 -- .../ambari/server/state/ConfigHelper.java | 21 ++- .../server/state/cluster/ClusterImpl.java | 3 +- .../server/upgrade/UpgradeCatalog161.java | 1 - .../server/upgrade/UpgradeCatalog170.java | 28 +++- .../main/resources/Ambari-DDL-MySQL-CREATE.sql | 7 +- .../main/resources/Ambari-DDL-Oracle-CREATE.sql | 7 +- .../resources/Ambari-DDL-Postgres-CREATE.sql| 7 +- .../Ambari-DDL-Postgres-EMBEDDED-CREATE.sql | 7 +- .../services/HDFS/configuration/hadoop-env.xml | 2 +- .../GANGLIA/configuration/ganglia-env.xml | 5 + .../GANGLIA/package/scripts/ganglia_monitor.py | 4 +- .../services/GANGLIA/package/scripts/params.py | 24 +-- .../HIVE/package/scripts/install_jars.py| 28 ++-- .../services/HIVE/package/scripts/params.py | 11 +- .../services/NAGIOS/package/files/sys_logger.py | 30 ++-- .../stacks/HDP/2.2.1/role_command_order.json| 2 +- .../services/TEZ/configuration/tez-site.xml | 29 .../stacks/HDP/2.2/role_command_order.json | 3 +- .../SLIDER/configuration/slider-client.xml | 56 +++ .../SLIDER/configuration/slider-log4j.xml | 89 ++ .../stacks/HDP/2.2/services/SLIDER/metainfo.xml | 72 .../SLIDER/package/files/hbaseSmokeVerify.sh| 34 .../services/SLIDER/package/scripts/__init__.py | 19 +++ .../services/SLIDER/package/scripts/params.py | 45 + .../SLIDER/package/scripts/service_check.py | 45 + .../services/SLIDER/package/scripts/slider.py | 68 .../SLIDER/package/scripts/slider_client.py | 43 + .../SLIDER/package/templates/slider-wrapper.j2 | 42 + .../2.2/services/TEZ/configuration/tez-site.xml | 29 .../ClientConfigResourceProviderTest.java | 24 ++- .../server/orm/dao/AlertDefinitionDAOTest.java | 1 + .../server/upgrade/UpgradeCatalog161Test.java | 4 - .../server/upgrade/UpgradeCatalog170Test.java | 114 ++--- .../stacks/2.0.6/HIVE/test_hive_server.py | 3 +- .../stacks/2.2/SLIDER/test_slider_client.py | 109 + .../test/python/stacks/2.2/configs/default.json | 115 + .../test/python/stacks/2.2/configs/secured.json | 79 + ambari-shell/ambari-groovy-shell/pom.xml| 11 ++ .../ambari/shell/commands/ConfigCommands.java | 163 +++ .../shell/completion/AbstractCompletion.java| 34 .../ambari/shell/completion/Blueprint.java | 9 +- .../ambari/shell/completion/ConfigType.java | 29 .../apache/ambari/shell/completion/Host.java| 9 +- .../apache/ambari/shell/completion/Service.java | 12 +- .../configuration/ConverterConfiguration.java | 6 + .../shell/converter/AbstractConverter.java | 63 +++ .../shell/converter/BlueprintConverter.java | 21 +-- .../shell/converter/ConfigTypeConverter.java| 45 + .../ambari/shell/converter/HostConverter.java | 21 +-- .../shell/converter/ServiceConverter.java | 24 +-- .../shell/commands/ConfigCommandsTest.java | 98 +++ .../src/test/resources/core-site.xml| 13 ++ ambari-web/app/controllers/application.js | 8 +- ambari-web/app/controllers/main.js | 1 - .../resourceManager/wizard_controller.js| 1 - ambari-web/app/controllers/main/host/details.js | 9 +- .../controllers/main/service/info/configs.js| 42 +++-- .../main/service/reassign/step2_controller.js | 1 + .../app/controllers/main/views_controller.js| 6 +-
[34/50] [abbrv] git commit: Merge branch 'trunk' into branch-alerts-dev
Merge branch 'trunk' into branch-alerts-dev Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/090ed514 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/090ed514 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/090ed514 Branch: refs/heads/trunk Commit: 090ed5143c3869e070c0df91d15c3f77fffcd8f8 Parents: d838ca9 efa0fa6 Author: Jonathan Hurley jhur...@hortonworks.com Authored: Tue Sep 23 09:02:47 2014 -0700 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Tue Sep 23 09:02:47 2014 -0700 -- .../resources/ui/admin-web/app/styles/main.css | 5 + .../BlueprintConfigurationProcessor.java| 184 +++- ambari-server/src/main/python/ambari-server.py | 53 +- .../services/HIVE/package/scripts/params.py | 4 + .../services/HIVE/package/scripts/webhcat.py| 4 +- .../stacks/HDP/2.2/services/HIVE/metainfo.xml | 6 - .../BlueprintConfigurationProcessorTest.java| 906 ++- .../src/test/python/TestAmbariServer.py | 72 +- ambari-web/app/messages.js | 4 +- ambari-web/app/styles/application.less | 8 +- .../common/configs/config_history_flow.hbs | 124 +-- .../common/configs/service_version_box.hbs | 3 +- .../views/common/configs/config_history_flow.js | 14 +- ambari-web/app/views/main/host.js | 10 +- contrib/views/slider/docs/index.md | 20 +- .../view/slider/SliderAppsViewController.java | 1 + .../slider/SliderAppsViewControllerImpl.java| 2 +- .../rest/client/SliderAppMasterClient.java | 2 +- .../resources/ui/app/assets/data/apps/apps.json | 2 +- .../assets/data/resource/slider-properties.json | 1 + .../ui/app/controllers/slider_app_controller.js | 139 ++- .../ui/app/mappers/slider_apps_mapper.js| 9 +- .../ui/app/models/slider_app_component.js | 16 +- .../src/main/resources/ui/app/routes/main.js| 21 +- .../resources/ui/app/styles/application.less| 32 + .../resources/ui/app/templates/slider_app.hbs | 9 +- .../slider_app/destroy/destroy_popup.hbs| 20 + .../slider_app/destroy/destroy_popup_footer.hbs | 28 + .../ui/app/templates/slider_app/summary.hbs | 8 +- .../src/main/resources/ui/app/translations.js | 5 + .../slider_app/destroy_modal_footer_view.js | 41 + .../app/views/slider_app/destroy_popup_view.js | 37 + .../views/slider/src/main/resources/view.xml| 7 +- 33 files changed, 1613 insertions(+), 184 deletions(-) --
[35/50] [abbrv] git commit: AMBARI-7480 - Alerts: data collection starts on install before config values are available (jonathanhurley)
AMBARI-7480 - Alerts: data collection starts on install before config values are available (jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ae9bf4c3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ae9bf4c3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ae9bf4c3 Branch: refs/heads/trunk Commit: ae9bf4c38705074821c853301c079f2f2c484ed7 Parents: 090ed51 Author: Jonathan Hurley jhur...@hortonworks.com Authored: Wed Sep 24 12:56:54 2014 -0700 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Wed Sep 24 13:49:59 2014 -0700 -- .../server/agent/AlertDefinitionCommand.java| 15 ++-- .../ambari/server/agent/HeartBeatHandler.java | 2 +- .../server/api/services/AmbariMetaInfo.java | 45 ++ .../server/controller/ControllerModule.java | 4 + .../AlertDefinitionResourceProvider.java| 11 ++- .../AlertDefinitionRegistrationEvent.java | 57 .../ambari/server/events/AmbariEvent.java | 24 ++--- .../ambari/server/events/ClusterEvent.java | 50 +++ .../ambari/server/events/ServiceEvent.java | 2 +- .../listeners/AlertAggregateListener.java | 92 .../listeners/AlertLifecycleListener.java | 73 .../server/orm/dao/AlertDefinitionDAO.java | 40 + .../state/alert/AggregateDefinitionMapping.java | 88 +++ .../server/state/alert/AlertDefinition.java | 20 + .../state/alert/AlertDefinitionFactory.java | 3 +- .../server/state/alert/AlertDefinitionHash.java | 19 +++- .../AlertGroupResourceProviderTest.java | 2 +- .../apache/ambari/server/orm/OrmTestHelper.java | 2 +- .../server/orm/dao/AlertDefinitionDAOTest.java | 2 +- .../server/orm/dao/AlertDispatchDAOTest.java| 2 +- .../ambari/server/orm/dao/AlertsDAOTest.java| 6 +- .../state/cluster/AlertDataManagerTest.java | 59 - 22 files changed, 482 insertions(+), 136 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ae9bf4c3/ambari-server/src/main/java/org/apache/ambari/server/agent/AlertDefinitionCommand.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/agent/AlertDefinitionCommand.java b/ambari-server/src/main/java/org/apache/ambari/server/agent/AlertDefinitionCommand.java index 5ae1741..fdd7f1d 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/agent/AlertDefinitionCommand.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/agent/AlertDefinitionCommand.java @@ -34,6 +34,12 @@ import com.google.gson.annotations.SerializedName; * The {@link AlertDefinitionCommand} class is used to encapsulate the * {@link AlertDefinition}s that will be returned to an agent given a requested * hash. + * p/ + * Commands must have {@link #addConfigs(ConfigHelper, Cluster)} invoked before + * being sent to the agent so that the definitions will have the required + * configuration data when they run. Failure to do this will cause the alerts to + * be scheduled and run, but the result will always be a failure since the + * parameterized properties they depend on will not be available. */ public class AlertDefinitionCommand extends AgentCommand { @SerializedName(clusterName) @@ -47,7 +53,7 @@ public class AlertDefinitionCommand extends AgentCommand { @SerializedName(alertDefinitions) private final ListAlertDefinition m_definitions; - + @SerializedName(configurations) private MapString, MapString, String m_configurations; @@ -118,7 +124,7 @@ public class AlertDefinitionCommand extends AgentCommand { /** * Adds cluster configuration properties as required by commands sent to agent. - * + * * @param configHelper the helper * @param cluster the cluster, matching the cluster name specified by the command */ @@ -129,7 +135,7 @@ public class AlertDefinitionCommand extends AgentCommand { MapString, MapString, String allConfigTags = configHelper.getEffectiveDesiredTags(cluster, m_hostName); - + for(Config clusterConfig: cluster.getAllConfigs()) { if (null == clusterConfig) { // !!! hard to believe @@ -158,8 +164,5 @@ public class AlertDefinitionCommand extends AgentCommand { m_configurations.put(clusterConfig.getType(), props); } - } - - } http://git-wip-us.apache.org/repos/asf/ambari/blob/ae9bf4c3/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java
[23/50] [abbrv] git commit: AMBARI-7316 - Alerts: Create Alert Notices For Incoming Alert State Changes (jonathanhurley)
AMBARI-7316 - Alerts: Create Alert Notices For Incoming Alert State Changes (jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/760bedfe Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/760bedfe Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/760bedfe Branch: refs/heads/trunk Commit: 760bedfe32f2a673a14cc14e7f2d41794ca3db98 Parents: aaf0513 Author: Jonathan Hurley jhur...@hortonworks.com Authored: Mon Sep 15 14:04:42 2014 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Mon Sep 15 14:04:42 2014 -0400 -- .../ambari/server/agent/HeartBeatHandler.java | 20 ++- .../server/controller/ControllerModule.java | 15 ++ .../apache/ambari/server/events/AlertEvent.java | 58 +++ .../server/events/AlertReceivedEvent.java | 50 +++ .../server/events/AlertStateChangeEvent.java| 85 +++ .../events/listeners/AlertReceivedListener.java | 150 +++ .../listeners/AlertStateChangedListener.java| 98 .../events/publishers/AlertEventPublisher.java | 100 + .../ambari/server/orm/dao/AlertDispatchDAO.java | 22 +++ .../server/orm/entities/AlertGroupEntity.java | 7 +- .../org/apache/ambari/server/state/Alert.java | 55 --- .../server/state/cluster/AlertDataManager.java | 111 -- .../server/orm/dao/AlertDispatchDAOTest.java| 29 .../state/cluster/AlertDataManagerTest.java | 129 14 files changed, 753 insertions(+), 176 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/760bedfe/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java b/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java index 492d832..a366301 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java @@ -39,6 +39,9 @@ import org.apache.ambari.server.actionmanager.HostRoleStatus; import org.apache.ambari.server.api.services.AmbariMetaInfo; import org.apache.ambari.server.configuration.Configuration; import org.apache.ambari.server.controller.MaintenanceStateHelper; +import org.apache.ambari.server.events.AlertEvent; +import org.apache.ambari.server.events.AlertReceivedEvent; +import org.apache.ambari.server.events.publishers.AlertEventPublisher; import org.apache.ambari.server.metadata.ActionMetadata; import org.apache.ambari.server.state.AgentVersion; import org.apache.ambari.server.state.Alert; @@ -60,7 +63,6 @@ import org.apache.ambari.server.state.StackInfo; import org.apache.ambari.server.state.State; import org.apache.ambari.server.state.alert.AlertDefinition; import org.apache.ambari.server.state.alert.AlertDefinitionHash; -import org.apache.ambari.server.state.cluster.AlertDataManager; import org.apache.ambari.server.state.fsm.InvalidStateTransitionException; import org.apache.ambari.server.state.host.HostHealthyHeartbeatEvent; import org.apache.ambari.server.state.host.HostRegistrationRequestEvent; @@ -115,9 +117,12 @@ public class HeartBeatHandler { @Inject private AlertDefinitionHash alertDefinitionHash; - + + /** + * Publishes {@link AlertEvent} instances. + */ @Inject - private AlertDataManager alertManager; + private AlertEventPublisher alertEventPublisher; private MapString, Long hostResponseIds = new ConcurrentHashMapString, Long(); @@ -236,13 +241,16 @@ public class HeartBeatHandler { if (null == hostname || null == heartbeat) { return; } - + if (null != heartbeat.getAlerts()) { for (Alert alert : heartbeat.getAlerts()) { -if (null == alert.getHost()) +if (null == alert.getHost()) { alert.setHost(hostname); +} + Cluster cluster = clusterFsm.getCluster(alert.getCluster()); -alertManager.add(cluster.getClusterId(), alert); +AlertEvent event = new AlertReceivedEvent(cluster.getClusterId(), alert); +alertEventPublisher.publish(event); } } http://git-wip-us.apache.org/repos/asf/ambari/blob/760bedfe/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java index c395df6..8413762 100644 ---
[04/50] [abbrv] git commit: Merge branch 'trunk' into branch-alerts-dev
Merge branch 'trunk' into branch-alerts-dev Conflicts: ambari-server/src/main/java/org/apache/ambari/server/agent/ExecutionCommand.java ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java ambari-server/src/main/java/org/apache/ambari/server/utils/StageUtils.java ambari-server/src/test/java/org/apache/ambari/server/utils/TestStageUtils.java Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ae8f1e77 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ae8f1e77 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ae8f1e77 Branch: refs/heads/trunk Commit: ae8f1e77eafe32c2ad8bded7da24a2cef07b605f Parents: 4a4644b a826334 Author: Jonathan Hurley jhur...@hortonworks.com Authored: Wed Aug 27 10:04:14 2014 -0400 Committer: Jonathan Hurley jhur...@hortonworks.com Committed: Wed Aug 27 10:04:14 2014 -0400 -- ambari-agent/conf/unix/install-helper.sh| 7 - ambari-agent/pom.xml| 11 +- ambari-server/conf/unix/install-helper.sh | 3 - .../server/actionmanager/ActionScheduler.java | 33 ++ .../ambari/server/actionmanager/Stage.java | 32 +- .../server/actionmanager/StageFactory.java | 4 +- .../ambari/server/agent/ExecutionCommand.java | 2 +- .../resources/RequestResourceDefinition.java| 12 +- .../ServiceConfigVersionResourceDefinition.java | 10 +- .../server/api/services/AmbariMetaInfo.java | 18 + .../stackadvisor/StackAdvisorHelper.java| 14 +- .../stackadvisor/StackAdvisorHelper.java.orig | 116 .../stackadvisor/StackAdvisorResponse.java | 73 +++ ...GetComponentLayoutRecommnedationCommand.java | 5 +- .../GetComponentLayoutValidationCommand.java| 5 +- .../GetConfigurationRecommnedationCommand.java | 18 +- .../GetConfigurationValidationCommand.java | 5 +- .../commands/StackAdvisorCommand.java | 30 +- .../recommendations/RecommendationResponse.java | 38 +- .../validations/ValidationResponse.java | 15 +- .../server/api/util/StackExtensionHelper.java | 9 + .../controller/AmbariActionExecutionHelper.java | 9 +- .../AmbariCustomCommandExecutionHelper.java | 34 +- .../AmbariManagementControllerImpl.java | 184 --- .../server/controller/ClusterRequest.java | 28 +- .../server/controller/ClusterResponse.java | 9 +- .../server/controller/ConfigGroupRequest.java | 9 + .../ambari/server/controller/HostRequest.java | 11 +- .../controller/ServiceConfigVersionRequest.java | 23 + .../ServiceConfigVersionResponse.java | 13 +- .../StackServiceComponentResponse.java | 33 +- .../server/controller/StackServiceResponse.java | 16 +- .../internal/AbstractResourceProvider.java | 92 ++-- .../internal/BaseBlueprintProcessor.java| 37 +- .../BlueprintConfigurationProcessor.java| 5 +- .../internal/ClusterResourceProvider.java | 126 +++-- .../internal/ConfigGroupResourceProvider.java | 4 + .../internal/HostResourceProvider.java | 54 +- .../RecommendationResourceProvider.java | 4 +- .../ServiceConfigVersionResourceProvider.java | 12 +- .../StackServiceComponentResourceProvider.java | 22 +- .../internal/StackServiceResourceProvider.java | 22 +- .../internal/ValidationResourceProvider.java| 4 +- .../internal/ViewInstanceResourceProvider.java | 9 +- .../internal/ViewVersionResourceProvider.java | 3 + .../ambari/server/orm/dao/ServiceConfigDAO.java | 41 +- .../server/orm/entities/AlertGroupEntity.java | 74 ++- .../ambari/server/orm/entities/StageEntity.java | 28 + .../ambari/server/orm/entities/ViewEntity.java | 39 +- .../ambari/server/stageplanner/RoleGraph.java | 3 +- .../org/apache/ambari/server/state/Cluster.java | 15 +- .../ambari/server/state/ComponentInfo.java | 14 +- .../ambari/server/state/ConfigHelper.java | 15 +- .../apache/ambari/server/state/ServiceInfo.java | 9 + .../server/state/cluster/ClusterImpl.java | 119 +++- .../server/upgrade/AbstractUpgradeCatalog.java | 3 +- .../server/upgrade/UpgradeCatalog170.java | 19 +- .../apache/ambari/server/utils/StageUtils.java | 13 +- .../apache/ambari/server/view/ViewRegistry.java | 15 + .../server/view/configuration/ViewConfig.java | 14 + .../main/resources/Ambari-DDL-MySQL-CREATE.sql | 5 +- .../main/resources/Ambari-DDL-Oracle-CREATE.sql | 5 +- .../resources/Ambari-DDL-Postgres-CREATE.sql| 5 +- .../Ambari-DDL-Postgres-EMBEDDED-CREATE.sql | 5 +- .../main/resources/custom_actions/check_host.py | 7 +- .../src/main/resources/properties.json | 7 +-
git commit: AMBARI-7661. Slider View: App types not being returned in API when multiple instances present (srimanth)
Repository: ambari Updated Branches: refs/heads/trunk 80bceaf3a - 4a4b0e693 AMBARI-7661. Slider View: App types not being returned in API when multiple instances present (srimanth) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4a4b0e69 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4a4b0e69 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4a4b0e69 Branch: refs/heads/trunk Commit: 4a4b0e69353d9cc675632e71f31c9c90db337166 Parents: 80bceaf Author: Srimanth Gunturi sgunt...@hortonworks.com Authored: Mon Oct 6 14:09:07 2014 -0700 Committer: Srimanth Gunturi sgunt...@hortonworks.com Committed: Mon Oct 6 14:09:07 2014 -0700 -- .../apache/ambari/view/slider/SliderAppsViewControllerImpl.java | 3 --- 1 file changed, 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4a4b0e69/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java -- diff --git a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java index e23fdd6..068ce9c 100644 --- a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java +++ b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java @@ -723,9 +723,6 @@ public class SliderAppsViewControllerImpl implements SliderAppsViewController { @Override public ListSliderAppType getSliderAppTypes(SetString properties) { if (appTypes == null) { - if (!areViewParametersSet()) { -return Collections.emptyList(); - } appTypes = loadAppTypes(); } return appTypes;
git commit: AMBARI-7661. Slider View: App types not being returned in API when multiple instances present (srimanth)
Repository: ambari Updated Branches: refs/heads/branch-1.7.0 522467ea4 - 473fca01d AMBARI-7661. Slider View: App types not being returned in API when multiple instances present (srimanth) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/473fca01 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/473fca01 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/473fca01 Branch: refs/heads/branch-1.7.0 Commit: 473fca01d64f851aae043207451333f65188466b Parents: 522467e Author: Srimanth Gunturi sgunt...@hortonworks.com Authored: Mon Oct 6 14:09:07 2014 -0700 Committer: Srimanth Gunturi sgunt...@hortonworks.com Committed: Mon Oct 6 14:18:23 2014 -0700 -- .../apache/ambari/view/slider/SliderAppsViewControllerImpl.java | 3 --- 1 file changed, 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/473fca01/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java -- diff --git a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java index e23fdd6..068ce9c 100644 --- a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java +++ b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java @@ -723,9 +723,6 @@ public class SliderAppsViewControllerImpl implements SliderAppsViewController { @Override public ListSliderAppType getSliderAppTypes(SetString properties) { if (appTypes == null) { - if (!areViewParametersSet()) { -return Collections.emptyList(); - } appTypes = loadAppTypes(); } return appTypes;
git commit: AMBARI-7643. Jobs view: Input/Output bytes shows up as 0 for some jobs (alejandro)
Repository: ambari Updated Branches: refs/heads/branch-1.7.0 473fca01d - 165356e26 AMBARI-7643. Jobs view: Input/Output bytes shows up as 0 for some jobs (alejandro) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/165356e2 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/165356e2 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/165356e2 Branch: refs/heads/branch-1.7.0 Commit: 165356e267c463421aea2b665ea07c8d82ae8a51 Parents: 473fca0 Author: Alejandro Fernandez afernan...@hortonworks.com Authored: Mon Oct 6 11:48:35 2014 -0700 Committer: Alejandro Fernandez afernan...@hortonworks.com Committed: Mon Oct 6 15:03:13 2014 -0700 -- .../src/main/resources/ui/app/scripts/models/jobs/tez_dag.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/165356e2/contrib/views/jobs/src/main/resources/ui/app/scripts/models/jobs/tez_dag.js -- diff --git a/contrib/views/jobs/src/main/resources/ui/app/scripts/models/jobs/tez_dag.js b/contrib/views/jobs/src/main/resources/ui/app/scripts/models/jobs/tez_dag.js index 5797120..b4dec2b 100644 --- a/contrib/views/jobs/src/main/resources/ui/app/scripts/models/jobs/tez_dag.js +++ b/contrib/views/jobs/src/main/resources/ui/app/scripts/models/jobs/tez_dag.js @@ -162,11 +162,11 @@ App.TezDagVertex = DS.Model.extend({ recordWriteCount: DS.attr('number'), totalReadBytes: function () { -return this.get('fileReadBytes') + this.get('hdfsReadBytes'); +return (this.get('fileReadBytes') || 0) + (this.get('hdfsReadBytes') || 0); }.property('fileReadBytes', 'hdfsReadBytes'), totalWriteBytes: function () { -return this.get('fileWriteBytes') + this.get('hdfsWriteBytes'); +return (this.get('fileWriteBytes') || 0) + (this.get('hdfsWriteBytes') || 0); }.property('fileWriteBytes', 'hdfsWriteBytes'), totalReadBytesDisplay: function () {
git commit: AMBARI-7664 - Views : View API request for non-existent view should return 404
Repository: ambari Updated Branches: refs/heads/trunk 4a4b0e693 - 5b6065876 AMBARI-7664 - Views : View API request for non-existent view should return 404 Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5b606587 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5b606587 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5b606587 Branch: refs/heads/trunk Commit: 5b60658766856232b1198a21866db2aefe655662 Parents: 4a4b0e6 Author: tbeerbower tbeerbo...@hortonworks.com Authored: Mon Oct 6 19:11:42 2014 -0400 Committer: tbeerbower tbeerbo...@hortonworks.com Committed: Mon Oct 6 19:12:23 2014 -0400 -- .../internal/ClusterControllerImpl.java | 6 +++ .../internal/ClusterControllerImplTest.java | 42 2 files changed, 48 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5b606587/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterControllerImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterControllerImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterControllerImpl.java index 48767d5..5d1024a 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterControllerImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterControllerImpl.java @@ -132,6 +132,12 @@ public class ClusterControllerImpl implements ClusterController { // get the resources resources = provider.getResources(request, predicate); + + // if a specific resource was asked for and not found then throw exception + if (predicate != null (resources == null || resources.isEmpty())) { +throw new NoSuchResourceException( +The requested resource doesn't exist: + type.toString() + not found, + predicate); + } } return resources; } http://git-wip-us.apache.org/repos/asf/ambari/blob/5b606587/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterControllerImplTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterControllerImplTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterControllerImplTest.java index 1d0eef4..261c95d 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterControllerImplTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterControllerImplTest.java @@ -31,12 +31,19 @@ import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import java.util.HashSet; +import java.util.Iterator; import java.util.LinkedHashSet; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; +import static org.easymock.EasyMock.anyObject; +import static org.easymock.EasyMock.createNiceMock; +import static org.easymock.EasyMock.expect; +import static org.easymock.EasyMock.replay; +import static org.easymock.EasyMock.verify; + /** * Cluster controller tests */ @@ -129,6 +136,41 @@ public class ClusterControllerImplTest { } @Test + public void testGetResources_NoSuchResourceException() throws Exception{ + +ProviderModule providerModule = createNiceMock(ProviderModule.class); +ResourceProvider resourceProvider = createNiceMock(ResourceProvider.class); + + expect(providerModule.getResourceProvider(Resource.Type.View)).andReturn(resourceProvider).anyTimes(); + expect(resourceProvider.checkPropertyIds(Collections.singleton(ViewInfo/view_name))).andReturn(Collections.StringemptySet()).anyTimes(); +expect(resourceProvider.getResources(anyObject(Request.class), anyObject(Predicate.class))).andReturn(Collections.ResourceemptySet()).anyTimes(); + +replay(providerModule, resourceProvider); + +ClusterControllerImpl controller = new ClusterControllerImpl(providerModule); + +SetString propertyIds = new HashSetString(); + +propertyIds.add(ViewInfo/view_name); + +Request request = PropertyHelper.getReadRequest(propertyIds); + +// No predicate +IteratorResource iter = controller.getResourceIterable(Resource.Type.View, request, null).iterator(); +Assert.assertFalse(iter.hasNext()); + +// Ask for a specific resource. +Predicate predicate = new PredicateBuilder().property(ViewInfo/view_name).equals(BadView).toPredicate(); +try { + controller.getResourceIterable(Resource.Type.View, request, predicate); + Assert.fail(Expected NoSuchResourceException.);
git commit: AMBARI-4420. ORA-01795: maximum number of expressions in a list is 1000 for Oracle DB. (swagle)
Repository: ambari Updated Branches: refs/heads/branch-1.7.0 165356e26 - f108b52e5 AMBARI-4420. ORA-01795: maximum number of expressions in a list is 1000 for Oracle DB. (swagle) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f108b52e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f108b52e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f108b52e Branch: refs/heads/branch-1.7.0 Commit: f108b52e566c02efe5827827adf9201e49946247 Parents: 165356e Author: Siddharth Wagle swa...@hortonworks.com Authored: Mon Oct 6 16:16:20 2014 -0700 Committer: Siddharth Wagle swa...@hortonworks.com Committed: Mon Oct 6 16:16:20 2014 -0700 -- .../apache/ambari/server/orm/DBAccessor.java| 14 +++ .../ambari/server/orm/DBAccessorImpl.java | 67 .../apache/ambari/server/orm/dao/DaoUtils.java | 12 +- .../server/orm/dao/HostRoleCommandDAO.java | 30 - .../actionmanager/TestActionDBAccessorImpl.java | 109 --- .../ambari/server/agent/AgentResourceTest.java | 53 + .../ambari/server/orm/DBAccessorImplTest.java | 6 + 7 files changed, 205 insertions(+), 86 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f108b52e/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java index 9eca8c0..4baf6da 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java @@ -320,6 +320,20 @@ public interface DBAccessor { public void setNullable(String tableName, DBAccessor.DBColumnInfo columnInfo, boolean nullable) throws SQLException; + public static enum DbType { +ORACLE, +MYSQL, +POSTGRES, +DERBY, +UNKNOWN + } + + /** + * Get type of database platform + * @return @DbType + */ + public DbType getDbType(); + /** * Capture column type */ http://git-wip-us.apache.org/repos/asf/ambari/blob/f108b52e/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java index f9407f7..eb09c7a 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java @@ -17,22 +17,7 @@ */ package org.apache.ambari.server.orm; -import java.io.BufferedReader; -import java.io.FileReader; -import java.io.IOException; -import java.sql.Connection; -import java.sql.DatabaseMetaData; -import java.sql.DriverManager; -import java.sql.ResultSet; -import java.sql.ResultSetMetaData; -import java.sql.SQLException; -import java.sql.Statement; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.regex.Pattern; -import java.util.regex.Matcher; - +import com.google.inject.Inject; import org.apache.ambari.server.configuration.Configuration; import org.apache.ambari.server.orm.helpers.ScriptRunner; import org.apache.ambari.server.orm.helpers.dbms.DbmsHelper; @@ -55,8 +40,20 @@ import org.eclipse.persistence.sessions.DatabaseLogin; import org.eclipse.persistence.sessions.DatabaseSession; import org.slf4j.Logger; import org.slf4j.LoggerFactory; - -import com.google.inject.Inject; +import java.io.BufferedReader; +import java.io.FileReader; +import java.io.IOException; +import java.sql.Connection; +import java.sql.DatabaseMetaData; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.regex.Pattern; public class DBAccessorImpl implements DBAccessor { private static final Logger LOG = LoggerFactory.getLogger(DBAccessorImpl.class); @@ -67,6 +64,7 @@ public class DBAccessorImpl implements DBAccessor { private DatabaseMetaData databaseMetaData; private static final String dbURLPatternString = jdbc:(.*?):.*; private Pattern dbURLPattern = Pattern.compile(dbURLPatternString, Pattern.CASE_INSENSITIVE); + private DbType dbType; @Inject public DBAccessorImpl(Configuration configuration) { @@ -101,14 +99,19 @@ public class DBAccessorImpl implements DBAccessor { protected DbmsHelper loadHelper(DatabasePlatform databasePlatform) { if
git commit: AMBARI-4420. ORA-01795: maximum number of expressions in a list is 1000 for Oracle DB. (swagle)
Repository: ambari Updated Branches: refs/heads/trunk 5b6065876 - 6b8ecd54c AMBARI-4420. ORA-01795: maximum number of expressions in a list is 1000 for Oracle DB. (swagle) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6b8ecd54 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6b8ecd54 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6b8ecd54 Branch: refs/heads/trunk Commit: 6b8ecd54c5a25e65fb43df8cca15dc69bd32ee5e Parents: 5b60658 Author: Siddharth Wagle swa...@hortonworks.com Authored: Mon Oct 6 16:32:14 2014 -0700 Committer: Siddharth Wagle swa...@hortonworks.com Committed: Mon Oct 6 16:32:14 2014 -0700 -- .../apache/ambari/server/orm/DBAccessor.java| 14 +++ .../ambari/server/orm/DBAccessorImpl.java | 67 .../apache/ambari/server/orm/dao/DaoUtils.java | 12 +- .../server/orm/dao/HostRoleCommandDAO.java | 30 - .../actionmanager/TestActionDBAccessorImpl.java | 109 --- .../ambari/server/agent/AgentResourceTest.java | 53 + .../ambari/server/orm/DBAccessorImplTest.java | 6 + 7 files changed, 205 insertions(+), 86 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6b8ecd54/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java index 9eca8c0..4baf6da 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java @@ -320,6 +320,20 @@ public interface DBAccessor { public void setNullable(String tableName, DBAccessor.DBColumnInfo columnInfo, boolean nullable) throws SQLException; + public static enum DbType { +ORACLE, +MYSQL, +POSTGRES, +DERBY, +UNKNOWN + } + + /** + * Get type of database platform + * @return @DbType + */ + public DbType getDbType(); + /** * Capture column type */ http://git-wip-us.apache.org/repos/asf/ambari/blob/6b8ecd54/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java index f9407f7..eb09c7a 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java @@ -17,22 +17,7 @@ */ package org.apache.ambari.server.orm; -import java.io.BufferedReader; -import java.io.FileReader; -import java.io.IOException; -import java.sql.Connection; -import java.sql.DatabaseMetaData; -import java.sql.DriverManager; -import java.sql.ResultSet; -import java.sql.ResultSetMetaData; -import java.sql.SQLException; -import java.sql.Statement; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.regex.Pattern; -import java.util.regex.Matcher; - +import com.google.inject.Inject; import org.apache.ambari.server.configuration.Configuration; import org.apache.ambari.server.orm.helpers.ScriptRunner; import org.apache.ambari.server.orm.helpers.dbms.DbmsHelper; @@ -55,8 +40,20 @@ import org.eclipse.persistence.sessions.DatabaseLogin; import org.eclipse.persistence.sessions.DatabaseSession; import org.slf4j.Logger; import org.slf4j.LoggerFactory; - -import com.google.inject.Inject; +import java.io.BufferedReader; +import java.io.FileReader; +import java.io.IOException; +import java.sql.Connection; +import java.sql.DatabaseMetaData; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.regex.Pattern; public class DBAccessorImpl implements DBAccessor { private static final Logger LOG = LoggerFactory.getLogger(DBAccessorImpl.class); @@ -67,6 +64,7 @@ public class DBAccessorImpl implements DBAccessor { private DatabaseMetaData databaseMetaData; private static final String dbURLPatternString = jdbc:(.*?):.*; private Pattern dbURLPattern = Pattern.compile(dbURLPatternString, Pattern.CASE_INSENSITIVE); + private DbType dbType; @Inject public DBAccessorImpl(Configuration configuration) { @@ -101,14 +99,19 @@ public class DBAccessorImpl implements DBAccessor { protected DbmsHelper loadHelper(DatabasePlatform databasePlatform) { if (databasePlatform instanceof
git commit: AMBARI-7666. Dashboard doesn't display after installing from BP.
Repository: ambari Updated Branches: refs/heads/branch-1.7.0 f108b52e5 - 6675decbc AMBARI-7666. Dashboard doesn't display after installing from BP. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6675decb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6675decb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6675decb Branch: refs/heads/branch-1.7.0 Commit: 6675decbc567066d4104dd5abc5ef0fcbe76425c Parents: f108b52 Author: John Speidel jspei...@hortonworks.com Authored: Mon Oct 6 20:00:56 2014 -0400 Committer: John Speidel jspei...@hortonworks.com Committed: Mon Oct 6 20:54:30 2014 -0400 -- .../internal/ClusterResourceProvider.java | 18 +++-- .../internal/ClusterResourceProviderTest.java | 73 2 files changed, 56 insertions(+), 35 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6675decb/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java index f40979c..f9dd263 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java @@ -445,7 +445,7 @@ public class ClusterResourceProvider extends BaseBlueprintProcessor { registerConfigGroups(clusterName, blueprintHostGroups, stack); -persistInstallStateForUI(); +persistInstallStateForUI(clusterName); RequestStatusResponse request = ((ServiceResourceProvider) getResourceProvider(Resource.Type.Service)). installAndStart(clusterName); @@ -819,13 +819,19 @@ public class ClusterResourceProvider extends BaseBlueprintProcessor { * Persist cluster state for the ambari UI. Setting this state informs that UI that a cluster has been * installed and started and that the monitoring screen for the cluster should be displayed to the user. * - * @throws SystemException if an unexpected exception occurs + * @param clusterName name of cluster + * + * @throws SystemException if unable to update the cluster with the UI installed flag */ - private void persistInstallStateForUI() throws SystemException { -PersistKeyValueService persistService = new PersistKeyValueService(); + private void persistInstallStateForUI(String clusterName) throws SystemException { +MapString, Object clusterProperties = new HashMapString, Object(); +clusterProperties.put(CLUSTER_PROVISIONING_STATE_PROPERTY_ID, INSTALLED); +clusterProperties.put(CLUSTER_NAME_PROPERTY_ID, clusterName); + try { - persistService.update({\CLUSTER_CURRENT_STATUS\: \{\\\clusterState\\\:\\\CLUSTER_STARTED_5\\\}\}); -} catch (Exception e) { + getManagementController().updateClusters( + Collections.singleton(getRequest(clusterProperties)), null); +} catch (AmbariException e) { throw new SystemException(Unable to finalize state of cluster for UI. + Cluster creation will not be affected but the cluster may be inaccessible by Ambari UI. ); } http://git-wip-us.apache.org/repos/asf/ambari/blob/6675decb/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterResourceProviderTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterResourceProviderTest.java index d5f575a..c1185ae 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterResourceProviderTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterResourceProviderTest.java @@ -34,7 +34,6 @@ import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; -import java.lang.reflect.Method; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -46,8 +45,6 @@ import java.util.Map; import java.util.Set; import org.apache.ambari.server.api.services.AmbariMetaInfo; -import org.apache.ambari.server.api.services.PersistKeyValueImpl; -import org.apache.ambari.server.api.services.PersistKeyValueService; import org.apache.ambari.server.controller.AmbariManagementController; import org.apache.ambari.server.controller.ClusterRequest; import