ambari git commit: AMBARI-10714 - Separate memory configuration for Hive CLI, HiveServer2, Hive Metastore
Repository: ambari Updated Branches: refs/heads/branch-2.1 0d426fe47 -> ea04dac05 AMBARI-10714 - Separate memory configuration for Hive CLI, HiveServer2, Hive Metastore Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ea04dac0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ea04dac0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ea04dac0 Branch: refs/heads/branch-2.1 Commit: ea04dac05dff1ea6349fe75f4ff581cf6770c7a2 Parents: 0d426fe Author: Artem Baranchuk Authored: Tue Aug 25 15:21:37 2015 +0300 Committer: Artem Baranchuk Committed: Tue Aug 25 15:21:37 2015 +0300 -- .../HDFS/2.1.0.2.0/configuration/hadoop-env.xml | 9 - .../HIVE/0.12.0.2.0/package/scripts/params_linux.py | 10 ++ .../2.2/services/HIVE/configuration/hive-env.xml| 16 +--- 3 files changed, 23 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ea04dac0/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml index 78b9e8a..4cb2274 100644 --- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml +++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml @@ -196,7 +196,14 @@ export JSVC_HOME={{jsvc_path}} # The maximum amount of heap to use, in MB. Default is 1000. -export HADOOP_HEAPSIZE="{{hadoop_heapsize}}" +if [[ ("$SERVICE" = "hiveserver2") || ("$SERVICE" = "metastore") || ( "$SERVICE" = "cli") ]]; then + if [ "$HADOOP_HEAPSIZE" = "" ]; then +export HADOOP_HEAPSIZE="{{hadoop_heapsize}}" + fi +else + export HADOOP_HEAPSIZE="{{hadoop_heapsize}}" +fi + export HADOOP_NAMENODE_INIT_HEAPSIZE="-Xms{{namenode_heapsize}}" http://git-wip-us.apache.org/repos/asf/ambari/blob/ea04dac0/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py index 75371b8..7f622eb 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py @@ -290,13 +290,15 @@ start_metastore_path = format("{tmp_dir}/start_metastore_script") hadoop_heapsize = config['configurations']['hadoop-env']['hadoop_heapsize'] -if Script.is_hdp_stack_less_than("2.2"): - if 'role' in config and config['role'] in ["HIVE_SERVER", "HIVE_METASTORE"]: +if 'role' in config and config['role'] in ["HIVE_SERVER", "HIVE_METASTORE"]: + if Script.is_hdp_stack_less_than("2.2"): hive_heapsize = config['configurations']['hive-site']['hive.heapsize'] else: -hive_heapsize = config['configurations']['hive-env']['hive.client.heapsize'] +hive_heapsize = config['configurations']['hive-env']['hive.heapsize'] +else: + hive_heapsize = config['configurations']['hive-env']['hive.client.heapsize'] - hive_metastore_heapsize = config['configurations']['hive-env']['hive.metastore.heapsize'] +hive_metastore_heapsize = config['configurations']['hive-env']['hive.metastore.heapsize'] java64_home = config['hostLevelParams']['java_home'] http://git-wip-us.apache.org/repos/asf/ambari/blob/ea04dac0/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-env.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-env.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-env.xml index 3b05dd4..6420333 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-env.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-env.xml @@ -22,13 +22,9 @@ -hive.client.heapsize -true - - - -hive.metastore.heapsize -true +hive.heapsize +1024 +Hive Java heap size @@ -45,6 +41,12 @@ fi # The heap size of the jvm stared by hive shell script can be controlled via: +export SERVICE=$SERVICE +if [ "$SERVICE" = "metastore" ]; then + export HADOOP_HEAPSIZE="{{hive_metastore_heapsize}}" +else + export HADOOP_HEAPSIZE="{{hive_heapsize}}" +fi #
ambari git commit: AMBARI-10714 - Separate memory configuration for Hive CLI, HiveServer2, Hive Metastore
Repository: ambari Updated Branches: refs/heads/trunk cdb98f73b -> 5b0acfbdc AMBARI-10714 - Separate memory configuration for Hive CLI, HiveServer2, Hive Metastore Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5b0acfbd Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5b0acfbd Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5b0acfbd Branch: refs/heads/trunk Commit: 5b0acfbdc0fd1da0ee71ca232ff0dd647f435278 Parents: cdb98f7 Author: Artem Baranchuk Authored: Fri Aug 21 22:23:16 2015 +0300 Committer: Artem Baranchuk Committed: Tue Aug 25 15:06:41 2015 +0300 -- .../HDFS/2.1.0.2.0/configuration/hadoop-env.xml | 9 - .../HIVE/0.12.0.2.0/package/scripts/params_linux.py | 10 ++ .../2.2/services/HIVE/configuration/hive-env.xml| 16 +--- 3 files changed, 23 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5b0acfbd/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml index 78b9e8a..4cb2274 100644 --- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml +++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml @@ -196,7 +196,14 @@ export JSVC_HOME={{jsvc_path}} # The maximum amount of heap to use, in MB. Default is 1000. -export HADOOP_HEAPSIZE="{{hadoop_heapsize}}" +if [[ ("$SERVICE" = "hiveserver2") || ("$SERVICE" = "metastore") || ( "$SERVICE" = "cli") ]]; then + if [ "$HADOOP_HEAPSIZE" = "" ]; then +export HADOOP_HEAPSIZE="{{hadoop_heapsize}}" + fi +else + export HADOOP_HEAPSIZE="{{hadoop_heapsize}}" +fi + export HADOOP_NAMENODE_INIT_HEAPSIZE="-Xms{{namenode_heapsize}}" http://git-wip-us.apache.org/repos/asf/ambari/blob/5b0acfbd/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py index 75371b8..7f622eb 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py @@ -290,13 +290,15 @@ start_metastore_path = format("{tmp_dir}/start_metastore_script") hadoop_heapsize = config['configurations']['hadoop-env']['hadoop_heapsize'] -if Script.is_hdp_stack_less_than("2.2"): - if 'role' in config and config['role'] in ["HIVE_SERVER", "HIVE_METASTORE"]: +if 'role' in config and config['role'] in ["HIVE_SERVER", "HIVE_METASTORE"]: + if Script.is_hdp_stack_less_than("2.2"): hive_heapsize = config['configurations']['hive-site']['hive.heapsize'] else: -hive_heapsize = config['configurations']['hive-env']['hive.client.heapsize'] +hive_heapsize = config['configurations']['hive-env']['hive.heapsize'] +else: + hive_heapsize = config['configurations']['hive-env']['hive.client.heapsize'] - hive_metastore_heapsize = config['configurations']['hive-env']['hive.metastore.heapsize'] +hive_metastore_heapsize = config['configurations']['hive-env']['hive.metastore.heapsize'] java64_home = config['hostLevelParams']['java_home'] http://git-wip-us.apache.org/repos/asf/ambari/blob/5b0acfbd/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-env.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-env.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-env.xml index 3b05dd4..6420333 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-env.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-env.xml @@ -22,13 +22,9 @@ -hive.client.heapsize -true - - - -hive.metastore.heapsize -true +hive.heapsize +1024 +Hive Java heap size @@ -45,6 +41,12 @@ fi # The heap size of the jvm stared by hive shell script can be controlled via: +export SERVICE=$SERVICE +if [ "$SERVICE" = "metastore" ]; then + export HADOOP_HEAPSIZE="{{hive_metastore_heapsize}}" +else + export HADOOP_HEAPSIZE="{{hive_heapsize}}" +fi # Larger hea
ambari git commit: AMBARI-12827 - Oozie Server Status alert is critical every 5 minutes on Kerberized cluster
Repository: ambari Updated Branches: refs/heads/branch-2.1 5c1bf3d7e -> 4389cb1c4 AMBARI-12827 - Oozie Server Status alert is critical every 5 minutes on Kerberized cluster Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4389cb1c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4389cb1c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4389cb1c Branch: refs/heads/branch-2.1 Commit: 4389cb1c4f2d5c246f3ff8cce44f9dfd4ee5a9fa Parents: 5c1bf3d Author: Artem Baranchuk Authored: Fri Aug 21 12:15:41 2015 +0300 Committer: Artem Baranchuk Committed: Fri Aug 21 12:15:41 2015 +0300 -- .../package/alerts/alert_check_oozie_server.py | 78 1 file changed, 47 insertions(+), 31 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4389cb1c/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/alerts/alert_check_oozie_server.py -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/alerts/alert_check_oozie_server.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/alerts/alert_check_oozie_server.py index 1dbf3f9..c3143c6 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/alerts/alert_check_oozie_server.py +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/alerts/alert_check_oozie_server.py @@ -51,6 +51,21 @@ OOZIE_CONF_DIR_LEGACY = '/etc/oozie/conf' OOZIE_HTTPS_PORT = '{{oozie-site/oozie.https.port}}' OOZIE_ENV_CONTENT = '{{oozie-env/content}}' +SMOKEUSER_KEYTAB_KEY = '{{cluster-env/smokeuser_keytab}}' +SMOKEUSER_PRINCIPAL_KEY = '{{cluster-env/smokeuser_principal_name}}' +SMOKEUSER_KEY = '{{cluster-env/smokeuser}}' + +# default keytab location +SMOKEUSER_KEYTAB_SCRIPT_PARAM_KEY = 'default.smoke.keytab' +SMOKEUSER_KEYTAB_DEFAULT = '/etc/security/keytabs/smokeuser.headless.keytab' + +# default smoke principal +SMOKEUSER_PRINCIPAL_SCRIPT_PARAM_KEY = 'default.smoke.principal' +SMOKEUSER_PRINCIPAL_DEFAULT = 'ambari...@example.com' + +# default smoke user +SMOKEUSER_DEFAULT = 'ambari-qa' + class KerberosPropertiesNotFound(Exception): pass @OsFamilyFuncImpl(os_family=OSConst.WINSRV_FAMILY) @@ -67,8 +82,8 @@ def get_tokens(): Returns a tuple of tokens in the format {{site/property}} that will be used to build the dictionary passed into execute """ - return (OOZIE_URL_KEY, OOZIE_PRINCIPAL, SECURITY_ENABLED, OOZIE_KEYTAB, KERBEROS_EXECUTABLE_SEARCH_PATHS_KEY, - OOZIE_USER, OOZIE_HTTPS_PORT, OOZIE_ENV_CONTENT) + return (OOZIE_URL_KEY, SMOKEUSER_PRINCIPAL_KEY, SECURITY_ENABLED, SMOKEUSER_KEYTAB_KEY, KERBEROS_EXECUTABLE_SEARCH_PATHS_KEY, + SMOKEUSER_KEY, OOZIE_HTTPS_PORT, OOZIE_ENV_CONTENT) @OsFamilyFuncImpl(os_family=OSConst.WINSRV_FAMILY) def get_check_command(oozie_url, host_name, configurations): @@ -80,25 +95,33 @@ def get_check_command(oozie_url, host_name, configurations): return (command, None, None) @OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT) -def get_check_command(oozie_url, host_name, configurations): - if OOZIE_USER in configurations: -oozie_user = configurations[OOZIE_USER] - else: -raise Exception("Oozie user is required") - +def get_check_command(oozie_url, host_name, configurations, parameters): + kerberos_env = None + + smokeuser = SMOKEUSER_DEFAULT + if SMOKEUSER_KEY in configurations: +smokeuser = configurations[SMOKEUSER_KEY] + security_enabled = False if SECURITY_ENABLED in configurations: security_enabled = str(configurations[SECURITY_ENABLED]).upper() == 'TRUE' - kerberos_env = None - if security_enabled: -if OOZIE_KEYTAB in configurations and OOZIE_PRINCIPAL in configurations: - oozie_keytab = configurations[OOZIE_KEYTAB] - oozie_principal = configurations[OOZIE_PRINCIPAL] - # substitute _HOST in kerberos principal with actual fqdn - oozie_principal = oozie_principal.replace('_HOST', host_name) -else: - raise KerberosPropertiesNotFound('The Oozie keytab and principal are required configurations when security is enabled.') + if security_enabled: +# defaults +smokeuser_keytab = SMOKEUSER_KEYTAB_DEFAULT +smokeuser_principal = SMOKEUSER_PRINCIPAL_DEFAULT + +# check script params +if SMOKEUSER_PRINCIPAL_SCRIPT_PARAM_KEY in parameters: + smokeuser_principal = parameters[SMOKEUSER_PRINCIPAL_SCRIPT_PARAM_KEY] +if SMOKEUSER_KEYTAB_SCRIPT_PARAM_KEY in parameters: + smokeuser_keytab = parameters[SMOKEUSER_KEYTAB_SCRIPT_PARAM_KEY] + +# check configurations last as they should always take precedence +if SMOKEUSER_PRINCIPAL_KEY in configurations: + smokeuser_principal = configur
ambari git commit: AMBARI-12827 - Oozie Server Status alert is critical every 5 minutes on Kerberized cluster
Repository: ambari Updated Branches: refs/heads/trunk 188d39c2e -> 995343371 AMBARI-12827 - Oozie Server Status alert is critical every 5 minutes on Kerberized cluster Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/99534337 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/99534337 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/99534337 Branch: refs/heads/trunk Commit: 995343371f0fdc401e5b0aacdb56b7156e88 Parents: 188d39c Author: Artem Baranchuk Authored: Thu Aug 20 01:26:07 2015 +0300 Committer: Artem Baranchuk Committed: Fri Aug 21 12:12:35 2015 +0300 -- .../package/alerts/alert_check_oozie_server.py | 78 1 file changed, 47 insertions(+), 31 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/99534337/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/alerts/alert_check_oozie_server.py -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/alerts/alert_check_oozie_server.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/alerts/alert_check_oozie_server.py index 1dbf3f9..c3143c6 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/alerts/alert_check_oozie_server.py +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/alerts/alert_check_oozie_server.py @@ -51,6 +51,21 @@ OOZIE_CONF_DIR_LEGACY = '/etc/oozie/conf' OOZIE_HTTPS_PORT = '{{oozie-site/oozie.https.port}}' OOZIE_ENV_CONTENT = '{{oozie-env/content}}' +SMOKEUSER_KEYTAB_KEY = '{{cluster-env/smokeuser_keytab}}' +SMOKEUSER_PRINCIPAL_KEY = '{{cluster-env/smokeuser_principal_name}}' +SMOKEUSER_KEY = '{{cluster-env/smokeuser}}' + +# default keytab location +SMOKEUSER_KEYTAB_SCRIPT_PARAM_KEY = 'default.smoke.keytab' +SMOKEUSER_KEYTAB_DEFAULT = '/etc/security/keytabs/smokeuser.headless.keytab' + +# default smoke principal +SMOKEUSER_PRINCIPAL_SCRIPT_PARAM_KEY = 'default.smoke.principal' +SMOKEUSER_PRINCIPAL_DEFAULT = 'ambari...@example.com' + +# default smoke user +SMOKEUSER_DEFAULT = 'ambari-qa' + class KerberosPropertiesNotFound(Exception): pass @OsFamilyFuncImpl(os_family=OSConst.WINSRV_FAMILY) @@ -67,8 +82,8 @@ def get_tokens(): Returns a tuple of tokens in the format {{site/property}} that will be used to build the dictionary passed into execute """ - return (OOZIE_URL_KEY, OOZIE_PRINCIPAL, SECURITY_ENABLED, OOZIE_KEYTAB, KERBEROS_EXECUTABLE_SEARCH_PATHS_KEY, - OOZIE_USER, OOZIE_HTTPS_PORT, OOZIE_ENV_CONTENT) + return (OOZIE_URL_KEY, SMOKEUSER_PRINCIPAL_KEY, SECURITY_ENABLED, SMOKEUSER_KEYTAB_KEY, KERBEROS_EXECUTABLE_SEARCH_PATHS_KEY, + SMOKEUSER_KEY, OOZIE_HTTPS_PORT, OOZIE_ENV_CONTENT) @OsFamilyFuncImpl(os_family=OSConst.WINSRV_FAMILY) def get_check_command(oozie_url, host_name, configurations): @@ -80,25 +95,33 @@ def get_check_command(oozie_url, host_name, configurations): return (command, None, None) @OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT) -def get_check_command(oozie_url, host_name, configurations): - if OOZIE_USER in configurations: -oozie_user = configurations[OOZIE_USER] - else: -raise Exception("Oozie user is required") - +def get_check_command(oozie_url, host_name, configurations, parameters): + kerberos_env = None + + smokeuser = SMOKEUSER_DEFAULT + if SMOKEUSER_KEY in configurations: +smokeuser = configurations[SMOKEUSER_KEY] + security_enabled = False if SECURITY_ENABLED in configurations: security_enabled = str(configurations[SECURITY_ENABLED]).upper() == 'TRUE' - kerberos_env = None - if security_enabled: -if OOZIE_KEYTAB in configurations and OOZIE_PRINCIPAL in configurations: - oozie_keytab = configurations[OOZIE_KEYTAB] - oozie_principal = configurations[OOZIE_PRINCIPAL] - # substitute _HOST in kerberos principal with actual fqdn - oozie_principal = oozie_principal.replace('_HOST', host_name) -else: - raise KerberosPropertiesNotFound('The Oozie keytab and principal are required configurations when security is enabled.') + if security_enabled: +# defaults +smokeuser_keytab = SMOKEUSER_KEYTAB_DEFAULT +smokeuser_principal = SMOKEUSER_PRINCIPAL_DEFAULT + +# check script params +if SMOKEUSER_PRINCIPAL_SCRIPT_PARAM_KEY in parameters: + smokeuser_principal = parameters[SMOKEUSER_PRINCIPAL_SCRIPT_PARAM_KEY] +if SMOKEUSER_KEYTAB_SCRIPT_PARAM_KEY in parameters: + smokeuser_keytab = parameters[SMOKEUSER_KEYTAB_SCRIPT_PARAM_KEY] + +# check configurations last as they should always take precedence +if SMOKEUSER_PRINCIPAL_KEY in configurations: + smokeuser_principal = configurations[SMO
ambari git commit: AMBARI-12741 - AMS Collector process takes way more Virtual memory than Xmx setting
Repository: ambari Updated Branches: refs/heads/trunk 0c929beb2 -> 9e962270b AMBARI-12741 - AMS Collector process takes way more Virtual memory than Xmx setting Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9e962270 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9e962270 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9e962270 Branch: refs/heads/trunk Commit: 9e962270bff7d61625617266eff9789c352b5be2 Parents: 0c929be Author: Artem Baranchuk Authored: Wed Aug 12 22:00:58 2015 +0300 Committer: Artem Baranchuk Committed: Wed Aug 12 22:00:58 2015 +0300 -- .../conf/unix/ambari-metrics-collector | 2 +- .../common-services/AMBARI_METRICS/0.1.0/configuration/ams-env.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9e962270/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector -- diff --git a/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector b/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector index 0ee70a2..bdf00b5 100644 --- a/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector +++ b/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector @@ -176,7 +176,7 @@ function start() rm -f "${PIDFILE}" >/dev/null 2>&1 fi - nohup "${JAVA}" "-cp" "/usr/lib/ambari-metrics-collector/*:${COLLECTOR_CONF_DIR}" "${AMS_COLLECTOR_OPTS}" "-Djava.net.preferIPv4Stack=true" "-Dams.log.dir=${AMS_COLLECTOR_LOG_DIR}" "-Dproc_${DAEMON_NAME}" "${CLASS}" "$@" > $OUTFILE 2>&1 & + nohup "${JAVA}" "-Xmx$AMS_COLLECTOR_HEAPSIZE" "${AMS_COLLECTOR_OPTS}" "-cp" "/usr/lib/ambari-metrics-collector/*:${COLLECTOR_CONF_DIR}" "-Djava.net.preferIPv4Stack=true" "-Dams.log.dir=${AMS_COLLECTOR_LOG_DIR}" "-Dproc_${DAEMON_NAME}" "${CLASS}" "$@" > $OUTFILE 2>&1 & PID=$! write_pidfile "${PIDFILE}" sleep 2 http://git-wip-us.apache.org/repos/asf/ambari/blob/9e962270/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-env.xml b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-env.xml index af4d9c9..e84193c 100644 --- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-env.xml +++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-env.xml @@ -77,7 +77,7 @@ export AMS_HBASE_PID_DIR={{hbase_pid_dir}} export AMS_COLLECTOR_HEAPSIZE={{metrics_collector_heapsize}} # AMS Collector options -export AMS_COLLECTOR_OPTS="-Djava.library.path=/usr/lib/ams-hbase/lib/hadoop-native -Xmx$AMS_COLLECTOR_HEAPSIZE " +export AMS_COLLECTOR_OPTS="-Djava.library.path=/usr/lib/ams-hbase/lib/hadoop-native" {% if security_enabled %} export AMS_COLLECTOR_OPTS="$AMS_COLLECTOR_OPTS -Djava.security.auth.login.config={{ams_collector_jaas_config_file}} -Dzookeeper.sasl.client.username={{zk_servicename}}" {% endif %}
ambari git commit: AMBARI-12741 - AMS Collector process takes way more Virtual memory than Xmx setting
Repository: ambari Updated Branches: refs/heads/branch-2.1 fb6a5d633 -> bc32ce12d AMBARI-12741 - AMS Collector process takes way more Virtual memory than Xmx setting Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bc32ce12 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bc32ce12 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bc32ce12 Branch: refs/heads/branch-2.1 Commit: bc32ce12d87123682551268cdbb402be9a8e643d Parents: fb6a5d6 Author: Artem Baranchuk Authored: Wed Aug 12 21:52:50 2015 +0300 Committer: Artem Baranchuk Committed: Wed Aug 12 21:52:50 2015 +0300 -- .../conf/unix/ambari-metrics-collector | 2 +- .../common-services/AMBARI_METRICS/0.1.0/configuration/ams-env.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/bc32ce12/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector -- diff --git a/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector b/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector index 0ee70a2..bdf00b5 100644 --- a/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector +++ b/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector @@ -176,7 +176,7 @@ function start() rm -f "${PIDFILE}" >/dev/null 2>&1 fi - nohup "${JAVA}" "-cp" "/usr/lib/ambari-metrics-collector/*:${COLLECTOR_CONF_DIR}" "${AMS_COLLECTOR_OPTS}" "-Djava.net.preferIPv4Stack=true" "-Dams.log.dir=${AMS_COLLECTOR_LOG_DIR}" "-Dproc_${DAEMON_NAME}" "${CLASS}" "$@" > $OUTFILE 2>&1 & + nohup "${JAVA}" "-Xmx$AMS_COLLECTOR_HEAPSIZE" "${AMS_COLLECTOR_OPTS}" "-cp" "/usr/lib/ambari-metrics-collector/*:${COLLECTOR_CONF_DIR}" "-Djava.net.preferIPv4Stack=true" "-Dams.log.dir=${AMS_COLLECTOR_LOG_DIR}" "-Dproc_${DAEMON_NAME}" "${CLASS}" "$@" > $OUTFILE 2>&1 & PID=$! write_pidfile "${PIDFILE}" sleep 2 http://git-wip-us.apache.org/repos/asf/ambari/blob/bc32ce12/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-env.xml b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-env.xml index af4d9c9..e84193c 100644 --- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-env.xml +++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-env.xml @@ -77,7 +77,7 @@ export AMS_HBASE_PID_DIR={{hbase_pid_dir}} export AMS_COLLECTOR_HEAPSIZE={{metrics_collector_heapsize}} # AMS Collector options -export AMS_COLLECTOR_OPTS="-Djava.library.path=/usr/lib/ams-hbase/lib/hadoop-native -Xmx$AMS_COLLECTOR_HEAPSIZE " +export AMS_COLLECTOR_OPTS="-Djava.library.path=/usr/lib/ams-hbase/lib/hadoop-native" {% if security_enabled %} export AMS_COLLECTOR_OPTS="$AMS_COLLECTOR_OPTS -Djava.security.auth.login.config={{ams_collector_jaas_config_file}} -Dzookeeper.sasl.client.username={{zk_servicename}}" {% endif %}
ambari git commit: AMBARI-12740 - Hive alert on secure cluster
Repository: ambari Updated Branches: refs/heads/branch-2.1 11ea55146 -> fb6a5d633 AMBARI-12740 - Hive alert on secure cluster Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fb6a5d63 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fb6a5d63 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fb6a5d63 Branch: refs/heads/branch-2.1 Commit: fb6a5d6335d1030c8e5569b529e4556e7b139612 Parents: 11ea551 Author: Artem Baranchuk Authored: Wed Aug 12 21:00:02 2015 +0300 Committer: Artem Baranchuk Committed: Wed Aug 12 21:00:17 2015 +0300 -- .../package/alerts/alert_webhcat_server.py | 96 +--- 1 file changed, 41 insertions(+), 55 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/fb6a5d63/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_webhcat_server.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_webhcat_server.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_webhcat_server.py index 3d0e14c..2c44b36 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_webhcat_server.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_webhcat_server.py @@ -19,7 +19,6 @@ limitations under the License. """ import ambari_simplejson as json # simplejson is much faster comparing to Python 2.6 json module and has the same functions set. -import subprocess import socket import time import urllib2 @@ -30,6 +29,7 @@ from resource_management.core import shell from resource_management.libraries.functions import format from resource_management.libraries.functions import get_kinit_path from resource_management.libraries.functions import get_klist_path +from resource_management.libraries.functions.curl_krb_request import curl_krb_request from os import getpid, sep RESULT_CODE_OK = "OK" @@ -46,6 +46,9 @@ TEMPLETON_PORT_KEY = '{{webhcat-site/templeton.port}}' SECURITY_ENABLED_KEY = '{{cluster-env/security_enabled}}' WEBHCAT_PRINCIPAL_KEY = '{{webhcat-site/templeton.kerberos.principal}}' WEBHCAT_KEYTAB_KEY = '{{webhcat-site/templeton.kerberos.keytab}}' + +SMOKEUSER_KEYTAB_KEY = '{{cluster-env/smokeuser_keytab}}' +SMOKEUSER_PRINCIPAL_KEY = '{{cluster-env/smokeuser_principal_name}}' SMOKEUSER_KEY = '{{cluster-env/smokeuser}}' # The configured Kerberos executable search paths, if any @@ -58,8 +61,15 @@ CONNECTION_TIMEOUT_KEY = 'connection.timeout' CONNECTION_TIMEOUT_DEFAULT = 5.0 CURL_CONNECTION_TIMEOUT_DEFAULT = str(int(CONNECTION_TIMEOUT_DEFAULT)) +# default keytab location +SMOKEUSER_KEYTAB_SCRIPT_PARAM_KEY = 'default.smoke.keytab' +SMOKEUSER_KEYTAB_DEFAULT = '/etc/security/keytabs/smokeuser.headless.keytab' + +# default smoke principal +SMOKEUSER_PRINCIPAL_SCRIPT_PARAM_KEY = 'default.smoke.principal' +SMOKEUSER_PRINCIPAL_DEFAULT = 'ambari...@example.com' + # default smoke user -SMOKEUSER_SCRIPT_PARAM_KEY = 'default.smoke.user' SMOKEUSER_DEFAULT = 'ambari-qa' def get_tokens(): @@ -67,9 +77,9 @@ def get_tokens(): Returns a tuple of tokens in the format {{site/property}} that will be used to build the dictionary passed into execute """ - return (TEMPLETON_PORT_KEY, SECURITY_ENABLED_KEY, WEBHCAT_KEYTAB_KEY, -WEBHCAT_PRINCIPAL_KEY, KERBEROS_EXECUTABLE_SEARCH_PATHS_KEY, SMOKEUSER_KEY) - + return (TEMPLETON_PORT_KEY, SECURITY_ENABLED_KEY, SMOKEUSER_KEYTAB_KEY,SMOKEUSER_PRINCIPAL_KEY, + KERBEROS_EXECUTABLE_SEARCH_PATHS_KEY, SMOKEUSER_KEY) + def execute(configurations={}, parameters={}, host_name=None): """ @@ -119,51 +129,33 @@ def execute(configurations={}, parameters={}, host_name=None): json_response = {} if security_enabled: -if WEBHCAT_KEYTAB_KEY not in configurations or WEBHCAT_PRINCIPAL_KEY not in configurations: - return (RESULT_CODE_UNKNOWN, [str(configurations)]) - try: - webhcat_keytab = configurations[WEBHCAT_KEYTAB_KEY] - webhcat_principal = configurations[WEBHCAT_PRINCIPAL_KEY] - - # substitute _HOST in kerberos principal with actual fqdn - webhcat_principal = webhcat_principal.replace('_HOST', host_name) - - # Create the kerberos credentials cache (ccache) file and set it in the environment to use - # when executing curl - env = Environment.get_instance() - ccache_file = "{0}{1}webhcat_alert_cc_{2}".format(env.tmp_dir, sep, getpid()) - kerberos_env = {'KRB5CCNAME': ccache_file} + # defaults + smokeuser_keytab = SMOKEUSER_KEYTAB_DEFAULT + smokeuser_principal = SMOKEUSER_PRINCIPAL_DEFAULT + + # check script params + if SMOKEUSE
ambari git commit: AMBARI-12740 - Hive alert on secure cluster
Repository: ambari Updated Branches: refs/heads/branch-2.1.1 8d490ef01 -> a2cd83d5c AMBARI-12740 - Hive alert on secure cluster Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a2cd83d5 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a2cd83d5 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a2cd83d5 Branch: refs/heads/branch-2.1.1 Commit: a2cd83d5cc3c852ff74fb2ed43ee606348594f38 Parents: 8d490ef Author: Artem Baranchuk Authored: Wed Aug 12 20:54:36 2015 +0300 Committer: Artem Baranchuk Committed: Wed Aug 12 20:54:36 2015 +0300 -- .../package/alerts/alert_webhcat_server.py | 96 +--- 1 file changed, 41 insertions(+), 55 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a2cd83d5/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_webhcat_server.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_webhcat_server.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_webhcat_server.py index 3d0e14c..2c44b36 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_webhcat_server.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_webhcat_server.py @@ -19,7 +19,6 @@ limitations under the License. """ import ambari_simplejson as json # simplejson is much faster comparing to Python 2.6 json module and has the same functions set. -import subprocess import socket import time import urllib2 @@ -30,6 +29,7 @@ from resource_management.core import shell from resource_management.libraries.functions import format from resource_management.libraries.functions import get_kinit_path from resource_management.libraries.functions import get_klist_path +from resource_management.libraries.functions.curl_krb_request import curl_krb_request from os import getpid, sep RESULT_CODE_OK = "OK" @@ -46,6 +46,9 @@ TEMPLETON_PORT_KEY = '{{webhcat-site/templeton.port}}' SECURITY_ENABLED_KEY = '{{cluster-env/security_enabled}}' WEBHCAT_PRINCIPAL_KEY = '{{webhcat-site/templeton.kerberos.principal}}' WEBHCAT_KEYTAB_KEY = '{{webhcat-site/templeton.kerberos.keytab}}' + +SMOKEUSER_KEYTAB_KEY = '{{cluster-env/smokeuser_keytab}}' +SMOKEUSER_PRINCIPAL_KEY = '{{cluster-env/smokeuser_principal_name}}' SMOKEUSER_KEY = '{{cluster-env/smokeuser}}' # The configured Kerberos executable search paths, if any @@ -58,8 +61,15 @@ CONNECTION_TIMEOUT_KEY = 'connection.timeout' CONNECTION_TIMEOUT_DEFAULT = 5.0 CURL_CONNECTION_TIMEOUT_DEFAULT = str(int(CONNECTION_TIMEOUT_DEFAULT)) +# default keytab location +SMOKEUSER_KEYTAB_SCRIPT_PARAM_KEY = 'default.smoke.keytab' +SMOKEUSER_KEYTAB_DEFAULT = '/etc/security/keytabs/smokeuser.headless.keytab' + +# default smoke principal +SMOKEUSER_PRINCIPAL_SCRIPT_PARAM_KEY = 'default.smoke.principal' +SMOKEUSER_PRINCIPAL_DEFAULT = 'ambari...@example.com' + # default smoke user -SMOKEUSER_SCRIPT_PARAM_KEY = 'default.smoke.user' SMOKEUSER_DEFAULT = 'ambari-qa' def get_tokens(): @@ -67,9 +77,9 @@ def get_tokens(): Returns a tuple of tokens in the format {{site/property}} that will be used to build the dictionary passed into execute """ - return (TEMPLETON_PORT_KEY, SECURITY_ENABLED_KEY, WEBHCAT_KEYTAB_KEY, -WEBHCAT_PRINCIPAL_KEY, KERBEROS_EXECUTABLE_SEARCH_PATHS_KEY, SMOKEUSER_KEY) - + return (TEMPLETON_PORT_KEY, SECURITY_ENABLED_KEY, SMOKEUSER_KEYTAB_KEY,SMOKEUSER_PRINCIPAL_KEY, + KERBEROS_EXECUTABLE_SEARCH_PATHS_KEY, SMOKEUSER_KEY) + def execute(configurations={}, parameters={}, host_name=None): """ @@ -119,51 +129,33 @@ def execute(configurations={}, parameters={}, host_name=None): json_response = {} if security_enabled: -if WEBHCAT_KEYTAB_KEY not in configurations or WEBHCAT_PRINCIPAL_KEY not in configurations: - return (RESULT_CODE_UNKNOWN, [str(configurations)]) - try: - webhcat_keytab = configurations[WEBHCAT_KEYTAB_KEY] - webhcat_principal = configurations[WEBHCAT_PRINCIPAL_KEY] - - # substitute _HOST in kerberos principal with actual fqdn - webhcat_principal = webhcat_principal.replace('_HOST', host_name) - - # Create the kerberos credentials cache (ccache) file and set it in the environment to use - # when executing curl - env = Environment.get_instance() - ccache_file = "{0}{1}webhcat_alert_cc_{2}".format(env.tmp_dir, sep, getpid()) - kerberos_env = {'KRB5CCNAME': ccache_file} + # defaults + smokeuser_keytab = SMOKEUSER_KEYTAB_DEFAULT + smokeuser_principal = SMOKEUSER_PRINCIPAL_DEFAULT + + # check script params + if SMOK
ambari git commit: AMBARI-12740 - Hive alert on secure cluster
Repository: ambari Updated Branches: refs/heads/trunk 1b6c479f7 -> 0c929beb2 AMBARI-12740 - Hive alert on secure cluster Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0c929beb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0c929beb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0c929beb Branch: refs/heads/trunk Commit: 0c929beb262e002a37bc4d239f8834f3e3683750 Parents: 1b6c479 Author: Artem Baranchuk Authored: Wed Aug 12 20:15:46 2015 +0300 Committer: Artem Baranchuk Committed: Wed Aug 12 20:50:30 2015 +0300 -- .../package/alerts/alert_webhcat_server.py | 96 +--- 1 file changed, 41 insertions(+), 55 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0c929beb/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_webhcat_server.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_webhcat_server.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_webhcat_server.py index 3d0e14c..2c44b36 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_webhcat_server.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_webhcat_server.py @@ -19,7 +19,6 @@ limitations under the License. """ import ambari_simplejson as json # simplejson is much faster comparing to Python 2.6 json module and has the same functions set. -import subprocess import socket import time import urllib2 @@ -30,6 +29,7 @@ from resource_management.core import shell from resource_management.libraries.functions import format from resource_management.libraries.functions import get_kinit_path from resource_management.libraries.functions import get_klist_path +from resource_management.libraries.functions.curl_krb_request import curl_krb_request from os import getpid, sep RESULT_CODE_OK = "OK" @@ -46,6 +46,9 @@ TEMPLETON_PORT_KEY = '{{webhcat-site/templeton.port}}' SECURITY_ENABLED_KEY = '{{cluster-env/security_enabled}}' WEBHCAT_PRINCIPAL_KEY = '{{webhcat-site/templeton.kerberos.principal}}' WEBHCAT_KEYTAB_KEY = '{{webhcat-site/templeton.kerberos.keytab}}' + +SMOKEUSER_KEYTAB_KEY = '{{cluster-env/smokeuser_keytab}}' +SMOKEUSER_PRINCIPAL_KEY = '{{cluster-env/smokeuser_principal_name}}' SMOKEUSER_KEY = '{{cluster-env/smokeuser}}' # The configured Kerberos executable search paths, if any @@ -58,8 +61,15 @@ CONNECTION_TIMEOUT_KEY = 'connection.timeout' CONNECTION_TIMEOUT_DEFAULT = 5.0 CURL_CONNECTION_TIMEOUT_DEFAULT = str(int(CONNECTION_TIMEOUT_DEFAULT)) +# default keytab location +SMOKEUSER_KEYTAB_SCRIPT_PARAM_KEY = 'default.smoke.keytab' +SMOKEUSER_KEYTAB_DEFAULT = '/etc/security/keytabs/smokeuser.headless.keytab' + +# default smoke principal +SMOKEUSER_PRINCIPAL_SCRIPT_PARAM_KEY = 'default.smoke.principal' +SMOKEUSER_PRINCIPAL_DEFAULT = 'ambari...@example.com' + # default smoke user -SMOKEUSER_SCRIPT_PARAM_KEY = 'default.smoke.user' SMOKEUSER_DEFAULT = 'ambari-qa' def get_tokens(): @@ -67,9 +77,9 @@ def get_tokens(): Returns a tuple of tokens in the format {{site/property}} that will be used to build the dictionary passed into execute """ - return (TEMPLETON_PORT_KEY, SECURITY_ENABLED_KEY, WEBHCAT_KEYTAB_KEY, -WEBHCAT_PRINCIPAL_KEY, KERBEROS_EXECUTABLE_SEARCH_PATHS_KEY, SMOKEUSER_KEY) - + return (TEMPLETON_PORT_KEY, SECURITY_ENABLED_KEY, SMOKEUSER_KEYTAB_KEY,SMOKEUSER_PRINCIPAL_KEY, + KERBEROS_EXECUTABLE_SEARCH_PATHS_KEY, SMOKEUSER_KEY) + def execute(configurations={}, parameters={}, host_name=None): """ @@ -119,51 +129,33 @@ def execute(configurations={}, parameters={}, host_name=None): json_response = {} if security_enabled: -if WEBHCAT_KEYTAB_KEY not in configurations or WEBHCAT_PRINCIPAL_KEY not in configurations: - return (RESULT_CODE_UNKNOWN, [str(configurations)]) - try: - webhcat_keytab = configurations[WEBHCAT_KEYTAB_KEY] - webhcat_principal = configurations[WEBHCAT_PRINCIPAL_KEY] - - # substitute _HOST in kerberos principal with actual fqdn - webhcat_principal = webhcat_principal.replace('_HOST', host_name) - - # Create the kerberos credentials cache (ccache) file and set it in the environment to use - # when executing curl - env = Environment.get_instance() - ccache_file = "{0}{1}webhcat_alert_cc_{2}".format(env.tmp_dir, sep, getpid()) - kerberos_env = {'KRB5CCNAME': ccache_file} + # defaults + smokeuser_keytab = SMOKEUSER_KEYTAB_DEFAULT + smokeuser_principal = SMOKEUSER_PRINCIPAL_DEFAULT + + # check script params + if SMOKEUSER_PRINCIPA
ambari git commit: AMBARI-12329 - Review HIVE recommendations and changes on upgrade
Repository: ambari Updated Branches: refs/heads/branch-2.1 5170cd766 -> 79b951c2f AMBARI-12329 - Review HIVE recommendations and changes on upgrade Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/79b951c2 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/79b951c2 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/79b951c2 Branch: refs/heads/branch-2.1 Commit: 79b951c2f35b8e8a5952993bad6680a92ab44473 Parents: 5170cd7 Author: Artem Baranchuk Authored: Tue Jul 21 13:44:49 2015 +0300 Committer: Artem Baranchuk Committed: Tue Jul 21 13:44:49 2015 +0300 -- .../server/upgrade/UpgradeCatalog210.java | 40 +++-- .../stacks/HDP/2.2/services/stack_advisor.py| 40 ++--- .../server/upgrade/UpgradeCatalog210Test.java | 42 +++-- .../stacks/2.2/common/test_stack_advisor.py | 62 .../stacks/2.3/common/test_stack_advisor.py | 39 5 files changed, 169 insertions(+), 54 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/79b951c2/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java index 981890d..3c274b2 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java @@ -1560,21 +1560,51 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog { for (final Cluster cluster : clusterMap.values()) { String content = null; if(cluster.getDesiredConfigByType("hive-env") != null) { -Map hiveProps = new HashMap(); +Map hiveEnvProps = new HashMap(); +Set hiveServerSiteRemoveProps = new HashSet(); // Update logic for setting HIVE_AUX_JARS_PATH in hive-env.sh content = cluster.getDesiredConfigByType("hive-env").getProperties().get("content"); if(content != null) { content = updateHiveEnvContent(content); - hiveProps.put("content", content); + hiveEnvProps.put("content", content); } //hive metastore and client_heapsize are added for HDP2, we should check if it exists and not add it for HDP1 if (!cluster.getDesiredConfigByType("hive-env").getProperties().containsKey("hive.client.heapsize")) { - hiveProps.put("hive.client.heapsize", "512m"); + hiveEnvProps.put("hive.client.heapsize", "512m"); } if (!cluster.getDesiredConfigByType("hive-env").getProperties().containsKey("hive.metastore.heapsize")) { - hiveProps.put("hive.metastore.heapsize", "1024m"); + hiveEnvProps.put("hive.metastore.heapsize", "1024m"); } -updateConfigurationPropertiesForCluster(cluster, "hive-env", hiveProps, true, true); +if (cluster.getDesiredConfigByType("hive-env").getProperties().containsKey("hive_security_authorization") && + "none".equalsIgnoreCase(cluster.getDesiredConfigByType("hive-env").getProperties().get("hive_security_authorization"))) { + hiveServerSiteRemoveProps.add("hive.security.authorization.manager"); + hiveServerSiteRemoveProps.add("hive.security.authenticator.manager"); +} +updateConfigurationPropertiesForCluster(cluster, "hive-env", hiveEnvProps, true, true); +updateConfigurationPropertiesForCluster(cluster, "hiveserver2-site", new HashMap(), hiveServerSiteRemoveProps, false, true); + } + + if(cluster.getDesiredConfigByType("hive-site") != null) { +Set hiveSiteRemoveProps = new HashSet(); +String hive_server2_auth = ""; +if (cluster.getDesiredConfigByType("hive-site").getProperties().containsKey("hive.server2.authentication")) { + hive_server2_auth = cluster.getDesiredConfigByType("hive-site").getProperties().get("hive.server2.authentication"); +} +if (!"pam".equalsIgnoreCase(hive_server2_auth)) { + hiveSiteRemoveProps.add("hive.server2.authentication.pam.services"); +} +if (!"custom".equalsIgnoreCase(hive_server2_auth)) { + hiveSiteRemoveProps.add("hive.server2.custom.authentication.class"); +} +if (!"ldap".equalsIgnoreCase(hive_server2_auth)) { + hiveSiteRemoveProps.add("hive.server2.authentication.ldap.url"); + hiveSiteRemo
ambari git commit: AMBARI-12329 - Review HIVE recommendations and changes on upgrade
Repository: ambari Updated Branches: refs/heads/trunk eddaa2982 -> 4bdf0253c AMBARI-12329 - Review HIVE recommendations and changes on upgrade Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4bdf0253 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4bdf0253 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4bdf0253 Branch: refs/heads/trunk Commit: 4bdf0253c0eaee3440346f8f15d2ceb16d315714 Parents: eddaa29 Author: Artem Baranchuk Authored: Mon Jul 13 12:33:00 2015 +0300 Committer: Artem Baranchuk Committed: Tue Jul 21 13:42:51 2015 +0300 -- .../server/upgrade/UpgradeCatalog210.java | 40 +++-- .../stacks/HDP/2.2/services/stack_advisor.py| 40 ++--- .../server/upgrade/UpgradeCatalog210Test.java | 42 +++-- .../stacks/2.2/common/test_stack_advisor.py | 62 .../stacks/2.3/common/test_stack_advisor.py | 39 5 files changed, 169 insertions(+), 54 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4bdf0253/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java index 981890d..3c274b2 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java @@ -1560,21 +1560,51 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog { for (final Cluster cluster : clusterMap.values()) { String content = null; if(cluster.getDesiredConfigByType("hive-env") != null) { -Map hiveProps = new HashMap(); +Map hiveEnvProps = new HashMap(); +Set hiveServerSiteRemoveProps = new HashSet(); // Update logic for setting HIVE_AUX_JARS_PATH in hive-env.sh content = cluster.getDesiredConfigByType("hive-env").getProperties().get("content"); if(content != null) { content = updateHiveEnvContent(content); - hiveProps.put("content", content); + hiveEnvProps.put("content", content); } //hive metastore and client_heapsize are added for HDP2, we should check if it exists and not add it for HDP1 if (!cluster.getDesiredConfigByType("hive-env").getProperties().containsKey("hive.client.heapsize")) { - hiveProps.put("hive.client.heapsize", "512m"); + hiveEnvProps.put("hive.client.heapsize", "512m"); } if (!cluster.getDesiredConfigByType("hive-env").getProperties().containsKey("hive.metastore.heapsize")) { - hiveProps.put("hive.metastore.heapsize", "1024m"); + hiveEnvProps.put("hive.metastore.heapsize", "1024m"); } -updateConfigurationPropertiesForCluster(cluster, "hive-env", hiveProps, true, true); +if (cluster.getDesiredConfigByType("hive-env").getProperties().containsKey("hive_security_authorization") && + "none".equalsIgnoreCase(cluster.getDesiredConfigByType("hive-env").getProperties().get("hive_security_authorization"))) { + hiveServerSiteRemoveProps.add("hive.security.authorization.manager"); + hiveServerSiteRemoveProps.add("hive.security.authenticator.manager"); +} +updateConfigurationPropertiesForCluster(cluster, "hive-env", hiveEnvProps, true, true); +updateConfigurationPropertiesForCluster(cluster, "hiveserver2-site", new HashMap(), hiveServerSiteRemoveProps, false, true); + } + + if(cluster.getDesiredConfigByType("hive-site") != null) { +Set hiveSiteRemoveProps = new HashSet(); +String hive_server2_auth = ""; +if (cluster.getDesiredConfigByType("hive-site").getProperties().containsKey("hive.server2.authentication")) { + hive_server2_auth = cluster.getDesiredConfigByType("hive-site").getProperties().get("hive.server2.authentication"); +} +if (!"pam".equalsIgnoreCase(hive_server2_auth)) { + hiveSiteRemoveProps.add("hive.server2.authentication.pam.services"); +} +if (!"custom".equalsIgnoreCase(hive_server2_auth)) { + hiveSiteRemoveProps.add("hive.server2.custom.authentication.class"); +} +if (!"ldap".equalsIgnoreCase(hive_server2_auth)) { + hiveSiteRemoveProps.add("hive.server2.authentication.ldap.url"); + hiveSiteRemoveProps.ad
ambari git commit: AMBARI-12329 - Review HIVE recommendations and changes on upgrade
Repository: ambari Updated Branches: refs/heads/branch-2.1 9cf3502ab -> 4484e91ef AMBARI-12329 - Review HIVE recommendations and changes on upgrade Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4484e91e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4484e91e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4484e91e Branch: refs/heads/branch-2.1 Commit: 4484e91ef25c69f4fdb588d6c74389a9dc9b8d3f Parents: 9cf3502 Author: Artem Baranchuk Authored: Wed Jul 8 18:13:12 2015 +0300 Committer: Artem Baranchuk Committed: Wed Jul 8 18:13:12 2015 +0300 -- .../server/upgrade/UpgradeCatalog210.java | 40 +++-- .../stacks/HDP/2.2/services/stack_advisor.py| 32 +++--- .../server/upgrade/UpgradeCatalog210Test.java | 42 +++-- .../stacks/2.2/common/test_stack_advisor.py | 62 .../stacks/2.3/common/test_stack_advisor.py | 39 5 files changed, 161 insertions(+), 54 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4484e91e/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java index 3d4d701..2a333c2 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java @@ -1394,21 +1394,51 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog { for (final Cluster cluster : clusterMap.values()) { String content = null; if(cluster.getDesiredConfigByType("hive-env") != null) { -Map hiveProps = new HashMap(); +Map hiveEnvProps = new HashMap(); +Set hiveServerSiteRemoveProps = new HashSet(); // Update logic for setting HIVE_AUX_JARS_PATH in hive-env.sh content = cluster.getDesiredConfigByType("hive-env").getProperties().get("content"); if(content != null) { content = updateHiveEnvContent(content); - hiveProps.put("content", content); + hiveEnvProps.put("content", content); } //hive metastore and client_heapsize are added for HDP2, we should check if it exists and not add it for HDP1 if (!cluster.getDesiredConfigByType("hive-env").getProperties().containsKey("hive.client.heapsize")) { - hiveProps.put("hive.client.heapsize", "512m"); + hiveEnvProps.put("hive.client.heapsize", "512m"); } if (!cluster.getDesiredConfigByType("hive-env").getProperties().containsKey("hive.metastore.heapsize")) { - hiveProps.put("hive.metastore.heapsize", "1024m"); + hiveEnvProps.put("hive.metastore.heapsize", "1024m"); } -updateConfigurationPropertiesForCluster(cluster, "hive-env", hiveProps, true, true); +if (cluster.getDesiredConfigByType("hive-env").getProperties().containsKey("hive_security_authorization") && + "none".equalsIgnoreCase(cluster.getDesiredConfigByType("hive-env").getProperties().get("hive_security_authorization"))) { + hiveServerSiteRemoveProps.add("hive.security.authorization.manager"); + hiveServerSiteRemoveProps.add("hive.security.authenticator.manager"); +} +updateConfigurationPropertiesForCluster(cluster, "hive-env", hiveEnvProps, true, true); +updateConfigurationPropertiesForCluster(cluster, "hiveserver2-site", new HashMap(), hiveServerSiteRemoveProps, false, true); + } + + if(cluster.getDesiredConfigByType("hive-site") != null) { +Set hiveSiteRemoveProps = new HashSet(); +String hive_server2_auth = ""; +if (cluster.getDesiredConfigByType("hive-site").getProperties().containsKey("hive.server2.authentication")) { + hive_server2_auth = cluster.getDesiredConfigByType("hive-site").getProperties().get("hive.server2.authentication"); +} +if (!"pam".equalsIgnoreCase(hive_server2_auth)) { + hiveSiteRemoveProps.add("hive.server2.authentication.pam.services"); +} +if (!"custom".equalsIgnoreCase(hive_server2_auth)) { + hiveSiteRemoveProps.add("hive.server2.custom.authentication.class"); +} +if (!"ldap".equalsIgnoreCase(hive_server2_auth)) { + hiveSiteRemoveProps.add("hive.server2.authentication.ldap.url"); + hiveSiteRemovePro
ambari git commit: AMBARI-12329 - Review HIVE recommendations and changes on upgrade
Repository: ambari Updated Branches: refs/heads/trunk 197c84793 -> d881d0d98 AMBARI-12329 - Review HIVE recommendations and changes on upgrade Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d881d0d9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d881d0d9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d881d0d9 Branch: refs/heads/trunk Commit: d881d0d98fc25b067cd9b42826a44133402ba41e Parents: 197c847 Author: Artem Baranchuk Authored: Tue Jul 7 14:37:13 2015 +0300 Committer: Artem Baranchuk Committed: Wed Jul 8 18:09:49 2015 +0300 -- .../server/upgrade/UpgradeCatalog210.java | 40 +++-- .../stacks/HDP/2.2/services/stack_advisor.py| 32 +++--- .../server/upgrade/UpgradeCatalog210Test.java | 42 +++-- .../stacks/2.2/common/test_stack_advisor.py | 62 .../stacks/2.3/common/test_stack_advisor.py | 39 5 files changed, 161 insertions(+), 54 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d881d0d9/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java index 3d4d701..2a333c2 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java @@ -1394,21 +1394,51 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog { for (final Cluster cluster : clusterMap.values()) { String content = null; if(cluster.getDesiredConfigByType("hive-env") != null) { -Map hiveProps = new HashMap(); +Map hiveEnvProps = new HashMap(); +Set hiveServerSiteRemoveProps = new HashSet(); // Update logic for setting HIVE_AUX_JARS_PATH in hive-env.sh content = cluster.getDesiredConfigByType("hive-env").getProperties().get("content"); if(content != null) { content = updateHiveEnvContent(content); - hiveProps.put("content", content); + hiveEnvProps.put("content", content); } //hive metastore and client_heapsize are added for HDP2, we should check if it exists and not add it for HDP1 if (!cluster.getDesiredConfigByType("hive-env").getProperties().containsKey("hive.client.heapsize")) { - hiveProps.put("hive.client.heapsize", "512m"); + hiveEnvProps.put("hive.client.heapsize", "512m"); } if (!cluster.getDesiredConfigByType("hive-env").getProperties().containsKey("hive.metastore.heapsize")) { - hiveProps.put("hive.metastore.heapsize", "1024m"); + hiveEnvProps.put("hive.metastore.heapsize", "1024m"); } -updateConfigurationPropertiesForCluster(cluster, "hive-env", hiveProps, true, true); +if (cluster.getDesiredConfigByType("hive-env").getProperties().containsKey("hive_security_authorization") && + "none".equalsIgnoreCase(cluster.getDesiredConfigByType("hive-env").getProperties().get("hive_security_authorization"))) { + hiveServerSiteRemoveProps.add("hive.security.authorization.manager"); + hiveServerSiteRemoveProps.add("hive.security.authenticator.manager"); +} +updateConfigurationPropertiesForCluster(cluster, "hive-env", hiveEnvProps, true, true); +updateConfigurationPropertiesForCluster(cluster, "hiveserver2-site", new HashMap(), hiveServerSiteRemoveProps, false, true); + } + + if(cluster.getDesiredConfigByType("hive-site") != null) { +Set hiveSiteRemoveProps = new HashSet(); +String hive_server2_auth = ""; +if (cluster.getDesiredConfigByType("hive-site").getProperties().containsKey("hive.server2.authentication")) { + hive_server2_auth = cluster.getDesiredConfigByType("hive-site").getProperties().get("hive.server2.authentication"); +} +if (!"pam".equalsIgnoreCase(hive_server2_auth)) { + hiveSiteRemoveProps.add("hive.server2.authentication.pam.services"); +} +if (!"custom".equalsIgnoreCase(hive_server2_auth)) { + hiveSiteRemoveProps.add("hive.server2.custom.authentication.class"); +} +if (!"ldap".equalsIgnoreCase(hive_server2_auth)) { + hiveSiteRemoveProps.add("hive.server2.authentication.ldap.url"); + hiveSiteRemoveProps.add("hi
ambari git commit: AMBARI-12259 - Configs: making strange recommendations + changes on upgrade(tests)
Repository: ambari Updated Branches: refs/heads/branch-2.1 1d179bc35 -> ad0b13806 AMBARI-12259 - Configs: making strange recommendations + changes on upgrade(tests) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ad0b1380 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ad0b1380 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ad0b1380 Branch: refs/heads/branch-2.1 Commit: ad0b1380604acca5eff3844edcd276e8af73190a Parents: 1d179bc Author: Artem Baranchuk Authored: Fri Jul 3 15:46:29 2015 +0300 Committer: Artem Baranchuk Committed: Fri Jul 3 15:46:29 2015 +0300 -- .../stacks/HDP/2.2/services/stack_advisor.py| 8 +-- .../stacks/2.2/common/test_stack_advisor.py | 17 +++--- .../stacks/2.3/common/test_stack_advisor.py | 57 ++-- 3 files changed, 43 insertions(+), 39 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ad0b1380/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 477f724..f238d44 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 @@ -560,13 +560,13 @@ class HDP22StackAdvisor(HDP21StackAdvisor): else: putHbaseSiteProperty('hbase.coprocessor.master.classes', "") coprocessorRegionClassList.append("org.apache.hadoop.hbase.security.access.SecureBulkLoadEndpoint") -if ('hbase.coprocessor.regionserver.classes' in configurations["hbase-env"]["properties"]) or \ -('hbase-env' in services['configurations'] and 'hbase.coprocessor.regionserver.classes' in services['configurations']["hbase-env"]["properties"]): +if ('hbase.coprocessor.regionserver.classes' in configurations["hbase-site"]["properties"]) or \ +('hbase-site' in services['configurations'] and 'hbase.coprocessor.regionserver.classes' in services['configurations']["hbase-site"]["properties"]): putHbaseSitePropertyAttributes('hbase.coprocessor.regionserver.classes', 'delete', 'true') else: coprocessorRegionClassList.append("org.apache.hadoop.hbase.security.access.SecureBulkLoadEndpoint") - if ('hbase.coprocessor.regionserver.classes' in configurations["hbase-env"]["properties"]) or \ - ('hbase-env' in services['configurations'] and 'hbase.coprocessor.regionserver.classes' in services['configurations']["hbase-env"]["properties"]): + if ('hbase.coprocessor.regionserver.classes' in configurations["hbase-site"]["properties"]) or \ + ('hbase-site' in services['configurations'] and 'hbase.coprocessor.regionserver.classes' in services['configurations']["hbase-site"]["properties"]): putHbaseSitePropertyAttributes('hbase.coprocessor.regionserver.classes', 'delete', 'true') # Authentication http://git-wip-us.apache.org/repos/asf/ambari/blob/ad0b1380/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 7726b16..f26c08f 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 @@ -1907,11 +1907,19 @@ class TestHDP22StackAdvisor(TestCase): "configurations": { "hbase-env": { "properties": { -"phoenix_sql_enabled": "true" +"phoenix_sql_enabled": "true", +"hbase_max_direct_memory_size": "" } }, "hbase-site": { - "properties": {} + "properties": { +"hbase.rpc.controllerfactory.class": "", +"phoenix.functions.allowUserDefinedFunctions": "", +"hbase.bucketcache.ioengine": "", +"hbase.bucketcache.size": "", +"hbase.bucketcache.percentage.in.combinedcache": "", +"hbase.coprocessor.regionserver.classes": "" + } } } } @@ -1924,9 +1932,6 @@ class TestHDP22StackAdvisor(TestCase): "hbase.coprocessor.region.classes": "org.apache.hadoop.hbase.security.access.SecureBulkLoadEndpoint" }, 'property_attributes': { - 'hbase.coprocessor.regionserver.classes': { -'delete': 'true' - }, "hbase.bucketcache.size": { "delete": "true"
ambari git commit: AMBARI-12259 - Configs: making strange recommendations + changes on upgrade(tests)
Repository: ambari Updated Branches: refs/heads/trunk b74ba5182 -> b613ced47 AMBARI-12259 - Configs: making strange recommendations + changes on upgrade(tests) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b613ced4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b613ced4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b613ced4 Branch: refs/heads/trunk Commit: b613ced477a9569d507341f830917dd1525da802 Parents: b74ba51 Author: Artem Baranchuk Authored: Fri Jul 3 13:44:18 2015 +0300 Committer: Artem Baranchuk Committed: Fri Jul 3 15:42:47 2015 +0300 -- .../stacks/HDP/2.2/services/stack_advisor.py| 8 +-- .../stacks/2.2/common/test_stack_advisor.py | 17 +++--- .../stacks/2.3/common/test_stack_advisor.py | 57 ++-- 3 files changed, 43 insertions(+), 39 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b613ced4/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 477f724..f238d44 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 @@ -560,13 +560,13 @@ class HDP22StackAdvisor(HDP21StackAdvisor): else: putHbaseSiteProperty('hbase.coprocessor.master.classes', "") coprocessorRegionClassList.append("org.apache.hadoop.hbase.security.access.SecureBulkLoadEndpoint") -if ('hbase.coprocessor.regionserver.classes' in configurations["hbase-env"]["properties"]) or \ -('hbase-env' in services['configurations'] and 'hbase.coprocessor.regionserver.classes' in services['configurations']["hbase-env"]["properties"]): +if ('hbase.coprocessor.regionserver.classes' in configurations["hbase-site"]["properties"]) or \ +('hbase-site' in services['configurations'] and 'hbase.coprocessor.regionserver.classes' in services['configurations']["hbase-site"]["properties"]): putHbaseSitePropertyAttributes('hbase.coprocessor.regionserver.classes', 'delete', 'true') else: coprocessorRegionClassList.append("org.apache.hadoop.hbase.security.access.SecureBulkLoadEndpoint") - if ('hbase.coprocessor.regionserver.classes' in configurations["hbase-env"]["properties"]) or \ - ('hbase-env' in services['configurations'] and 'hbase.coprocessor.regionserver.classes' in services['configurations']["hbase-env"]["properties"]): + if ('hbase.coprocessor.regionserver.classes' in configurations["hbase-site"]["properties"]) or \ + ('hbase-site' in services['configurations'] and 'hbase.coprocessor.regionserver.classes' in services['configurations']["hbase-site"]["properties"]): putHbaseSitePropertyAttributes('hbase.coprocessor.regionserver.classes', 'delete', 'true') # Authentication http://git-wip-us.apache.org/repos/asf/ambari/blob/b613ced4/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 7726b16..f26c08f 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 @@ -1907,11 +1907,19 @@ class TestHDP22StackAdvisor(TestCase): "configurations": { "hbase-env": { "properties": { -"phoenix_sql_enabled": "true" +"phoenix_sql_enabled": "true", +"hbase_max_direct_memory_size": "" } }, "hbase-site": { - "properties": {} + "properties": { +"hbase.rpc.controllerfactory.class": "", +"phoenix.functions.allowUserDefinedFunctions": "", +"hbase.bucketcache.ioengine": "", +"hbase.bucketcache.size": "", +"hbase.bucketcache.percentage.in.combinedcache": "", +"hbase.coprocessor.regionserver.classes": "" + } } } } @@ -1924,9 +1932,6 @@ class TestHDP22StackAdvisor(TestCase): "hbase.coprocessor.region.classes": "org.apache.hadoop.hbase.security.access.SecureBulkLoadEndpoint" }, 'property_attributes': { - 'hbase.coprocessor.regionserver.classes': { -'delete': 'true' - }, "hbase.bucketcache.size": { "delete": "true" }, @@
ambari git commit: AMBARI-12259 - Configs: making strange recommendations + changes on upgrade(advisor changes)
Repository: ambari Updated Branches: refs/heads/branch-2.1 bbf85aa02 -> 89b0c0a4b AMBARI-12259 - Configs: making strange recommendations + changes on upgrade(advisor changes) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/89b0c0a4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/89b0c0a4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/89b0c0a4 Branch: refs/heads/branch-2.1 Commit: 89b0c0a4b24a6f4797e60e1a57d35b34a95327e7 Parents: bbf85aa Author: Artem Baranchuk Authored: Fri Jul 3 12:56:22 2015 +0300 Committer: Artem Baranchuk Committed: Fri Jul 3 12:56:38 2015 +0300 -- .../server/upgrade/UpgradeCatalog210.java | 1 - .../stacks/HDP/2.2/services/stack_advisor.py| 32 +++- 2 files changed, 24 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/89b0c0a4/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java index b0480fa..47ddd7a 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java @@ -1440,7 +1440,6 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog { hbaseSiteRemoveProps.add("hbase.bucketcache.ioengine"); hbaseSiteRemoveProps.add("hbase.bucketcache.size"); hbaseSiteRemoveProps.add("hbase.bucketcache.percentage.in.combinedcache"); -hbaseSiteRemoveProps.add("hbase_max_direct_memory_size"); hbaseEnvRemoveProps.add("hbase_max_direct_memory_size"); } } http://git-wip-us.apache.org/repos/asf/ambari/blob/89b0c0a4/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 a085ab2..477f724 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 @@ -477,8 +477,12 @@ class HDP22StackAdvisor(HDP21StackAdvisor): putHbaseSiteProperty("phoenix.functions.allowUserDefinedFunctions", 'true') else: putHbaseSiteProperty("hbase.regionserver.wal.codec", 'org.apache.hadoop.hbase.regionserver.wal.WALCellCodec') - putHbaseSitePropertyAttributes('hbase.rpc.controllerfactory.class', 'delete', 'true') - putHbaseSitePropertyAttributes('phoenix.functions.allowUserDefinedFunctions', 'delete', 'true') + if ('hbase.rpc.controllerfactory.class' in configurations["hbase-site"]["properties"]) or \ + ('hbase-site' in services['configurations'] and 'hbase.rpc.controllerfactory.class' in services['configurations']["hbase-site"]["properties"]): +putHbaseSitePropertyAttributes('hbase.rpc.controllerfactory.class', 'delete', 'true') + if ('phoenix.functions.allowUserDefinedFunctions' in configurations["hbase-site"]["properties"]) or \ + ('hbase-site' in services['configurations'] and 'phoenix.functions.allowUserDefinedFunctions' in services['configurations']["hbase-site"]["properties"]): + putHbaseSitePropertyAttributes('phoenix.functions.allowUserDefinedFunctions', 'delete', 'true') servicesList = [service["StackServices"]["service_name"] for service in services["services"]] if 'ranger-hbase-plugin-properties' in services['configurations'] and ('ranger-hbase-plugin-enabled' in services['configurations']['ranger-hbase-plugin-properties']['properties']): @@ -518,10 +522,18 @@ class HDP22StackAdvisor(HDP21StackAdvisor): putHbaseEnvProperty('hbase_regionserver_heapsize', regionserver_heap_size) else: # Disable - putHbaseSitePropertyAttributes('hbase.bucketcache.ioengine', 'delete', 'true') - putHbaseSitePropertyAttributes('hbase.bucketcache.size', 'delete', 'true') - putHbaseSitePropertyAttributes('hbase.bucketcache.percentage.in.combinedcache', 'delete', 'true') - putHbaseEnvPropertyAttributes('hbase_max_direct_memory_size', 'delete', 'true') + if ('hbase.bucketcache.ioengine' in configurations["hbase-site"]["properties"]) or \ + ('hbase-site' in services['configurations'] and 'hbase.bucketcache.ioengine' in services['configurations']["hbase-site"]["properties"]): +putHbaseSi
ambari git commit: AMBARI-12259 - Configs: making strange recommendations + changes on upgrade(advisor changes)
Repository: ambari Updated Branches: refs/heads/trunk b7b518a9c -> 957bf2b8c AMBARI-12259 - Configs: making strange recommendations + changes on upgrade(advisor changes) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/957bf2b8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/957bf2b8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/957bf2b8 Branch: refs/heads/trunk Commit: 957bf2b8cf5234f9f2c42a6f928a6fedb6e88534 Parents: b7b518a Author: Artem Baranchuk Authored: Fri Jul 3 03:14:16 2015 +0300 Committer: Artem Baranchuk Committed: Fri Jul 3 12:54:08 2015 +0300 -- .../server/upgrade/UpgradeCatalog210.java | 1 - .../stacks/HDP/2.2/services/stack_advisor.py| 32 +++- 2 files changed, 24 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/957bf2b8/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java index b0480fa..47ddd7a 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java @@ -1440,7 +1440,6 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog { hbaseSiteRemoveProps.add("hbase.bucketcache.ioengine"); hbaseSiteRemoveProps.add("hbase.bucketcache.size"); hbaseSiteRemoveProps.add("hbase.bucketcache.percentage.in.combinedcache"); -hbaseSiteRemoveProps.add("hbase_max_direct_memory_size"); hbaseEnvRemoveProps.add("hbase_max_direct_memory_size"); } } http://git-wip-us.apache.org/repos/asf/ambari/blob/957bf2b8/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 a085ab2..477f724 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 @@ -477,8 +477,12 @@ class HDP22StackAdvisor(HDP21StackAdvisor): putHbaseSiteProperty("phoenix.functions.allowUserDefinedFunctions", 'true') else: putHbaseSiteProperty("hbase.regionserver.wal.codec", 'org.apache.hadoop.hbase.regionserver.wal.WALCellCodec') - putHbaseSitePropertyAttributes('hbase.rpc.controllerfactory.class', 'delete', 'true') - putHbaseSitePropertyAttributes('phoenix.functions.allowUserDefinedFunctions', 'delete', 'true') + if ('hbase.rpc.controllerfactory.class' in configurations["hbase-site"]["properties"]) or \ + ('hbase-site' in services['configurations'] and 'hbase.rpc.controllerfactory.class' in services['configurations']["hbase-site"]["properties"]): +putHbaseSitePropertyAttributes('hbase.rpc.controllerfactory.class', 'delete', 'true') + if ('phoenix.functions.allowUserDefinedFunctions' in configurations["hbase-site"]["properties"]) or \ + ('hbase-site' in services['configurations'] and 'phoenix.functions.allowUserDefinedFunctions' in services['configurations']["hbase-site"]["properties"]): + putHbaseSitePropertyAttributes('phoenix.functions.allowUserDefinedFunctions', 'delete', 'true') servicesList = [service["StackServices"]["service_name"] for service in services["services"]] if 'ranger-hbase-plugin-properties' in services['configurations'] and ('ranger-hbase-plugin-enabled' in services['configurations']['ranger-hbase-plugin-properties']['properties']): @@ -518,10 +522,18 @@ class HDP22StackAdvisor(HDP21StackAdvisor): putHbaseEnvProperty('hbase_regionserver_heapsize', regionserver_heap_size) else: # Disable - putHbaseSitePropertyAttributes('hbase.bucketcache.ioengine', 'delete', 'true') - putHbaseSitePropertyAttributes('hbase.bucketcache.size', 'delete', 'true') - putHbaseSitePropertyAttributes('hbase.bucketcache.percentage.in.combinedcache', 'delete', 'true') - putHbaseEnvPropertyAttributes('hbase_max_direct_memory_size', 'delete', 'true') + if ('hbase.bucketcache.ioengine' in configurations["hbase-site"]["properties"]) or \ + ('hbase-site' in services['configurations'] and 'hbase.bucketcache.ioengine' in services['configurations']["hbase-site"]["properties"]): +putHbaseSiteProperty
ambari git commit: AMBARI-12259 - Configs: making strange recommendations + changes on upgrade
Repository: ambari Updated Branches: refs/heads/branch-2.1 80204f8a8 -> 54df4ff58 AMBARI-12259 - Configs: making strange recommendations + changes on upgrade Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/54df4ff5 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/54df4ff5 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/54df4ff5 Branch: refs/heads/branch-2.1 Commit: 54df4ff580c242bad2afc6fa2418388cfaf9a471 Parents: 80204f8 Author: Artem Baranchuk Authored: Thu Jul 2 20:00:13 2015 +0300 Committer: Artem Baranchuk Committed: Thu Jul 2 20:00:13 2015 +0300 -- .../server/upgrade/UpgradeCatalog210.java | 90 +++- .../server/upgrade/UpgradeCatalog210Test.java | 15 +++- 2 files changed, 99 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/54df4ff5/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java index e59687d..b0480fa 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java @@ -42,6 +42,7 @@ import org.apache.ambari.server.orm.entities.StackEntity; import org.apache.ambari.server.state.Cluster; import org.apache.ambari.server.state.Clusters; import org.apache.ambari.server.state.Config; +import org.apache.ambari.server.state.Host; import org.apache.ambari.server.state.Service; import org.apache.ambari.server.state.StackId; import org.apache.ambari.server.state.alert.AlertDefinitionFactory; @@ -1314,6 +1315,21 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog { } } + private int getHbaseRamRecomendations(int totalMem) { +if (totalMem <= 4) return 1; +if (4 < totalMem && totalMem <= 8) return 1; +if (8 < totalMem && totalMem <= 16) return 2; +if (16 < totalMem && totalMem <= 24) return 4; +if (24 < totalMem && totalMem <= 48) return 8; +if (48 < totalMem && totalMem <= 64) return 8; +if (64 < totalMem && totalMem <= 72) return 8; +if (72 < totalMem && totalMem <= 96) return 16; +if (96 < totalMem && totalMem <= 128) return 24; +if (128 < totalMem && totalMem <= 256) return 32; +if (256 < totalMem) return 64; +return -1; + } + protected void updateHiveConfigs() throws AmbariException { AmbariManagementController ambariManagementController = injector.getInstance( AmbariManagementController.class); @@ -1359,14 +1375,80 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog { for (final Cluster cluster : clusterMap.values()) { if (cluster.getDesiredConfigByType("hbase-site") != null) { Map hbaseEnvProps = new HashMap(); -Map hbaseSiteProps = cluster.getDesiredConfigByType("hbase-site").getProperties(); +Map hbaseSiteProps = new HashMap(); +Set hbaseEnvRemoveProps = new HashSet(); +Set hbaseSiteRemoveProps = new HashSet(); -if (hbaseSiteProps.containsKey("hbase.region.server.rpc.scheduler.factory.class") && - "org.apache.phoenix.hbase.index.ipc.PhoenixIndexRpcSchedulerFactory".equals(hbaseSiteProps.get( -"hbase.region.server.rpc.scheduler.factory.class"))) { +if (cluster.getDesiredConfigByType("hbase-site").getProperties().containsKey("hbase.region.server.rpc.scheduler.factory.class") && + "org.apache.phoenix.hbase.index.ipc.PhoenixIndexRpcSchedulerFactory".equals(cluster.getDesiredConfigByType("hbase-site").getProperties().get( +"hbase.region.server.rpc.scheduler.factory.class"))) { hbaseEnvProps.put("phoenix_sql_enabled", "true"); } + +if (cluster.getDesiredConfigByType("hbase-env").getProperties().containsKey("phoenix_sql_enabled") && + "true".equalsIgnoreCase(cluster.getDesiredConfigByType("hbase-env").getProperties().get("phoenix_sql_enabled"))) { + hbaseSiteProps.put("hbase.regionserver.wal.codec", "org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec"); + hbaseSiteProps.put("phoenix.functions.allowUserDefinedFunctions", "true"); +} +else { + hbaseSiteProps.put("hbase.regionserver.wal.codec", "org.apache.hadoop.hbase.regionserver.wal.WALCellCodec"); + hbaseSiteRemoveProps.add("hbase.rpc.controllerfactory.class"); + hbaseSiteRemoveProps.add("phoenix.functions
ambari git commit: AMBARI-12259 - Configs: making strange recommendations + changes on upgrade
Repository: ambari Updated Branches: refs/heads/trunk f5696614e -> 01b1522e1 AMBARI-12259 - Configs: making strange recommendations + changes on upgrade Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/01b1522e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/01b1522e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/01b1522e Branch: refs/heads/trunk Commit: 01b1522e193a1e729da1ed0d96416f285b530274 Parents: f569661 Author: Artem Baranchuk Authored: Wed Jul 1 14:24:52 2015 +0300 Committer: Artem Baranchuk Committed: Thu Jul 2 19:57:28 2015 +0300 -- .../server/upgrade/UpgradeCatalog210.java | 90 +++- .../server/upgrade/UpgradeCatalog210Test.java | 15 +++- 2 files changed, 99 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/01b1522e/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java index e59687d..b0480fa 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java @@ -42,6 +42,7 @@ import org.apache.ambari.server.orm.entities.StackEntity; import org.apache.ambari.server.state.Cluster; import org.apache.ambari.server.state.Clusters; import org.apache.ambari.server.state.Config; +import org.apache.ambari.server.state.Host; import org.apache.ambari.server.state.Service; import org.apache.ambari.server.state.StackId; import org.apache.ambari.server.state.alert.AlertDefinitionFactory; @@ -1314,6 +1315,21 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog { } } + private int getHbaseRamRecomendations(int totalMem) { +if (totalMem <= 4) return 1; +if (4 < totalMem && totalMem <= 8) return 1; +if (8 < totalMem && totalMem <= 16) return 2; +if (16 < totalMem && totalMem <= 24) return 4; +if (24 < totalMem && totalMem <= 48) return 8; +if (48 < totalMem && totalMem <= 64) return 8; +if (64 < totalMem && totalMem <= 72) return 8; +if (72 < totalMem && totalMem <= 96) return 16; +if (96 < totalMem && totalMem <= 128) return 24; +if (128 < totalMem && totalMem <= 256) return 32; +if (256 < totalMem) return 64; +return -1; + } + protected void updateHiveConfigs() throws AmbariException { AmbariManagementController ambariManagementController = injector.getInstance( AmbariManagementController.class); @@ -1359,14 +1375,80 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog { for (final Cluster cluster : clusterMap.values()) { if (cluster.getDesiredConfigByType("hbase-site") != null) { Map hbaseEnvProps = new HashMap(); -Map hbaseSiteProps = cluster.getDesiredConfigByType("hbase-site").getProperties(); +Map hbaseSiteProps = new HashMap(); +Set hbaseEnvRemoveProps = new HashSet(); +Set hbaseSiteRemoveProps = new HashSet(); -if (hbaseSiteProps.containsKey("hbase.region.server.rpc.scheduler.factory.class") && - "org.apache.phoenix.hbase.index.ipc.PhoenixIndexRpcSchedulerFactory".equals(hbaseSiteProps.get( -"hbase.region.server.rpc.scheduler.factory.class"))) { +if (cluster.getDesiredConfigByType("hbase-site").getProperties().containsKey("hbase.region.server.rpc.scheduler.factory.class") && + "org.apache.phoenix.hbase.index.ipc.PhoenixIndexRpcSchedulerFactory".equals(cluster.getDesiredConfigByType("hbase-site").getProperties().get( +"hbase.region.server.rpc.scheduler.factory.class"))) { hbaseEnvProps.put("phoenix_sql_enabled", "true"); } + +if (cluster.getDesiredConfigByType("hbase-env").getProperties().containsKey("phoenix_sql_enabled") && + "true".equalsIgnoreCase(cluster.getDesiredConfigByType("hbase-env").getProperties().get("phoenix_sql_enabled"))) { + hbaseSiteProps.put("hbase.regionserver.wal.codec", "org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec"); + hbaseSiteProps.put("phoenix.functions.allowUserDefinedFunctions", "true"); +} +else { + hbaseSiteProps.put("hbase.regionserver.wal.codec", "org.apache.hadoop.hbase.regionserver.wal.WALCellCodec"); + hbaseSiteRemoveProps.add("hbase.rpc.controllerfactory.class"); + hbaseSiteRemoveProps.add("phoenix.functions.allowUser
ambari git commit: AMBARI-12053 - 2.1 repo url in Ambari is broken - points to 2.3 stack instead
Repository: ambari Updated Branches: refs/heads/branch-2.1 82aed7ea4 -> f3560893e AMBARI-12053 - 2.1 repo url in Ambari is broken - points to 2.3 stack instead Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f3560893 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f3560893 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f3560893 Branch: refs/heads/branch-2.1 Commit: f3560893eb6d495e4ec48bf00e669b1bf6dbfdf6 Parents: 82aed7e Author: Artem Baranchuk Authored: Mon Jun 22 15:33:47 2015 +0300 Committer: Artem Baranchuk Committed: Mon Jun 22 15:34:18 2015 +0300 -- .../src/main/resources/stacks/HDP/2.1/repos/repoinfo.xml | 6 +++--- .../src/main/resources/stacks/HDP/2.2/repos/repoinfo.xml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f3560893/ambari-server/src/main/resources/stacks/HDP/2.1/repos/repoinfo.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/repos/repoinfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.1/repos/repoinfo.xml index 2a48b34..938f627 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.1/repos/repoinfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.1/repos/repoinfo.xml @@ -19,7 +19,7 @@ http://public-repo-1.hortonworks.com/HDP/hdp_urlinfo.json - http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.1.10.0 + http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.1.15.0 HDP-2.1 HDP @@ -31,7 +31,7 @@ - http://public-repo-1.hortonworks.com/HDP/suse11sp3/2.x/updates/2.1.10.0 + http://public-repo-1.hortonworks.com/HDP/suse11sp3/2.x/updates/2.1.15.0 HDP-2.1 HDP @@ -43,7 +43,7 @@ - http://public-repo-1.hortonworks.com/HDP/ubuntu12/2.x/updates/2.1.10.0 + http://public-repo-1.hortonworks.com/HDP/ubuntu12/2.x/updates/2.1.15.0 HDP-2.1 HDP http://git-wip-us.apache.org/repos/asf/ambari/blob/f3560893/ambari-server/src/main/resources/stacks/HDP/2.2/repos/repoinfo.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/repos/repoinfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/repos/repoinfo.xml index 6e46bba..dbf8506 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/repos/repoinfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/repos/repoinfo.xml @@ -19,7 +19,7 @@ http://public-repo-1.hortonworks.com/HDP/hdp_urlinfo.json - http://public-repo-1.hortonworks.com/HDP/centos6/2.x/GA/2.2.0.0 + http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.2.6.0 HDP-2.2 HDP @@ -31,7 +31,7 @@ - http://public-repo-1.hortonworks.com/HDP/suse11sp3/2.x/GA/2.2.0.0 + http://public-repo-1.hortonworks.com/HDP/suse11sp3/2.x/updates/2.2.6.0 HDP-2.2 HDP @@ -43,7 +43,7 @@ - http://public-repo-1.hortonworks.com/HDP/ubuntu12/2.x/GA/2.2.0.0 + http://public-repo-1.hortonworks.com/HDP/ubuntu12/2.x/updates/2.2.6.0 HDP-2.2 HDP
ambari git commit: AMBARI-12053 - 2.1 repo url in Ambari is broken - points to 2.3 stack instead
Repository: ambari Updated Branches: refs/heads/trunk 0212c06e4 -> ed341ece1 AMBARI-12053 - 2.1 repo url in Ambari is broken - points to 2.3 stack instead Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ed341ece Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ed341ece Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ed341ece Branch: refs/heads/trunk Commit: ed341ece11a9ddbac135c1ecc764265c740a42df Parents: 0212c06 Author: Artem Baranchuk Authored: Mon Jun 22 15:28:47 2015 +0300 Committer: Artem Baranchuk Committed: Mon Jun 22 15:29:22 2015 +0300 -- .../src/main/resources/stacks/HDP/2.1/repos/repoinfo.xml | 6 +++--- .../src/main/resources/stacks/HDP/2.2/repos/repoinfo.xml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ed341ece/ambari-server/src/main/resources/stacks/HDP/2.1/repos/repoinfo.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/repos/repoinfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.1/repos/repoinfo.xml index 2a48b34..938f627 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.1/repos/repoinfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.1/repos/repoinfo.xml @@ -19,7 +19,7 @@ http://public-repo-1.hortonworks.com/HDP/hdp_urlinfo.json - http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.1.10.0 + http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.1.15.0 HDP-2.1 HDP @@ -31,7 +31,7 @@ - http://public-repo-1.hortonworks.com/HDP/suse11sp3/2.x/updates/2.1.10.0 + http://public-repo-1.hortonworks.com/HDP/suse11sp3/2.x/updates/2.1.15.0 HDP-2.1 HDP @@ -43,7 +43,7 @@ - http://public-repo-1.hortonworks.com/HDP/ubuntu12/2.x/updates/2.1.10.0 + http://public-repo-1.hortonworks.com/HDP/ubuntu12/2.x/updates/2.1.15.0 HDP-2.1 HDP http://git-wip-us.apache.org/repos/asf/ambari/blob/ed341ece/ambari-server/src/main/resources/stacks/HDP/2.2/repos/repoinfo.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/repos/repoinfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/repos/repoinfo.xml index 6e46bba..dbf8506 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/repos/repoinfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/repos/repoinfo.xml @@ -19,7 +19,7 @@ http://public-repo-1.hortonworks.com/HDP/hdp_urlinfo.json - http://public-repo-1.hortonworks.com/HDP/centos6/2.x/GA/2.2.0.0 + http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.2.6.0 HDP-2.2 HDP @@ -31,7 +31,7 @@ - http://public-repo-1.hortonworks.com/HDP/suse11sp3/2.x/GA/2.2.0.0 + http://public-repo-1.hortonworks.com/HDP/suse11sp3/2.x/updates/2.2.6.0 HDP-2.2 HDP @@ -43,7 +43,7 @@ - http://public-repo-1.hortonworks.com/HDP/ubuntu12/2.x/GA/2.2.0.0 + http://public-repo-1.hortonworks.com/HDP/ubuntu12/2.x/updates/2.2.6.0 HDP-2.2 HDP
[1/2] ambari git commit: AMBARI-12052 - HBase has unfilled properties after deploy
Repository: ambari Updated Branches: refs/heads/branch-2.1 ac344bf01 -> 22307ad74 AMBARI-12052 - HBase has unfilled properties after deploy Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6ffb04a0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6ffb04a0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6ffb04a0 Branch: refs/heads/branch-2.1 Commit: 6ffb04a0fa3004e17f01b9a5eebf04ae9934ac78 Parents: ac344bf Author: Artem Baranchuk Authored: Mon Jun 22 14:26:08 2015 +0300 Committer: Artem Baranchuk Committed: Mon Jun 22 14:29:34 2015 +0300 -- .../HDP/2.2/services/HBASE/configuration/hbase-site.xml | 9 - 1 file changed, 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6ffb04a0/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/configuration/hbase-site.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/configuration/hbase-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/configuration/hbase-site.xml index 382608e..3451585 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/configuration/hbase-site.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/configuration/hbase-site.xml @@ -106,15 +106,6 @@ Value to be set between 0.0 and 1.0 -hbase.regionserver.global.memstore.size -${hbase.regionserver.global.memstore.upperLimit} -Maximum size of all memstores in a region server before new - updates are blocked and flushes are forced. Defaults to 40% of heap. - Updates are blocked and flushes are forced until size of all memstores - in a region server hits hbase.regionserver.global.memstore.size.lower.limit. - - - hbase.regionserver.wal.codec RegionServer WAL Codec org.apache.hadoop.hbase.regionserver.wal.WALCellCodec
[2/2] ambari git commit: AMBARI-12053 - 2.1 repo url in Ambari is broken - points to 2.3 stack instead
AMBARI-12053 - 2.1 repo url in Ambari is broken - points to 2.3 stack instead Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/22307ad7 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/22307ad7 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/22307ad7 Branch: refs/heads/branch-2.1 Commit: 22307ad74741c27d4e65a8aa01b5ca2de3588eee Parents: 6ffb04a Author: Artem Baranchuk Authored: Mon Jun 22 14:28:49 2015 +0300 Committer: Artem Baranchuk Committed: Mon Jun 22 14:29:35 2015 +0300 -- .../src/main/resources/stacks/HDP/2.1/repos/repoinfo.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/22307ad7/ambari-server/src/main/resources/stacks/HDP/2.1/repos/repoinfo.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/repos/repoinfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.1/repos/repoinfo.xml index a4d1bf7..2a48b34 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.1/repos/repoinfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.1/repos/repoinfo.xml @@ -19,7 +19,7 @@ http://public-repo-1.hortonworks.com/HDP/hdp_urlinfo.json - REPLACE_WITH_CENTOS6_URL + http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.1.10.0 HDP-2.1 HDP @@ -31,7 +31,7 @@ - REPLACE_WITH_SUSE11_URL + http://public-repo-1.hortonworks.com/HDP/suse11sp3/2.x/updates/2.1.10.0 HDP-2.1 HDP @@ -43,7 +43,7 @@ - REPLACE_WITH_UBUNTU12_URL + http://public-repo-1.hortonworks.com/HDP/ubuntu12/2.x/updates/2.1.10.0 HDP-2.1 HDP
[1/2] ambari git commit: AMBARI-12052 - HBase has unfilled properties after deploy
Repository: ambari Updated Branches: refs/heads/trunk 025093180 -> 533c8ee11 AMBARI-12052 - HBase has unfilled properties after deploy Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f7492eb1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f7492eb1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f7492eb1 Branch: refs/heads/trunk Commit: f7492eb1df4cfcd55b33d0ee347c8a189082ffac Parents: 0250931 Author: Artem Baranchuk Authored: Sun Jun 21 01:16:19 2015 +0300 Committer: Artem Baranchuk Committed: Mon Jun 22 14:21:42 2015 +0300 -- .../HDP/2.2/services/HBASE/configuration/hbase-site.xml | 9 - 1 file changed, 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f7492eb1/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/configuration/hbase-site.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/configuration/hbase-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/configuration/hbase-site.xml index 382608e..3451585 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/configuration/hbase-site.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/configuration/hbase-site.xml @@ -106,15 +106,6 @@ Value to be set between 0.0 and 1.0 -hbase.regionserver.global.memstore.size -${hbase.regionserver.global.memstore.upperLimit} -Maximum size of all memstores in a region server before new - updates are blocked and flushes are forced. Defaults to 40% of heap. - Updates are blocked and flushes are forced until size of all memstores - in a region server hits hbase.regionserver.global.memstore.size.lower.limit. - - - hbase.regionserver.wal.codec RegionServer WAL Codec org.apache.hadoop.hbase.regionserver.wal.WALCellCodec
[2/2] ambari git commit: AMBARI-12053 - 2.1 repo url in Ambari is broken - points to 2.3 stack instead
AMBARI-12053 - 2.1 repo url in Ambari is broken - points to 2.3 stack instead Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/533c8ee1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/533c8ee1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/533c8ee1 Branch: refs/heads/trunk Commit: 533c8ee11f02759ddfc8cf394676f49d041ceff2 Parents: f7492eb Author: Artem Baranchuk Authored: Sun Jun 21 02:03:10 2015 +0300 Committer: Artem Baranchuk Committed: Mon Jun 22 14:21:43 2015 +0300 -- .../src/main/resources/stacks/HDP/2.1/repos/repoinfo.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/533c8ee1/ambari-server/src/main/resources/stacks/HDP/2.1/repos/repoinfo.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/repos/repoinfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.1/repos/repoinfo.xml index a4d1bf7..2a48b34 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.1/repos/repoinfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.1/repos/repoinfo.xml @@ -19,7 +19,7 @@ http://public-repo-1.hortonworks.com/HDP/hdp_urlinfo.json - REPLACE_WITH_CENTOS6_URL + http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.1.10.0 HDP-2.1 HDP @@ -31,7 +31,7 @@ - REPLACE_WITH_SUSE11_URL + http://public-repo-1.hortonworks.com/HDP/suse11sp3/2.x/updates/2.1.10.0 HDP-2.1 HDP @@ -43,7 +43,7 @@ - REPLACE_WITH_UBUNTU12_URL + http://public-repo-1.hortonworks.com/HDP/ubuntu12/2.x/updates/2.1.10.0 HDP-2.1 HDP
[1/2] ambari git commit: AMBARI-11991 - Fixing of leak resources which potentially can reduce system performance and security (Dmytro Shkvyra via abaranchuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 ea634b8dd -> 2c3545189 http://git-wip-us.apache.org/repos/asf/ambari/blob/2c354518/ambari-shell/ambari-groovy-shell/src/main/java/org/apache/ambari/shell/customization/AmbariBanner.java -- diff --git a/ambari-shell/ambari-groovy-shell/src/main/java/org/apache/ambari/shell/customization/AmbariBanner.java b/ambari-shell/ambari-groovy-shell/src/main/java/org/apache/ambari/shell/customization/AmbariBanner.java index 850687e..ea0e39d 100644 --- a/ambari-shell/ambari-groovy-shell/src/main/java/org/apache/ambari/shell/customization/AmbariBanner.java +++ b/ambari-shell/ambari-groovy-shell/src/main/java/org/apache/ambari/shell/customization/AmbariBanner.java @@ -18,6 +18,9 @@ package org.apache.ambari.shell.customization; import java.io.IOException; +import java.io.InputStream; +import java.util.logging.Level; +import java.util.logging.Logger; import org.apache.commons.io.IOUtils; import org.springframework.shell.plugin.BannerProvider; @@ -36,11 +39,22 @@ public class AmbariBanner implements BannerProvider { @Override public String getBanner() { +String res = null; +InputStream is = null; try { - return IOUtils.toString(getClass().getResourceAsStream("/banner.txt")); + is = getClass().getResourceAsStream("/banner.txt"); + res = IOUtils.toString(is); } catch (IOException e) { - return "AmbariShell"; + res = "AmbariShell"; +} finally { + if (is != null) { +try { + is.close(); +} catch (IOException ex) { +} + } } +return res; } @Override http://git-wip-us.apache.org/repos/asf/ambari/blob/2c354518/ambari-shell/ambari-groovy-shell/src/main/java/org/apache/ambari/shell/flash/InstallProgress.java -- diff --git a/ambari-shell/ambari-groovy-shell/src/main/java/org/apache/ambari/shell/flash/InstallProgress.java b/ambari-shell/ambari-groovy-shell/src/main/java/org/apache/ambari/shell/flash/InstallProgress.java index dbf8e65..bad5b30 100644 --- a/ambari-shell/ambari-groovy-shell/src/main/java/org/apache/ambari/shell/flash/InstallProgress.java +++ b/ambari-shell/ambari-groovy-shell/src/main/java/org/apache/ambari/shell/flash/InstallProgress.java @@ -51,8 +51,8 @@ public class InstallProgress extends AbstractFlash { int intValue = decimal.intValue(); if (intValue != SUCCESS && intValue != FAILED) { sb.append("Installation: ").append(decimal).append("% "); - int rounded = round(progress.setScale(0, BigDecimal.ROUND_UP).intValue() / 10); - for (int i = 0; i < 10; i++) { + long rounded = round(progress.setScale(0, BigDecimal.ROUND_UP).floatValue() / 10); + for (long i = 0; i < 10; i++) { if (i < rounded) { sb.append("="); } else { @@ -71,7 +71,7 @@ public class InstallProgress extends AbstractFlash { } } else { if (exit) { -System.exit(0); +done = true; } } return sb.toString();
[2/2] ambari git commit: AMBARI-11991 - Fixing of leak resources which potentially can reduce system performance and security (Dmytro Shkvyra via abaranchuk)
AMBARI-11991 - Fixing of leak resources which potentially can reduce system performance and security (Dmytro Shkvyra via abaranchuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2c354518 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2c354518 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2c354518 Branch: refs/heads/branch-2.1 Commit: 2c35451896ef34cf8c9022e7bfd0cdb15af20948 Parents: ea634b8 Author: Artem Baranchuk Authored: Fri Jun 19 16:33:21 2015 +0300 Committer: Artem Baranchuk Committed: Fri Jun 19 16:33:21 2015 +0300 -- .../metrics/timeline/PhoenixHBaseAccessor.java | 18 +- .../timeline/query/PhoenixTransactSQL.java | 153 + .../ambari/eventdb/db/PostgresConnector.java| 12 +- .../ambari/server/agent/HeartBeatHandler.java | 7 +- .../server/api/services/AmbariMetaInfo.java | 4 +- .../api/services/serializers/CsvSerializer.java | 23 +- .../gsinstaller/ClusterDefinition.java | 10 +- .../controller/internal/URLStreamProvider.java | 13 +- .../controller/jdbc/JDBCResourceProvider.java | 154 + .../metrics/RestMetricsPropertyProvider.java| 9 +- .../ambari/server/orm/DBAccessorImpl.java | 337 +++ .../ambari/server/orm/entities/ViewEntity.java | 1 + .../ambari/server/orm/helpers/ScriptRunner.java | 14 +- .../encryption/CredentialStoreServiceImpl.java | 9 +- .../server/upgrade/UpgradeCatalog170.java | 86 +++-- .../ambari/server/view/ViewArchiveUtility.java | 30 +- .../apache/ambari/server/view/ViewRegistry.java | 4 +- .../encryption/CredentialStoreServiceTest.java | 1 - .../ambari/server/view/ViewRegistryTest.java| 14 +- .../org/apache/ambari/shell/AmbariShell.java| 1 - .../shell/commands/BlueprintCommands.java | 11 +- .../ambari/shell/commands/ElephantCommand.java | 13 +- .../shell/customization/AmbariBanner.java | 18 +- .../ambari/shell/flash/InstallProgress.java | 6 +- 24 files changed, 585 insertions(+), 363 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2c354518/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java -- diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java index 8e5d101..d018f29 100644 --- a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java +++ b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java @@ -396,7 +396,7 @@ public class PhoenixHBaseAccessor { try { //get latest if(condition.isPointInTime()){ -stmt = getLatestMetricRecords(condition, conn, metrics); +getLatestMetricRecords(condition, conn, metrics); } else { stmt = PhoenixTransactSQL.prepareGetMetricsSqlStmt(conn, condition); rs = stmt.executeQuery(); @@ -465,7 +465,7 @@ public class PhoenixHBaseAccessor { } } - private PreparedStatement getLatestMetricRecords( + private void getLatestMetricRecords( Condition condition, Connection conn, TimelineMetrics metrics) throws SQLException, IOException { @@ -490,9 +490,10 @@ public class PhoenixHBaseAccessor { // Ignore } } + if (stmt != null) { +stmt.close(); + } } - -return stmt; } /** @@ -515,7 +516,7 @@ public class PhoenixHBaseAccessor { try { //get latest if(condition.isPointInTime()) { -stmt = getLatestAggregateMetricRecords(condition, conn, metrics, metricFunctions); +getLatestAggregateMetricRecords(condition, conn, metrics, metricFunctions); } else { stmt = PhoenixTransactSQL.prepareGetAggregateSqlStmt(conn, condition); @@ -577,7 +578,7 @@ public class PhoenixHBaseAccessor { } } - private PreparedStatement getLatestAggregateMetricRecords(Condition condition, + private void getLatestAggregateMetricRecords(Condition condition, Connection conn, TimelineMetrics metrics, Map> metricFunctions) throws SQLException { @@ -619,10 +620,11 @@ public class PhoenixHBaseAccessor { // Ignore } } +if (stmt != null) { + stmt.cl
[1/2] ambari git commit: AMBARI-11991 - Fixing of leak resources which potentially can reduce system performance and security (Dmytro Shkvyra via abaranchuk)
Repository: ambari Updated Branches: refs/heads/trunk a59c66c67 -> 8a2cb5b35 http://git-wip-us.apache.org/repos/asf/ambari/blob/8a2cb5b3/ambari-shell/ambari-groovy-shell/src/main/java/org/apache/ambari/shell/customization/AmbariBanner.java -- diff --git a/ambari-shell/ambari-groovy-shell/src/main/java/org/apache/ambari/shell/customization/AmbariBanner.java b/ambari-shell/ambari-groovy-shell/src/main/java/org/apache/ambari/shell/customization/AmbariBanner.java index 850687e..ea0e39d 100644 --- a/ambari-shell/ambari-groovy-shell/src/main/java/org/apache/ambari/shell/customization/AmbariBanner.java +++ b/ambari-shell/ambari-groovy-shell/src/main/java/org/apache/ambari/shell/customization/AmbariBanner.java @@ -18,6 +18,9 @@ package org.apache.ambari.shell.customization; import java.io.IOException; +import java.io.InputStream; +import java.util.logging.Level; +import java.util.logging.Logger; import org.apache.commons.io.IOUtils; import org.springframework.shell.plugin.BannerProvider; @@ -36,11 +39,22 @@ public class AmbariBanner implements BannerProvider { @Override public String getBanner() { +String res = null; +InputStream is = null; try { - return IOUtils.toString(getClass().getResourceAsStream("/banner.txt")); + is = getClass().getResourceAsStream("/banner.txt"); + res = IOUtils.toString(is); } catch (IOException e) { - return "AmbariShell"; + res = "AmbariShell"; +} finally { + if (is != null) { +try { + is.close(); +} catch (IOException ex) { +} + } } +return res; } @Override http://git-wip-us.apache.org/repos/asf/ambari/blob/8a2cb5b3/ambari-shell/ambari-groovy-shell/src/main/java/org/apache/ambari/shell/flash/InstallProgress.java -- diff --git a/ambari-shell/ambari-groovy-shell/src/main/java/org/apache/ambari/shell/flash/InstallProgress.java b/ambari-shell/ambari-groovy-shell/src/main/java/org/apache/ambari/shell/flash/InstallProgress.java index dbf8e65..bad5b30 100644 --- a/ambari-shell/ambari-groovy-shell/src/main/java/org/apache/ambari/shell/flash/InstallProgress.java +++ b/ambari-shell/ambari-groovy-shell/src/main/java/org/apache/ambari/shell/flash/InstallProgress.java @@ -51,8 +51,8 @@ public class InstallProgress extends AbstractFlash { int intValue = decimal.intValue(); if (intValue != SUCCESS && intValue != FAILED) { sb.append("Installation: ").append(decimal).append("% "); - int rounded = round(progress.setScale(0, BigDecimal.ROUND_UP).intValue() / 10); - for (int i = 0; i < 10; i++) { + long rounded = round(progress.setScale(0, BigDecimal.ROUND_UP).floatValue() / 10); + for (long i = 0; i < 10; i++) { if (i < rounded) { sb.append("="); } else { @@ -71,7 +71,7 @@ public class InstallProgress extends AbstractFlash { } } else { if (exit) { -System.exit(0); +done = true; } } return sb.toString();
[2/2] ambari git commit: AMBARI-11991 - Fixing of leak resources which potentially can reduce system performance and security (Dmytro Shkvyra via abaranchuk)
AMBARI-11991 - Fixing of leak resources which potentially can reduce system performance and security (Dmytro Shkvyra via abaranchuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8a2cb5b3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8a2cb5b3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8a2cb5b3 Branch: refs/heads/trunk Commit: 8a2cb5b35a6c9b7a98185e96808551123e7fc647 Parents: a59c66c Author: Artem Baranchuk Authored: Fri Jun 19 16:32:03 2015 +0300 Committer: Artem Baranchuk Committed: Fri Jun 19 16:32:03 2015 +0300 -- .../metrics/timeline/PhoenixHBaseAccessor.java | 18 +- .../timeline/query/PhoenixTransactSQL.java | 153 + .../ambari/eventdb/db/PostgresConnector.java| 12 +- .../ambari/server/agent/HeartBeatHandler.java | 7 +- .../server/api/services/AmbariMetaInfo.java | 4 +- .../api/services/serializers/CsvSerializer.java | 23 +- .../gsinstaller/ClusterDefinition.java | 10 +- .../controller/internal/URLStreamProvider.java | 13 +- .../controller/jdbc/JDBCResourceProvider.java | 154 + .../metrics/RestMetricsPropertyProvider.java| 9 +- .../ambari/server/orm/DBAccessorImpl.java | 337 +++ .../ambari/server/orm/entities/ViewEntity.java | 1 + .../ambari/server/orm/helpers/ScriptRunner.java | 14 +- .../encryption/CredentialStoreServiceImpl.java | 9 +- .../server/upgrade/UpgradeCatalog170.java | 86 +++-- .../ambari/server/view/ViewArchiveUtility.java | 30 +- .../apache/ambari/server/view/ViewRegistry.java | 4 +- .../encryption/CredentialStoreServiceTest.java | 1 - .../ambari/server/view/ViewRegistryTest.java| 14 +- .../org/apache/ambari/shell/AmbariShell.java| 1 - .../shell/commands/BlueprintCommands.java | 11 +- .../ambari/shell/commands/ElephantCommand.java | 13 +- .../shell/customization/AmbariBanner.java | 18 +- .../ambari/shell/flash/InstallProgress.java | 6 +- 24 files changed, 585 insertions(+), 363 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8a2cb5b3/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java -- diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java index 8e5d101..d018f29 100644 --- a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java +++ b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java @@ -396,7 +396,7 @@ public class PhoenixHBaseAccessor { try { //get latest if(condition.isPointInTime()){ -stmt = getLatestMetricRecords(condition, conn, metrics); +getLatestMetricRecords(condition, conn, metrics); } else { stmt = PhoenixTransactSQL.prepareGetMetricsSqlStmt(conn, condition); rs = stmt.executeQuery(); @@ -465,7 +465,7 @@ public class PhoenixHBaseAccessor { } } - private PreparedStatement getLatestMetricRecords( + private void getLatestMetricRecords( Condition condition, Connection conn, TimelineMetrics metrics) throws SQLException, IOException { @@ -490,9 +490,10 @@ public class PhoenixHBaseAccessor { // Ignore } } + if (stmt != null) { +stmt.close(); + } } - -return stmt; } /** @@ -515,7 +516,7 @@ public class PhoenixHBaseAccessor { try { //get latest if(condition.isPointInTime()) { -stmt = getLatestAggregateMetricRecords(condition, conn, metrics, metricFunctions); +getLatestAggregateMetricRecords(condition, conn, metrics, metricFunctions); } else { stmt = PhoenixTransactSQL.prepareGetAggregateSqlStmt(conn, condition); @@ -577,7 +578,7 @@ public class PhoenixHBaseAccessor { } } - private PreparedStatement getLatestAggregateMetricRecords(Condition condition, + private void getLatestAggregateMetricRecords(Condition condition, Connection conn, TimelineMetrics metrics, Map> metricFunctions) throws SQLException { @@ -619,10 +620,11 @@ public class PhoenixHBaseAccessor { // Ignore } } +if (stmt != null) { + stmt.cl
ambari git commit: AMBARI-12008 - NIMBUS / DRPC_SERVER become stopped after few minutes after ambari only upgrade from 1.7.0 to 2.1.0 ( Ivan Kozlov via abaranchuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 e94e8a27c -> ea634b8dd AMBARI-12008 - NIMBUS / DRPC_SERVER become stopped after few minutes after ambari only upgrade from 1.7.0 to 2.1.0 ( Ivan Kozlov via abaranchuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ea634b8d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ea634b8d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ea634b8d Branch: refs/heads/branch-2.1 Commit: ea634b8dd799f07d08fa1aeed565532e53eea1f8 Parents: e94e8a2 Author: Artem Baranchuk Authored: Fri Jun 19 13:44:32 2015 +0300 Committer: Artem Baranchuk Committed: Fri Jun 19 13:44:32 2015 +0300 -- .../server/upgrade/UpgradeCatalog210.java | 26 .../server/upgrade/UpgradeCatalog210Test.java | 44 +++- 2 files changed, 69 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ea634b8d/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java index fdb9adb..69bfd09 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java @@ -1129,6 +1129,7 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog { protected void addMissingConfigs() throws AmbariException { updateHiveConfigs(); updateHdfsConfigs(); +updateStormConfigs(); } protected void updateHdfsConfigs() throws AmbariException { @@ -1212,6 +1213,31 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog { } } + protected void updateStormConfigs() throws AmbariException { +AmbariManagementController ambariManagementController = injector.getInstance( +AmbariManagementController.class); +Clusters clusters = ambariManagementController.getClusters(); + +if (clusters != null) { + Map clusterMap = clusters.getClusters(); + + if (clusterMap != null && !clusterMap.isEmpty()) { +for (final Cluster cluster : clusterMap.values()) { + //if cluster is secured we should set additional properties + if(cluster.getDesiredConfigByType("cluster-env") != null + && cluster.getDesiredConfigByType("cluster-env").getProperties().get("security_enabled").equals("true") + && cluster.getDesiredConfigByType("storm-site") != null ) { +Map newStormProps = new HashMap(); +if (!cluster.getDesiredConfigByType("storm-site").getProperties().containsKey("java.security.auth.login.config")) { + newStormProps.put("java.security.auth.login.config", "{{conf_dir}}/storm_jaas.conf"); +} +updateConfigurationPropertiesForCluster(cluster, "storm-site", newStormProps, false, true); + } +} + } +} + } + /** * Adds non NULL constraints and drops outdated columns no longer needed after * the column data migration. http://git-wip-us.apache.org/repos/asf/ambari/blob/ea634b8d/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog210Test.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog210Test.java b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog210Test.java index 0515035..95d5f7f 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog210Test.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog210Test.java @@ -252,6 +252,48 @@ public class UpgradeCatalog210Test { } @Test + public void testUpdateStormConfiguration() throws Exception { +EasyMockSupport easyMockSupport = new EasyMockSupport(); +final AmbariManagementController mockAmbariManagementController = easyMockSupport.createNiceMock(AmbariManagementController.class); +final ConfigHelper mockConfigHelper = easyMockSupport.createMock(ConfigHelper.class); + +final Clusters mockClusters = easyMockSupport.createStrictMock(Clusters.class); +final Cluster mockClusterExpected = easyMockSupport.createNiceMock(Cluster.class); + +final Config mockClusterEnv = easyMockSupport.createNiceMock(Config.class); +final Config mockStormSite = easyMockSupport.createNiceMock(Config.class);
ambari git commit: AMBARI-12008 - NIMBUS / DRPC_SERVER become stopped after few minutes after ambari only upgrade from 1.7.0 to 2.1.0 ( Ivan Kozlov via abaranchuk)
Repository: ambari Updated Branches: refs/heads/trunk 80a7c5472 -> a59c66c67 AMBARI-12008 - NIMBUS / DRPC_SERVER become stopped after few minutes after ambari only upgrade from 1.7.0 to 2.1.0 ( Ivan Kozlov via abaranchuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a59c66c6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a59c66c6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a59c66c6 Branch: refs/heads/trunk Commit: a59c66c67b0544f594f48b13a964b90608060a17 Parents: 80a7c54 Author: Artem Baranchuk Authored: Fri Jun 19 13:42:59 2015 +0300 Committer: Artem Baranchuk Committed: Fri Jun 19 13:42:59 2015 +0300 -- .../server/upgrade/UpgradeCatalog210.java | 26 .../server/upgrade/UpgradeCatalog210Test.java | 44 +++- 2 files changed, 69 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a59c66c6/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java index fdb9adb..69bfd09 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java @@ -1129,6 +1129,7 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog { protected void addMissingConfigs() throws AmbariException { updateHiveConfigs(); updateHdfsConfigs(); +updateStormConfigs(); } protected void updateHdfsConfigs() throws AmbariException { @@ -1212,6 +1213,31 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog { } } + protected void updateStormConfigs() throws AmbariException { +AmbariManagementController ambariManagementController = injector.getInstance( +AmbariManagementController.class); +Clusters clusters = ambariManagementController.getClusters(); + +if (clusters != null) { + Map clusterMap = clusters.getClusters(); + + if (clusterMap != null && !clusterMap.isEmpty()) { +for (final Cluster cluster : clusterMap.values()) { + //if cluster is secured we should set additional properties + if(cluster.getDesiredConfigByType("cluster-env") != null + && cluster.getDesiredConfigByType("cluster-env").getProperties().get("security_enabled").equals("true") + && cluster.getDesiredConfigByType("storm-site") != null ) { +Map newStormProps = new HashMap(); +if (!cluster.getDesiredConfigByType("storm-site").getProperties().containsKey("java.security.auth.login.config")) { + newStormProps.put("java.security.auth.login.config", "{{conf_dir}}/storm_jaas.conf"); +} +updateConfigurationPropertiesForCluster(cluster, "storm-site", newStormProps, false, true); + } +} + } +} + } + /** * Adds non NULL constraints and drops outdated columns no longer needed after * the column data migration. http://git-wip-us.apache.org/repos/asf/ambari/blob/a59c66c6/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog210Test.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog210Test.java b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog210Test.java index 0515035..95d5f7f 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog210Test.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog210Test.java @@ -252,6 +252,48 @@ public class UpgradeCatalog210Test { } @Test + public void testUpdateStormConfiguration() throws Exception { +EasyMockSupport easyMockSupport = new EasyMockSupport(); +final AmbariManagementController mockAmbariManagementController = easyMockSupport.createNiceMock(AmbariManagementController.class); +final ConfigHelper mockConfigHelper = easyMockSupport.createMock(ConfigHelper.class); + +final Clusters mockClusters = easyMockSupport.createStrictMock(Clusters.class); +final Cluster mockClusterExpected = easyMockSupport.createNiceMock(Cluster.class); + +final Config mockClusterEnv = easyMockSupport.createNiceMock(Config.class); +final Config mockStormSite = easyMockSupport.createNiceMock(Config.class); + +final M
[1/2] ambari git commit: AMBARI-6690 - Hosts emit : Host Role Invalid State
Repository: ambari Updated Branches: refs/heads/branch-2.1 b7d74258f -> 2eaac094c AMBARI-6690 - Hosts emit : Host Role Invalid State Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/277b9311 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/277b9311 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/277b9311 Branch: refs/heads/branch-2.1 Commit: 277b93114ad592c905a7149b85bfa76dfdd90902 Parents: b7d7425 Author: Artem Baranchuk Authored: Wed Jun 17 01:37:25 2015 +0300 Committer: Artem Baranchuk Committed: Wed Jun 17 01:37:25 2015 +0300 -- .../server/actionmanager/ActionDBAccessor.java | 2 +- .../actionmanager/ActionDBAccessorImpl.java | 13 .../server/actionmanager/ActionScheduler.java | 11 +++ .../org/apache/ambari/server/state/Cluster.java | 4 +-- .../server/state/cluster/ClusterImpl.java | 32 +++- 5 files changed, 33 insertions(+), 29 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/277b9311/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java index 907c90a..873261f 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java @@ -144,7 +144,7 @@ public interface ActionDBAccessor { /** * Bulk abort commands */ - void bulkAbortHostRole(Stage s, List commands); + void bulkAbortHostRole(Stage s, Map commands); /** * Updates scheduled stage. http://git-wip-us.apache.org/repos/asf/ambari/blob/277b9311/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java index 959ed2d..51b2f09 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java @@ -458,13 +458,12 @@ public class ActionDBAccessorImpl implements ActionDBAccessor { @Override public void abortHostRole(String host, long requestId, long stageId, String role) { -String reason = "Host Role in invalid state"; +String reason = String.format("On host %s role %s in invalid state.", host, role); abortHostRole(host, requestId, stageId, role, reason); } @Override - public void abortHostRole(String host, long requestId, long stageId, -String role, String reason) { + public void abortHostRole(String host, long requestId, long stageId, String role, String reason) { CommandReport report = new CommandReport(); report.setExitCode(999); report.setStdErr(reason); @@ -489,9 +488,11 @@ public class ActionDBAccessorImpl implements ActionDBAccessor { @Override @Transactional - public void bulkAbortHostRole(Stage s, List commands) { -for (ExecutionCommand command : commands) { - abortHostRole(command.getHostname(), s.getRequestId(), s.getStageId(), command.getRole()); + public void bulkAbortHostRole(Stage s, Map commands) { +for (ExecutionCommand command : commands.keySet()) { + String reason = String.format("On host %s role %s in invalid state.\n%s", + command.getHostname(), command.getRole(), commands.get(command)); + abortHostRole(command.getHostname(), s.getRequestId(), s.getStageId(), command.getRole(), reason); } } http://git-wip-us.apache.org/repos/asf/ambari/blob/277b9311/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java index 8ccf622..562a5ca 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java @@ -335,13 +335,12 @@ class ActionScheduler implements Runnable { //Multimap is analog of Map> but allows to avoid nested loop ListMultimap eventMap = formEventMap(stage, commandsToSt
[2/2] ambari git commit: AMBARI-11965 - Fix high impact Outstanding Security Risks (Dmytro Shkvyra via abaranchuk)
AMBARI-11965 - Fix high impact Outstanding Security Risks (Dmytro Shkvyra via abaranchuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2eaac094 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2eaac094 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2eaac094 Branch: refs/heads/branch-2.1 Commit: 2eaac094c4331e815a40a7bd13ef5bfed4f837c1 Parents: 277b931 Author: Artem Baranchuk Authored: Wed Jun 17 01:38:27 2015 +0300 Committer: Artem Baranchuk Committed: Wed Jun 17 01:38:27 2015 +0300 -- .../metrics/timeline/PhoenixHBaseAccessor.java | 18 +- .../ambari/eventdb/db/PostgresConnector.java| 12 +- .../ambari/server/agent/HeartBeatHandler.java | 7 +- .../server/api/services/AmbariMetaInfo.java | 4 +- .../api/services/serializers/CsvSerializer.java | 23 +- .../gsinstaller/ClusterDefinition.java | 10 +- .../controller/jdbc/JDBCResourceProvider.java | 10 +- .../metrics/RestMetricsPropertyProvider.java| 9 +- .../ambari/server/orm/DBAccessorImpl.java | 337 +++ .../ambari/server/orm/entities/ViewEntity.java | 1 + .../encryption/CredentialStoreServiceImpl.java | 9 +- .../apache/ambari/server/view/ViewRegistry.java | 33 +- .../ambari/server/orm/DBAccessorImplTest.java | 1 - .../encryption/CredentialStoreServiceTest.java | 1 - .../ambari/server/view/ViewRegistryTest.java| 14 +- .../shell/commands/BlueprintCommands.java | 13 +- 16 files changed, 319 insertions(+), 183 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2eaac094/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java -- diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java index 8e5d101..d018f29 100644 --- a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java +++ b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java @@ -396,7 +396,7 @@ public class PhoenixHBaseAccessor { try { //get latest if(condition.isPointInTime()){ -stmt = getLatestMetricRecords(condition, conn, metrics); +getLatestMetricRecords(condition, conn, metrics); } else { stmt = PhoenixTransactSQL.prepareGetMetricsSqlStmt(conn, condition); rs = stmt.executeQuery(); @@ -465,7 +465,7 @@ public class PhoenixHBaseAccessor { } } - private PreparedStatement getLatestMetricRecords( + private void getLatestMetricRecords( Condition condition, Connection conn, TimelineMetrics metrics) throws SQLException, IOException { @@ -490,9 +490,10 @@ public class PhoenixHBaseAccessor { // Ignore } } + if (stmt != null) { +stmt.close(); + } } - -return stmt; } /** @@ -515,7 +516,7 @@ public class PhoenixHBaseAccessor { try { //get latest if(condition.isPointInTime()) { -stmt = getLatestAggregateMetricRecords(condition, conn, metrics, metricFunctions); +getLatestAggregateMetricRecords(condition, conn, metrics, metricFunctions); } else { stmt = PhoenixTransactSQL.prepareGetAggregateSqlStmt(conn, condition); @@ -577,7 +578,7 @@ public class PhoenixHBaseAccessor { } } - private PreparedStatement getLatestAggregateMetricRecords(Condition condition, + private void getLatestAggregateMetricRecords(Condition condition, Connection conn, TimelineMetrics metrics, Map> metricFunctions) throws SQLException { @@ -619,10 +620,11 @@ public class PhoenixHBaseAccessor { // Ignore } } +if (stmt != null) { + stmt.close(); +} } } - -return stmt; } private SingleValuedTimelineMetric getAggregateTimelineMetricFromResultSet(ResultSet rs, http://git-wip-us.apache.org/repos/asf/ambari/blob/2eaac094/ambari-server/src/main/java/org/apache/ambari/eventdb/db/PostgresConnector.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/eventdb/db/PostgresConnector.java b/ambari-server/src/main/java/org/apache/ambari/eventdb/db/PostgresConnector.j
[2/2] ambari git commit: AMBARI-6690 - Hosts emit : Host Role Invalid State
AMBARI-6690 - Hosts emit : Host Role Invalid State Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/48f785c2 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/48f785c2 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/48f785c2 Branch: refs/heads/trunk Commit: 48f785c23120d1893274e9fc3ba142bd86a63329 Parents: 9a5edfd Author: Artem Baranchuk Authored: Tue Jun 16 02:00:45 2015 +0300 Committer: Artem Baranchuk Committed: Wed Jun 17 01:32:26 2015 +0300 -- .../server/actionmanager/ActionDBAccessor.java | 2 +- .../actionmanager/ActionDBAccessorImpl.java | 13 .../server/actionmanager/ActionScheduler.java | 11 +++ .../org/apache/ambari/server/state/Cluster.java | 4 +-- .../server/state/cluster/ClusterImpl.java | 32 +++- 5 files changed, 33 insertions(+), 29 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/48f785c2/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java index 907c90a..873261f 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java @@ -144,7 +144,7 @@ public interface ActionDBAccessor { /** * Bulk abort commands */ - void bulkAbortHostRole(Stage s, List commands); + void bulkAbortHostRole(Stage s, Map commands); /** * Updates scheduled stage. http://git-wip-us.apache.org/repos/asf/ambari/blob/48f785c2/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java index 959ed2d..51b2f09 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java @@ -458,13 +458,12 @@ public class ActionDBAccessorImpl implements ActionDBAccessor { @Override public void abortHostRole(String host, long requestId, long stageId, String role) { -String reason = "Host Role in invalid state"; +String reason = String.format("On host %s role %s in invalid state.", host, role); abortHostRole(host, requestId, stageId, role, reason); } @Override - public void abortHostRole(String host, long requestId, long stageId, -String role, String reason) { + public void abortHostRole(String host, long requestId, long stageId, String role, String reason) { CommandReport report = new CommandReport(); report.setExitCode(999); report.setStdErr(reason); @@ -489,9 +488,11 @@ public class ActionDBAccessorImpl implements ActionDBAccessor { @Override @Transactional - public void bulkAbortHostRole(Stage s, List commands) { -for (ExecutionCommand command : commands) { - abortHostRole(command.getHostname(), s.getRequestId(), s.getStageId(), command.getRole()); + public void bulkAbortHostRole(Stage s, Map commands) { +for (ExecutionCommand command : commands.keySet()) { + String reason = String.format("On host %s role %s in invalid state.\n%s", + command.getHostname(), command.getRole(), commands.get(command)); + abortHostRole(command.getHostname(), s.getRequestId(), s.getStageId(), command.getRole(), reason); } } http://git-wip-us.apache.org/repos/asf/ambari/blob/48f785c2/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java index 8ccf622..562a5ca 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java @@ -335,13 +335,12 @@ class ActionScheduler implements Runnable { //Multimap is analog of Map> but allows to avoid nested loop ListMultimap eventMap = formEventMap(stage, commandsToStart); -List commandsToAbort = new ArrayList(); +Map commandsToAbort = new
[1/2] ambari git commit: AMBARI-11965 - Fix high impact Outstanding Security Risks (Dmytro Shkvyra via abaranchuk)
Repository: ambari Updated Branches: refs/heads/trunk 9a5edfdea -> 94c091e28 AMBARI-11965 - Fix high impact Outstanding Security Risks (Dmytro Shkvyra via abaranchuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/94c091e2 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/94c091e2 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/94c091e2 Branch: refs/heads/trunk Commit: 94c091e280a99e07db5f3910873e70aa3c18394f Parents: 48f785c Author: Artem Baranchuk Authored: Wed Jun 17 01:32:09 2015 +0300 Committer: Artem Baranchuk Committed: Wed Jun 17 01:32:26 2015 +0300 -- .../metrics/timeline/PhoenixHBaseAccessor.java | 18 +- .../ambari/eventdb/db/PostgresConnector.java| 12 +- .../ambari/server/agent/HeartBeatHandler.java | 7 +- .../server/api/services/AmbariMetaInfo.java | 4 +- .../api/services/serializers/CsvSerializer.java | 23 +- .../gsinstaller/ClusterDefinition.java | 10 +- .../controller/jdbc/JDBCResourceProvider.java | 10 +- .../metrics/RestMetricsPropertyProvider.java| 9 +- .../ambari/server/orm/DBAccessorImpl.java | 337 +++ .../ambari/server/orm/entities/ViewEntity.java | 1 + .../encryption/CredentialStoreServiceImpl.java | 9 +- .../apache/ambari/server/view/ViewRegistry.java | 33 +- .../ambari/server/orm/DBAccessorImplTest.java | 1 - .../encryption/CredentialStoreServiceTest.java | 1 - .../ambari/server/view/ViewRegistryTest.java| 14 +- .../shell/commands/BlueprintCommands.java | 13 +- 16 files changed, 319 insertions(+), 183 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/94c091e2/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java -- diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java index 8e5d101..d018f29 100644 --- a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java +++ b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java @@ -396,7 +396,7 @@ public class PhoenixHBaseAccessor { try { //get latest if(condition.isPointInTime()){ -stmt = getLatestMetricRecords(condition, conn, metrics); +getLatestMetricRecords(condition, conn, metrics); } else { stmt = PhoenixTransactSQL.prepareGetMetricsSqlStmt(conn, condition); rs = stmt.executeQuery(); @@ -465,7 +465,7 @@ public class PhoenixHBaseAccessor { } } - private PreparedStatement getLatestMetricRecords( + private void getLatestMetricRecords( Condition condition, Connection conn, TimelineMetrics metrics) throws SQLException, IOException { @@ -490,9 +490,10 @@ public class PhoenixHBaseAccessor { // Ignore } } + if (stmt != null) { +stmt.close(); + } } - -return stmt; } /** @@ -515,7 +516,7 @@ public class PhoenixHBaseAccessor { try { //get latest if(condition.isPointInTime()) { -stmt = getLatestAggregateMetricRecords(condition, conn, metrics, metricFunctions); +getLatestAggregateMetricRecords(condition, conn, metrics, metricFunctions); } else { stmt = PhoenixTransactSQL.prepareGetAggregateSqlStmt(conn, condition); @@ -577,7 +578,7 @@ public class PhoenixHBaseAccessor { } } - private PreparedStatement getLatestAggregateMetricRecords(Condition condition, + private void getLatestAggregateMetricRecords(Condition condition, Connection conn, TimelineMetrics metrics, Map> metricFunctions) throws SQLException { @@ -619,10 +620,11 @@ public class PhoenixHBaseAccessor { // Ignore } } +if (stmt != null) { + stmt.close(); +} } } - -return stmt; } private SingleValuedTimelineMetric getAggregateTimelineMetricFromResultSet(ResultSet rs, http://git-wip-us.apache.org/repos/asf/ambari/blob/94c091e2/ambari-server/src/main/java/org/apache/ambari/eventdb/db/PostgresConnector.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/eventdb/db/PostgresConnector.ja
ambari git commit: AMBARI-11883 - Unclear error message when HS2 doesn't come up
Repository: ambari Updated Branches: refs/heads/branch-2.1 16cd1d0f2 -> ccc2af97c AMBARI-11883 - Unclear error message when HS2 doesn't come up Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ccc2af97 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ccc2af97 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ccc2af97 Branch: refs/heads/branch-2.1 Commit: ccc2af97c33cfe3711b4a17109a160ad434217a2 Parents: 16cd1d0 Author: Artem Baranchuk Authored: Sat Jun 13 14:08:16 2015 +0300 Committer: Artem Baranchuk Committed: Sat Jun 13 14:08:54 2015 +0300 -- .../HIVE/0.12.0.2.0/package/scripts/service_check.py | 4 1 file changed, 4 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ccc2af97/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/service_check.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/service_check.py index 3fdf028..0c254be 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/service_check.py @@ -52,6 +52,10 @@ class HiveServiceCheckDefault(HiveServiceCheck): env.set_params(params) address_list = params.hive_server_hosts + +if not address_list: + raise Fail("Can not find any Hive Server host. Please check configuration.") + port = int(format("{hive_server_port}")) print "Test connectivity to hive server" if params.security_enabled:
ambari git commit: AMBARI-11883 - Unclear error message when HS2 doesn't come up
Repository: ambari Updated Branches: refs/heads/trunk 6e6042db2 -> 4c8b84d0f AMBARI-11883 - Unclear error message when HS2 doesn't come up Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4c8b84d0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4c8b84d0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4c8b84d0 Branch: refs/heads/trunk Commit: 4c8b84d0fc546e74198681ebbe745b497440b862 Parents: 6e6042d Author: Artem Baranchuk Authored: Fri Jun 12 16:48:42 2015 +0300 Committer: Artem Baranchuk Committed: Sat Jun 13 14:06:24 2015 +0300 -- .../HIVE/0.12.0.2.0/package/scripts/service_check.py | 4 1 file changed, 4 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4c8b84d0/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/service_check.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/service_check.py index 3fdf028..0c254be 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/service_check.py @@ -52,6 +52,10 @@ class HiveServiceCheckDefault(HiveServiceCheck): env.set_params(params) address_list = params.hive_server_hosts + +if not address_list: + raise Fail("Can not find any Hive Server host. Please check configuration.") + port = int(format("{hive_server_port}")) print "Test connectivity to hive server" if params.security_enabled:
ambari git commit: AMBARI-11881 - Hive service check fails with started Hive Server
Repository: ambari Updated Branches: refs/heads/branch-2.1 b1f4dbe08 -> 84c1d89e6 AMBARI-11881 - Hive service check fails with started Hive Server Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/84c1d89e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/84c1d89e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/84c1d89e Branch: refs/heads/branch-2.1 Commit: 84c1d89e616b58e661802ff3d9006a9b9092a2b8 Parents: b1f4dbe Author: Artem Baranchuk Authored: Fri Jun 12 17:50:03 2015 +0300 Committer: Artem Baranchuk Committed: Fri Jun 12 17:50:38 2015 +0300 -- .../HIVE/0.12.0.2.0/package/scripts/service_check.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/84c1d89e/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/service_check.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/service_check.py index 4876fb2..3fdf028 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/service_check.py @@ -83,7 +83,7 @@ class HiveServiceCheckDefault(HiveServiceCheck): time.sleep(5) i += 1 - if i == len(address_list)-1: + if i == len(address_list): i = 0 elapsed_time = time.time() - start_time
ambari git commit: AMBARI-11881 - Hive service check fails with started Hive Server
Repository: ambari Updated Branches: refs/heads/trunk 0624e8cd3 -> acecac370 AMBARI-11881 - Hive service check fails with started Hive Server Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/acecac37 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/acecac37 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/acecac37 Branch: refs/heads/trunk Commit: acecac3702b4b9ea9fb5dddae7364861b01bf43f Parents: 0624e8c Author: Artem Baranchuk Authored: Fri Jun 12 16:17:12 2015 +0300 Committer: Artem Baranchuk Committed: Fri Jun 12 16:27:52 2015 +0300 -- .../HIVE/0.12.0.2.0/package/scripts/service_check.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/acecac37/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/service_check.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/service_check.py index 4876fb2..3fdf028 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/service_check.py @@ -83,7 +83,7 @@ class HiveServiceCheckDefault(HiveServiceCheck): time.sleep(5) i += 1 - if i == len(address_list)-1: + if i == len(address_list): i = 0 elapsed_time = time.time() - start_time
ambari git commit: AMBARI-11809 - HDFS, YARN, MapReduce2, Hive versions are incorrect for 2.3 Stack
Repository: ambari Updated Branches: refs/heads/trunk 529ec1026 -> 37004be8d AMBARI-11809 - HDFS, YARN, MapReduce2, Hive versions are incorrect for 2.3 Stack Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/37004be8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/37004be8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/37004be8 Branch: refs/heads/trunk Commit: 37004be8d9f2e2d0460f3303c3fd61e02477d774 Parents: 529ec10 Author: Artem Baranchuk Authored: Tue Jun 9 15:10:06 2015 +0300 Committer: Artem Baranchuk Committed: Tue Jun 9 16:02:36 2015 +0300 -- .../src/main/resources/stacks/HDP/2.3/services/HDFS/metainfo.xml | 2 +- .../src/main/resources/stacks/HDP/2.3/services/HIVE/metainfo.xml | 2 +- .../src/main/resources/stacks/HDP/2.3/services/YARN/metainfo.xml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/37004be8/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/metainfo.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/metainfo.xml index 6f8abc8..b4fcb79 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/metainfo.xml @@ -20,7 +20,7 @@ HDFS - 2.7.0.2.3 + 2.7.1.2.3 http://git-wip-us.apache.org/repos/asf/ambari/blob/37004be8/ambari-server/src/main/resources/stacks/HDP/2.3/services/HIVE/metainfo.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HIVE/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HIVE/metainfo.xml index ab6a57d..9eb5efe 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HIVE/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HIVE/metainfo.xml @@ -20,7 +20,7 @@ HIVE - 0.15.0.2.3 + 1.2.0.2.3 http://git-wip-us.apache.org/repos/asf/ambari/blob/37004be8/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/metainfo.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/metainfo.xml index 40c9b3d..5a21200 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/metainfo.xml @@ -21,7 +21,7 @@ YARN - 2.7.0.2.3 + 2.7.1.2.3 @@ -54,7 +54,7 @@ MAPREDUCE2 - 2.7.0.2.3 + 2.7.1.2.3 redhat7,redhat6,suse11
ambari git commit: AMBARI-11599 - /usr/bin/ambari-server.py always returns RC 0
Repository: ambari Updated Branches: refs/heads/trunk 8b379e39e -> 692c3a8c4 AMBARI-11599 - /usr/bin/ambari-server.py always returns RC 0 Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/692c3a8c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/692c3a8c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/692c3a8c Branch: refs/heads/trunk Commit: 692c3a8c4c260dc8f9705e755efae0b6fe349bba Parents: 8b379e3 Author: Artem Baranchuk Authored: Tue Jun 2 01:10:13 2015 +0300 Committer: Artem Baranchuk Committed: Wed Jun 3 17:34:24 2015 +0300 -- ambari-server/sbin/ambari-server | 3 ++- ambari-server/src/main/python/ambari-server.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/692c3a8c/ambari-server/sbin/ambari-server -- diff --git a/ambari-server/sbin/ambari-server b/ambari-server/sbin/ambari-server index 7319ed5..1843cd6 100755 --- a/ambari-server/sbin/ambari-server +++ b/ambari-server/sbin/ambari-server @@ -77,6 +77,7 @@ if (( $numversion < 26 )); then fi echo "Using python " $PYTHON +ret=0 case "$1" in start) echo -e "Starting ambari-server" @@ -151,4 +152,4 @@ case "$1" in exit 1 esac -exit 0 +exit $? http://git-wip-us.apache.org/repos/asf/ambari/blob/692c3a8c/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 749a965..19b7138 100755 --- a/ambari-server/src/main/python/ambari-server.py +++ b/ambari-server/src/main/python/ambari-server.py @@ -224,7 +224,7 @@ def setup_security(args): try: actionDesc = actions[int(choice) - 1] except IndexError: -raise FatalException('Unknown option for setup-security command.') +raise FatalException(1, 'Unknown option for setup-security command.') action = actionDesc[1] action.execute()
ambari git commit: AMBARI-11550 - [WinTP2] AMS Metrics Collector service cannot start Embedded HBASE service under hadoop credentials
Repository: ambari Updated Branches: refs/heads/trunk 0603d0048 -> f3d49fade AMBARI-11550 - [WinTP2] AMS Metrics Collector service cannot start Embedded HBASE service under hadoop credentials Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f3d49fad Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f3d49fad Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f3d49fad Branch: refs/heads/trunk Commit: f3d49fade0106f3373a042a65d1808459d8499e7 Parents: 0603d00 Author: Artem Baranchuk Authored: Sat May 30 01:24:56 2015 +0300 Committer: Artem Baranchuk Committed: Sun May 31 22:55:36 2015 +0300 -- .../src/main/python/amc_service.py | 7 +++ .../0.1.0/package/scripts/ams_service.py | 1 + .../0.1.0/package/scripts/metrics_collector.py | 19 +-- 3 files changed, 17 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f3d49fad/ambari-metrics/ambari-metrics-timelineservice/src/main/python/amc_service.py -- diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/main/python/amc_service.py b/ambari-metrics/ambari-metrics-timelineservice/src/main/python/amc_service.py index d69c148..f616fd0 100644 --- a/ambari-metrics/ambari-metrics-timelineservice/src/main/python/amc_service.py +++ b/ambari-metrics/ambari-metrics-timelineservice/src/main/python/amc_service.py @@ -25,7 +25,7 @@ import sys from ambari_commons.ambari_service import AmbariService from ambari_commons.exceptions import FatalException from ambari_commons.os_utils import remove_file -from ambari_commons.os_windows import SvcStatusCallback, WinServiceController +from ambari_commons.os_windows import SvcStatusCallback, WinServiceController, SERVICE_STATUS_RUNNING from ambari_metrics_collector.serviceConfiguration import get_properties, get_value_from_properties, DEBUG_MODE_KEY, \ SUSPEND_START_MODE_KEY, PID_OUT_FILE, SERVER_OUT_FILE_KEY, SERVER_OUT_FILE, SERVICE_USERNAME_KEY, SERVICE_PASSWORD_KEY, \ DEFAULT_CONF_DIR, EMBEDDED_HBASE_MASTER_SERVICE @@ -166,7 +166,6 @@ def init_service_debug(options): def ensure_hdp_service_soft_dependencies(): - ret = WinServiceController.EnsureServiceIsStarted(EMBEDDED_HBASE_MASTER_SERVICE) - if ret != 0: -err = 'ERROR: Cannot start service "{0}". Error = {1}'.format(EMBEDDED_HBASE_MASTER_SERVICE, ret) + if SERVICE_STATUS_RUNNING != WinServiceController.QueryStatus(EMBEDDED_HBASE_MASTER_SERVICE): +err = 'ERROR: Service "{0}" was not started.'.format(EMBEDDED_HBASE_MASTER_SERVICE) raise FatalException(1, err) http://git-wip-us.apache.org/repos/asf/ambari/blob/f3d49fad/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams_service.py -- diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams_service.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams_service.py index 9252e19..d348c50 100644 --- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams_service.py +++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams_service.py @@ -27,6 +27,7 @@ from hbase_service import hbase_service def ams_service(name, action): import params if name == 'collector': +Service(params.ams_embedded_hbase_win_service_name, action=action) Service(params.ams_collector_win_service_name, action=action) elif name == 'monitor': Service(params.ams_monitor_win_service_name, action=action) http://git-wip-us.apache.org/repos/asf/ambari/blob/f3d49fad/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py -- diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py index 4e6413a..00e4123 100644 --- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py +++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py @@ -26,12 +26,12 @@ from ams import ams from ams_service import ams_service from hbase import hbase from status import check_service_status +from ambari_commons import OSConst +from ambari_commons.os_family_impl import OsFamilyImpl class AmsCollector(Script): def install(self, env): self.install_packages(env) -# self.configure(en
ambari git commit: AMBARI-11527 - Bulk restart operation does not work
Repository: ambari Updated Branches: refs/heads/trunk a48150ff2 -> 6cbddf478 AMBARI-11527 - Bulk restart operation does not work Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6cbddf47 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6cbddf47 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6cbddf47 Branch: refs/heads/trunk Commit: 6cbddf478a6d05e5ccabd1a3b756f09cfb1eeb81 Parents: a48150f Author: Artem Baranchuk Authored: Fri May 29 13:44:24 2015 +0300 Committer: Artem Baranchuk Committed: Fri May 29 17:58:16 2015 +0300 -- ambari-web/app/utils/ajax/ajax.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6cbddf47/ambari-web/app/utils/ajax/ajax.js -- diff --git a/ambari-web/app/utils/ajax/ajax.js b/ambari-web/app/utils/ajax/ajax.js index b3f2b33..3ad9552 100644 --- a/ambari-web/app/utils/ajax/ajax.js +++ b/ambari-web/app/utils/ajax/ajax.js @@ -2325,7 +2325,8 @@ var urls = { 'host_components/HostRoles/state,host_components/HostRoles/maintenance_state,' + 'Hosts/total_mem,stack_versions/HostStackVersions,stack_versions/repository_versions/RepositoryVersions/repository_version,' + 'stack_versions/repository_versions/RepositoryVersions/id,' + -'host_components/HostRoles/stale_configs&minimal_response=true', +'host_components/HostRoles/stale_configs' + +'host_components/HostRoles/service_name&minimal_response=true', mock: '', format: function (data) { return {
ambari git commit: AMBARI-11480 - Do not use ranger related configs until Ranger is installed
Repository: ambari Updated Branches: refs/heads/trunk cf4df7e6e -> 869709914 AMBARI-11480 - Do not use ranger related configs until Ranger is installed Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/86970991 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/86970991 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/86970991 Branch: refs/heads/trunk Commit: 869709914977e5671cf7207dc5da18fe65bf2ad7 Parents: cf4df7e Author: Artem Baranchuk Authored: Thu May 28 13:31:04 2015 +0300 Committer: Artem Baranchuk Committed: Thu May 28 22:25:07 2015 +0300 -- .../0.96.0.2.0/package/scripts/params_linux.py | 3 +- .../0.12.0.2.0/package/scripts/params_linux.py | 5 +- .../2.1.0.2.0/package/scripts/params_linux.py | 135 ++- .../package/scripts/resourcemanager.py | 2 +- 4 files changed, 73 insertions(+), 72 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/86970991/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py index ca8ac34..ee95493 100644 --- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py @@ -226,8 +226,9 @@ policy_user = config['configurations']['ranger-hbase-plugin-properties']['policy #For curl command in ranger plugin to get db connector jdk_location = config['hostLevelParams']['jdk_location'] java_share_dir = '/usr/share/java' -enable_ranger_hbase = (config['configurations']['ranger-hbase-plugin-properties']['ranger-hbase-plugin-enabled'].lower() == 'yes') +enable_ranger_hbase = False if has_ranger_admin: + enable_ranger_hbase = (config['configurations']['ranger-hbase-plugin-properties']['ranger-hbase-plugin-enabled'].lower() == 'yes') xa_audit_db_password = unicode(config['configurations']['admin-properties']['audit_db_password']) repo_config_password = unicode(config['configurations']['ranger-hbase-plugin-properties']['REPOSITORY_CONFIG_PASSWORD']) xa_audit_db_flavor = (config['configurations']['admin-properties']['DB_FLAVOR']).lower() http://git-wip-us.apache.org/repos/asf/ambari/blob/86970991/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py index 3ee9dc4..6e12dd0 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py @@ -393,9 +393,7 @@ HdfsResource = functools.partial( # ranger host ranger_admin_hosts = default("/clusterHostInfo/ranger_admin_hosts", []) has_ranger_admin = not len(ranger_admin_hosts) == 0 -if Script.is_hdp_stack_greater_or_equal("2.2"): - enable_ranger_hive = (config['configurations']['ranger-hive-plugin-properties']['ranger-hive-plugin-enabled'].lower() == 'yes') -xml_configurations_supported = config['configurations']['ranger-env']['xml_configurations_supported'] +xml_configurations_supported = config['configurations']['ranger-env']['xml_configurations_supported'] #ranger hive properties policymgr_mgr_url = config['configurations']['admin-properties']['policymgr_external_url'] @@ -419,6 +417,7 @@ if security_enabled: #For curl command in ranger plugin to get db connector if has_ranger_admin: + enable_ranger_hive = (config['configurations']['ranger-hive-plugin-properties']['ranger-hive-plugin-enabled'].lower() == 'yes') repo_config_password = unicode(config['configurations']['ranger-hive-plugin-properties']['REPOSITORY_CONFIG_PASSWORD']) xa_audit_db_flavor = (config['configurations']['admin-properties']['DB_FLAVOR']).lower() http://git-wip-us.apache.org/repos/asf/ambari/blob/86970991/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py index 589f7b7..d801879 100644 --
[1/2] ambari git commit: AMBARI-11379 - [WinTP2] Stack Advisor reported an error during cluster deployment with AMS
Repository: ambari Updated Branches: refs/heads/trunk 64ce4989e -> 9efa8f9c8 AMBARI-11379 - [WinTP2] Stack Advisor reported an error during cluster deployment with AMS Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e7d2d3fe Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e7d2d3fe Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e7d2d3fe Branch: refs/heads/trunk Commit: e7d2d3fee327ffba771f17df9af0ed3d7aa55b22 Parents: 64ce498 Author: Artem Baranchuk Authored: Tue May 26 01:07:51 2015 +0300 Committer: Artem Baranchuk Committed: Wed May 27 14:55:09 2015 +0300 -- .../main/resources/stacks/HDPWIN/2.1/services/stack_advisor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e7d2d3fe/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/stack_advisor.py index 308ff96..0affe64 100644 --- a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/stack_advisor.py @@ -636,7 +636,7 @@ class HDPWIN21StackAdvisor(DefaultStackAdvisor): if dir.startswith("hdfs://"): return None #TODO following code fails for hdfs://, is this valid check for hdfs? -dir = re.sub("^file://", "", dir, count=1) +dir = re.sub("^file:/*", "", dir, count=1) mountPoints = {} for mountPoint in hostInfo["disk_info"]: mountPoints[mountPoint["mountpoint"]] = to_number(mountPoint["available"]) @@ -782,7 +782,7 @@ def getMountPointForDir(dir, mountPoints): # "/", "/hadoop/hdfs", and "/hadoop/hdfs/data". # So take the one with the greatest number of segments. for mountPoint in mountPoints: - if dir.startswith(mountPoint): + if dir.startswith(os.path.splitdrive(mountPoint)[0].lower()): if bestMountFound is None: bestMountFound = mountPoint elif bestMountFound.count(os.path.sep) < mountPoint.count(os.path.sep):
[2/2] ambari git commit: AMBARI-11397 - [WinTP2] SQL SERVER DROP DB script broken
AMBARI-11397 - [WinTP2] SQL SERVER DROP DB script broken Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9efa8f9c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9efa8f9c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9efa8f9c Branch: refs/heads/trunk Commit: 9efa8f9c879df5552519232fe970b12501603a9a Parents: e7d2d3f Author: Artem Baranchuk Authored: Tue May 26 23:43:26 2015 +0300 Committer: Artem Baranchuk Committed: Wed May 27 14:55:12 2015 +0300 -- .../resources/Ambari-DDL-SQLServer-DROP.sql | 246 +++ 1 file changed, 38 insertions(+), 208 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9efa8f9c/ambari-server/src/main/resources/Ambari-DDL-SQLServer-DROP.sql -- diff --git a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-DROP.sql b/ambari-server/src/main/resources/Ambari-DDL-SQLServer-DROP.sql index d57790c..6819a06 100644 --- a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-DROP.sql +++ b/ambari-server/src/main/resources/Ambari-DDL-SQLServer-DROP.sql @@ -27,211 +27,41 @@ sqlcmd -S localhost\SQLEXPRESS -i C:\app\ambari-server-1.3.0-SNAPSHOT\resources\ USE [$(AMBARIDBNAME)]; -IF OBJECT_ID ('trigger_task_delete','TR') IS NOT NULL DROP TRIGGER trigger_task_delete; -GO -IF OBJECT_ID ('trigger_job_delete','TR') IS NOT NULL DROP TRIGGER trigger_job_delete; -GO -IF OBJECT_ID ('trigger_workflow_delete','TR') IS NOT NULL DROP TRIGGER trigger_workflow_delete; -GO -IF OBJECT_ID('clusterEvent', 'U') IS NOT NULL DROP TABLE clusterEvent -GO -IF OBJECT_ID('mapreduceEvent', 'U') IS NOT NULL DROP TABLE mapreduceEvent -GO -IF OBJECT_ID('hdfsEvent', 'U') IS NOT NULL DROP TABLE hdfsEvent -GO -IF OBJECT_ID('taskAttempt', 'U') IS NOT NULL DROP TABLE taskAttempt -GO -IF OBJECT_ID('task', 'U') IS NOT NULL DROP TABLE task -GO -IF OBJECT_ID('job', 'U') IS NOT NULL DROP TABLE job -GO -IF OBJECT_ID('workflow', 'U') IS NOT NULL DROP TABLE workflow -GO -IF OBJECT_ID('qrtz_locks', 'U') IS NOT NULL DROP TABLE qrtz_locks -GO -IF OBJECT_ID('qrtz_scheduler_state', 'U') IS NOT NULL DROP TABLE qrtz_scheduler_state -GO -IF OBJECT_ID('qrtz_fired_triggers', 'U') IS NOT NULL DROP TABLE qrtz_fired_triggers -GO -IF OBJECT_ID('qrtz_paused_trigger_grps', 'U') IS NOT NULL DROP TABLE qrtz_paused_trigger_grps -GO -IF OBJECT_ID('qrtz_calendars', 'U') IS NOT NULL DROP TABLE qrtz_calendars -GO -IF OBJECT_ID('qrtz_blob_triggers', 'U') IS NOT NULL DROP TABLE qrtz_blob_triggers -GO -IF OBJECT_ID('qrtz_simprop_triggers', 'U') IS NOT NULL DROP TABLE qrtz_simprop_triggers -GO -IF OBJECT_ID('qrtz_cron_triggers', 'U') IS NOT NULL DROP TABLE qrtz_cron_triggers -GO -IF OBJECT_ID('qrtz_simple_triggers', 'U') IS NOT NULL DROP TABLE qrtz_simple_triggers -GO -IF OBJECT_ID('qrtz_triggers', 'U') IS NOT NULL DROP TABLE qrtz_triggers -GO -IF OBJECT_ID('qrtz_job_details', 'U') IS NOT NULL DROP TABLE qrtz_job_details -GO -IF OBJECT_ID('viewentity', 'U') IS NOT NULL DROP TABLE viewentity -GO -IF OBJECT_ID('viewresource', 'U') IS NOT NULL DROP TABLE viewresource -GO -IF OBJECT_ID('viewparameter', 'U') IS NOT NULL DROP TABLE viewparameter -GO -IF OBJECT_ID('viewinstanceproperty', 'U') IS NOT NULL DROP TABLE viewinstanceproperty -GO -IF OBJECT_ID('viewinstancedata', 'U') IS NOT NULL DROP TABLE viewinstancedata -GO -IF OBJECT_ID('viewinstance', 'U') IS NOT NULL DROP TABLE viewinstance -GO -IF OBJECT_ID('viewmain', 'U') IS NOT NULL DROP TABLE viewmain -GO -IF OBJECT_ID('hostgroup_configuration', 'U') IS NOT NULL DROP TABLE hostgroup_configuration -GO -IF OBJECT_ID('blueprint_configuration', 'U') IS NOT NULL DROP TABLE blueprint_configuration -GO -IF OBJECT_ID('hostgroup_component', 'U') IS NOT NULL DROP TABLE hostgroup_component -GO -IF OBJECT_ID('hostgroup', 'U') IS NOT NULL DROP TABLE hostgroup -GO -IF OBJECT_ID('blueprint', 'U') IS NOT NULL DROP TABLE blueprint -GO -IF OBJECT_ID('configgrouphostmapping', 'U') IS NOT NULL DROP TABLE configgrouphostmapping -GO -IF OBJECT_ID('confgroupclusterconfigmapping', 'U') IS NOT NULL DROP TABLE confgroupclusterconfigmapping -GO -IF OBJECT_ID('configgroup', 'U') IS NOT NULL DROP TABLE configgroup -GO -IF OBJECT_ID('kerberos_principal_host', 'U') IS NOT NULL DROP TABLE kerberos_principal_host -GO -IF OBJECT_ID('kerberos_principal', 'U') IS NOT NULL DROP TABLE kerberos_principal -GO -IF OBJECT_ID('ambari_sequences', 'U') IS NOT NULL DROP TABLE ambari_sequences -GO -IF OBJECT_ID('metainfo', 'U') IS NOT NULL DROP TABLE metainfo -GO -IF OBJECT_ID('hostconfigmapping', 'U') IS NOT NULL DROP TABLE hostconfigmapping -GO -IF OBJECT_ID('key_value_store', 'U') IS NOT NULL DROP TABLE key_value_store -GO -IF OBJECT_ID('user_roles', 'U') IS NOT NULL DROP TABLE user_roles -GO -IF OB
ambari git commit: AMBARI-11325 - [WinTP2] Metrics Collector Start reports failure but still succeeds
Repository: ambari Updated Branches: refs/heads/trunk de669dcaa -> e79cf4ee3 AMBARI-11325 - [WinTP2] Metrics Collector Start reports failure but still succeeds Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e79cf4ee Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e79cf4ee Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e79cf4ee Branch: refs/heads/trunk Commit: e79cf4ee3b22842fbdd2302616aa13c703075fd8 Parents: de669dc Author: Artem Baranchuk Authored: Fri May 22 00:03:11 2015 +0300 Committer: Artem Baranchuk Committed: Fri May 22 20:15:25 2015 +0300 -- ambari-agent/conf/windows/service_wrapper.py| 10 ++ .../main/python/ambari_commons/os_windows.py| 10 ++ .../core/providers/package/choco.py | 2 +- .../core/providers/windows/service.py | 8 ++-- .../AMBARI_METRICS/0.1.0/package/scripts/ams.py | 5 ++--- .../0.1.0/package/scripts/ams_service.py| 6 +++--- .../0.1.0/package/scripts/service_check.py | 5 ++--- .../0.1.0/package/scripts/service_mapping.py| 21 .../0.1.0/package/scripts/status.py | 6 +++--- 9 files changed, 29 insertions(+), 44 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e79cf4ee/ambari-agent/conf/windows/service_wrapper.py -- diff --git a/ambari-agent/conf/windows/service_wrapper.py b/ambari-agent/conf/windows/service_wrapper.py index 0851745..d031c34 100644 --- a/ambari-agent/conf/windows/service_wrapper.py +++ b/ambari-agent/conf/windows/service_wrapper.py @@ -139,8 +139,9 @@ def setup(options): # possibly run. # def svcstart(options): - if 0 != AmbariAgentService.Start(15): -options.exit_message = None + (ret, msg) = AmbariAgentService.Start(15) + if 0 != ret: +options.exit_message = msg pass @@ -148,8 +149,9 @@ def svcstart(options): # Stops the Ambari Agent. # def svcstop(options): - if 0 != AmbariAgentService.Stop(): -options.exit_message = None + (ret, msg) = AmbariAgentService.Stop() + if 0 != ret: +options.exit_message = msg # http://git-wip-us.apache.org/repos/asf/ambari/blob/e79cf4ee/ambari-common/src/main/python/ambari_commons/os_windows.py -- diff --git a/ambari-common/src/main/python/ambari_commons/os_windows.py b/ambari-common/src/main/python/ambari_commons/os_windows.py index 3df44af..5759444 100644 --- a/ambari-common/src/main/python/ambari_commons/os_windows.py +++ b/ambari-common/src/main/python/ambari_commons/os_windows.py @@ -510,18 +510,20 @@ class WinServiceController: @staticmethod def Start(serviceName, waitSecs=30): err = 0 +msg = '' try: win32serviceutil.StartService(serviceName) if waitSecs: win32serviceutil.WaitForServiceStatus(serviceName, win32service.SERVICE_RUNNING, waitSecs) except win32service.error, exc: - print "Error starting service: %s" % exc.strerror + msg = "Error starting service: %s" % exc.strerror err = exc.winerror -return err +return err, msg @staticmethod def Stop(serviceName, waitSecs=30): err = 0 +msg = '' try: if waitSecs: win32serviceutil.StopServiceWithDeps(serviceName, waitSecs=waitSecs) @@ -530,9 +532,9 @@ class WinServiceController: if waitSecs: win32serviceutil.WaitForServiceStatus(serviceName, win32service.SERVICE_STOPPED, waitSecs) except win32service.error, exc: - print "Error stopping service: %s (%d)" % (exc.strerror, exc.winerror) + msg = "Error stopping service: %s (%d)" % (exc.strerror, exc.winerror) err = exc.winerror -return err +return err, msg @staticmethod def QueryStatus(serviceName): http://git-wip-us.apache.org/repos/asf/ambari/blob/e79cf4ee/ambari-common/src/main/python/resource_management/core/providers/package/choco.py -- diff --git a/ambari-common/src/main/python/resource_management/core/providers/package/choco.py b/ambari-common/src/main/python/resource_management/core/providers/package/choco.py index 531372c..cd345fa 100644 --- a/ambari-common/src/main/python/resource_management/core/providers/package/choco.py +++ b/ambari-common/src/main/python/resource_management/core/providers/package/choco.py @@ -42,7 +42,7 @@ REMOVE_CMD = { CHECK_CMD = { True: ['cmd', '/c', 'choco', 'list', '--pre', '--local-only', '-v'], - False: ['cmd', '/c', 'choco', 'list', '--pre', '-local-only'], + False: ['cmd', '/c', 'choco', 'list', '--pre', '--local-only'], } class ChocoProvider(PackageProvider): http://git-wip-us.apache.org/repos/asf/am
[1/2] ambari git commit: AMBARI-11267 - [WinTP2] Metrics Monitor Install Fails
Repository: ambari Updated Branches: refs/heads/trunk b21f48299 -> 6a3fe5472 AMBARI-11267 - [WinTP2] Metrics Monitor Install Fails Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/440f5c77 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/440f5c77 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/440f5c77 Branch: refs/heads/trunk Commit: 440f5c7757d3fd433ce899a83e3fb75d611e771d Parents: b21f482 Author: Artem Baranchuk Authored: Wed May 20 16:57:52 2015 +0300 Committer: Artem Baranchuk Committed: Wed May 20 19:36:54 2015 +0300 -- .../resource_management/core/providers/windows/service.py | 10 ++ .../0.1.0/package/scripts/params_windows.py | 5 +++-- 2 files changed, 9 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/440f5c77/ambari-common/src/main/python/resource_management/core/providers/windows/service.py -- diff --git a/ambari-common/src/main/python/resource_management/core/providers/windows/service.py b/ambari-common/src/main/python/resource_management/core/providers/windows/service.py index 174acea..8e6ddff 100644 --- a/ambari-common/src/main/python/resource_management/core/providers/windows/service.py +++ b/ambari-common/src/main/python/resource_management/core/providers/windows/service.py @@ -108,7 +108,7 @@ class ServiceConfigProvider(Provider): def action_install(self): hSCM = safe_open_scmanager() -self._fix_system_user_name() +self._fix_user_name() try: hSvc = win32service.CreateService(hSCM, @@ -142,7 +142,7 @@ class ServiceConfigProvider(Provider): try: hSvc = safe_open_service(hSCM, self.resource.service_name) - self._fix_system_user_name() + self._fix_user_name() try: win32service.ChangeServiceConfig(hSvc, @@ -174,7 +174,7 @@ class ServiceConfigProvider(Provider): try: hSvc = safe_open_service(hSCM, self.resource.service_name) - self._fix_system_user_name() + self._fix_user_name() try: win32service.ChangeServiceConfig(hSvc, @@ -219,9 +219,11 @@ class ServiceConfigProvider(Provider): finally: win32service.CloseServiceHandle(hSCM) - def _fix_system_user_name(self): + def _fix_user_name(self): if self.resource.username.upper() == "NT AUTHORITY\\SYSTEM": self.resource.username = None +elif self.resource.username.find("\\") == -1: + self.resource.username = ".\\" + self.resource.username def _is_system_user(self): if self.resource.username in ["NT AUTHORITY\\SYSTEM", "NT AUTHORITY\\NetworkService", "NT AUTHORITY\\LocalService"]: http://git-wip-us.apache.org/repos/asf/ambari/blob/440f5c77/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params_windows.py -- diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params_windows.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params_windows.py index 85a65e6..139e2bb 100644 --- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params_windows.py +++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params_windows.py @@ -23,7 +23,8 @@ from resource_management import * config = Script.get_config() -ams_user = "hadoop" +hadoop_user = config["configurations"]["cluster-env"]["hadoop.user.name"] +ams_user = hadoop_user ams_collector_conf_dir = os.environ["COLLECTOR_CONF_DIR"] ams_collector_home_dir = os.environ["COLLECTOR_HOME"] ams_monitor_conf_dir = os.environ["MONITOR_CONF_DIR"] @@ -35,5 +36,5 @@ hadoop_conf_dir = os.path.join(os.environ["HADOOP_HOME"], "conf") hbase_conf_dir = os.path.join(os.environ["COLLECTOR_HOME"], "hbase", "conf") ams_collector_win_service_name = "AmbariMetricsCollector" -ams_monitor_win_service_name = "AmbariMetricsCollector" +ams_monitor_win_service_name = "AmbariMetricsHostMonitoring" ams_embedded_hbase_win_service_name = "ams_hbase_master"
[2/2] ambari git commit: AMBARI-11270 - [WinTP2] Check Ambari Metrics fails because it is scheduled before Ambari Metrics Collector/Monitor start
AMBARI-11270 - [WinTP2] Check Ambari Metrics fails because it is scheduled before Ambari Metrics Collector/Monitor start Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6a3fe547 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6a3fe547 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6a3fe547 Branch: refs/heads/trunk Commit: 6a3fe547286dd56b917c9608396ca58fb7572a00 Parents: 440f5c7 Author: Artem Baranchuk Authored: Wed May 20 19:04:34 2015 +0300 Committer: Artem Baranchuk Committed: Wed May 20 19:36:55 2015 +0300 -- .../src/main/resources/stacks/HDPWIN/2.1/role_command_order.json | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6a3fe547/ambari-server/src/main/resources/stacks/HDPWIN/2.1/role_command_order.json -- diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/role_command_order.json b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/role_command_order.json index 731d389..dc55533 100644 --- a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/role_command_order.json +++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/role_command_order.json @@ -53,6 +53,8 @@ }, "_comment" : "Dependencies that are used when GLUSTERFS is not present in cluster", "optional_no_glusterfs": { +"METRICS_COLLECTOR-START": ["NAMENODE-START", "DATANODE-START"], +"AMBARI_METRICS_SERVICE_CHECK-SERVICE_CHECK": ["METRICS_COLLECTOR-START", "HDFS_SERVICE_CHECK-SERVICE_CHECK"], "SECONDARY_NAMENODE-START": ["NAMENODE-START"], "RESOURCEMANAGER-START": ["NAMENODE-START", "DATANODE-START"], "NODEMANAGER-START": ["NAMENODE-START", "DATANODE-START", "RESOURCEMANAGER-START"],
ambari git commit: AMBARI-10714 - Separate memory configuration for Hive CLI vs HiveServer2 (metastore part)
Repository: ambari Updated Branches: refs/heads/trunk fddbaf4dd -> 211c78bbb AMBARI-10714 - Separate memory configuration for Hive CLI vs HiveServer2 (metastore part) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/211c78bb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/211c78bb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/211c78bb Branch: refs/heads/trunk Commit: 211c78bbbae794a0c5d7fdb04327bf2960bb96ea Parents: fddbaf4 Author: Artem Baranchuk Authored: Mon May 18 17:31:37 2015 +0300 Committer: Artem Baranchuk Committed: Tue May 19 14:24:23 2015 +0300 -- .../server/upgrade/UpgradeCatalog210.java | 33 .../HIVE/0.12.0.2.0/configuration/hive-env.xml | 13 +++- .../0.12.0.2.0/package/scripts/params_linux.py | 2 ++ .../services/HIVE/configuration/hive-env.xml| 5 +++ .../server/upgrade/UpgradeCatalog210Test.java | 9 +- 5 files changed, 60 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/211c78bb/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java index b10d3a5..69c82ef 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java @@ -873,6 +873,39 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog { // Initialize all default widgets and widget layouts initializeClusterAndServiceWidgets(); + +addMissingConfigs(); + } + + protected void addMissingConfigs() throws AmbariException { +updateHiveConfigs(); + } + + protected void updateHiveConfigs() throws AmbariException { +AmbariManagementController ambariManagementController = injector.getInstance( +AmbariManagementController.class); +Clusters clusters = ambariManagementController.getClusters(); + +if (clusters != null) { + Map clusterMap = clusters.getClusters(); + Map prop = new HashMap(); + + if (clusterMap != null && !clusterMap.isEmpty()) { +for (final Cluster cluster : clusterMap.values()) { + //hive metastore and client_heapsize are added for HDP2, we should check if it exists and not add it for HDP1 + if(cluster.getDesiredConfigByType("hive-env") != null) { +Map hiveProps = new HashMap(); +if (!cluster.getDesiredConfigByType("hive-env").getProperties().containsKey("hive.client.heapsize")) { + hiveProps.put("hive.client.heapsize", "512m"); +} +if (!cluster.getDesiredConfigByType("hive-env").getProperties().containsKey("hive.metastore.heapsize")) { + hiveProps.put("hive.metastore.heapsize", "1024m"); +} +updateConfigurationPropertiesForCluster(cluster, "hive-env", hiveProps, false, true); + } +} + } +} } /** http://git-wip-us.apache.org/repos/asf/ambari/blob/211c78bb/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-env.xml b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-env.xml index 923a9ba..db2c927 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-env.xml +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-env.xml @@ -28,6 +28,12 @@ +hive.metastore.heapsize +1024 +Hive Metastore Java heap size + + + hive_database_type mysql Default HIVE DB type. @@ -106,7 +112,12 @@ # The heap size of the jvm stared by hive shell script can be controlled via: -export HADOOP_HEAPSIZE="{{hive_heapsize}}" +if [ "$SERVICE" = "metastore" ]; then + export HADOOP_HEAPSIZE="{{hive_metastore_heapsize}}" +else + export HADOOP_HEAPSIZE="{{hive_heapsize}}" +fi + export HADOOP_CLIENT_OPTS="-Xmx${HADOOP_HEAPSIZE}m $HADOOP_CLIENT_OPTS" # Larger heap size may be required when running queries over large number of files or partitions. http://git-wip-us.apache.org/repos/asf/ambari/blob/211c78bb/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0
[2/2] ambari git commit: AMBARI-11171 - Ambari should add the configurations to enable timeline service state preserving restart
AMBARI-11171 - Ambari should add the configurations to enable timeline service state preserving restart Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9a4b24cb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9a4b24cb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9a4b24cb Branch: refs/heads/trunk Commit: 9a4b24cb2f6973fed229365253afc4dda8994c45 Parents: 45822d2 Author: Artem Baranchuk Authored: Fri May 15 18:12:46 2015 +0300 Committer: Artem Baranchuk Committed: Sat May 16 16:29:23 2015 +0300 -- .../services/YARN/configuration/yarn-site.xml| 19 +++ .../stacks/HDP/2.2/upgrades/upgrade-2.3.xml | 12 +--- .../services/YARN/configuration/yarn-site.xml| 5 + 3 files changed, 25 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9a4b24cb/ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/configuration/yarn-site.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/configuration/yarn-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/configuration/yarn-site.xml index 8898d20..049eeb2 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/configuration/yarn-site.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/configuration/yarn-site.xml @@ -277,6 +277,25 @@ Enable age off of timeline store data. + + +yarn.timeline-service.recovery.enabled +false +Enable timeline server to recover state after starting. If + true, then yarn.timeline-service.state-store-class must be specified. + + + +yarn.timeline-service.state-store-class + org.apache.hadoop.yarn.server.timeline.recovery.LeveldbTimelineStateStore +Store class name for timeline state store. + + +yarn.timeline-service.leveldb-state-store.path +/hadoop/yarn/timeline +Store file name for leveldb state store. + + yarn.timeline-service.leveldb-timeline-store.path /hadoop/yarn/timeline http://git-wip-us.apache.org/repos/asf/ambari/blob/9a4b24cb/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml index 43db5b0..8905561 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml @@ -393,17 +393,6 @@ yarn.timeline-service.recovery.enabled true - - -yarn-site - - - - -yarn-site -yarn.timeline-service.state-store-class - org.apache.hadoop.yarn.server.timeline.recovery.LeveldbTimelineStateStore - @@ -436,6 +425,7 @@ + http://git-wip-us.apache.org/repos/asf/ambari/blob/9a4b24cb/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/configuration/yarn-site.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/configuration/yarn-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/configuration/yarn-site.xml index 852c192..58c817f 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/configuration/yarn-site.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/configuration/yarn-site.xml @@ -26,4 +26,9 @@ true + +yarn.timeline-service.recovery.enabled +true + + \ No newline at end of file
[1/2] ambari git commit: AMBARI-11150 - [WinTP2] Ambari Windows services description should not include version
Repository: ambari Updated Branches: refs/heads/trunk 8cd295c10 -> 9a4b24cb2 AMBARI-11150 - [WinTP2] Ambari Windows services description should not include version Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/45822d24 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/45822d24 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/45822d24 Branch: refs/heads/trunk Commit: 45822d24765b913f07f28828956508ed09f37258 Parents: 8cd295c Author: Artem Baranchuk Authored: Fri May 15 02:41:56 2015 +0300 Committer: Artem Baranchuk Committed: Sat May 16 16:29:22 2015 +0300 -- ambari-agent/conf/windows/service_wrapper.py | 2 -- .../src/main/python/ambari_commons/ambari_service.py | 10 -- .../src/main/python/amhm_service.py | 2 -- .../src/main/python/amc_service.py| 2 -- ambari-server/src/main/python/ambari_windows_service.py | 2 -- 5 files changed, 18 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/45822d24/ambari-agent/conf/windows/service_wrapper.py -- diff --git a/ambari-agent/conf/windows/service_wrapper.py b/ambari-agent/conf/windows/service_wrapper.py index 5831e11..0851745 100644 --- a/ambari-agent/conf/windows/service_wrapper.py +++ b/ambari-agent/conf/windows/service_wrapper.py @@ -66,8 +66,6 @@ class AmbariAgentService(AmbariService): AmbariService._svc_display_name_ = "Ambari Agent" AmbariService._svc_description_ = "Ambari Agent" - AmbariService._AdjustServiceVersion() - heartbeat_stop_handler = None # Adds the necessary script dir to the Python's modules path http://git-wip-us.apache.org/repos/asf/ambari/blob/45822d24/ambari-common/src/main/python/ambari_commons/ambari_service.py -- diff --git a/ambari-common/src/main/python/ambari_commons/ambari_service.py b/ambari-common/src/main/python/ambari_commons/ambari_service.py index 391ddc3..8e7e7aa 100644 --- a/ambari-common/src/main/python/ambari_commons/ambari_service.py +++ b/ambari-common/src/main/python/ambari_commons/ambari_service.py @@ -64,16 +64,6 @@ class AmbariService(WinService): self.SvcDoRun() pass - # Call during initialization to implement standard service versioning - @classmethod - def _AdjustServiceVersion(cls): -if os.environ.has_key(AMBARI_VERSION_VAR): - ambariVer = os.environ[AMBARI_VERSION_VAR] -else: - ambariVer = "1.3.0-SNAPSHOT" -AmbariService._svc_display_name_ += "-" + ambariVer -AmbariService._svc_description_ += " v" + ambariVer - # Override to customize the command-line arguments def _InitOptionsParser(self): pass http://git-wip-us.apache.org/repos/asf/ambari/blob/45822d24/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/amhm_service.py -- diff --git a/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/amhm_service.py b/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/amhm_service.py index 9d74f27..a23226f 100644 --- a/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/amhm_service.py +++ b/ambari-metrics/ambari-metrics-host-monitoring/src/main/python/amhm_service.py @@ -40,8 +40,6 @@ class AMHostMonitoringService(AmbariService): AmbariService._svc_display_name_ = "Ambari Metrics Host Monitoring" AmbariService._svc_description_ = "Ambari Metrics Host Monitoring Service" - AmbariService._AdjustServiceVersion() - # Adds the necessary script dir to the Python's modules path. # Modify this as the deployed product's dir structure changes. def _adjustPythonPath(self, current_dir): http://git-wip-us.apache.org/repos/asf/ambari/blob/45822d24/ambari-metrics/ambari-metrics-timelineservice/src/main/python/amc_service.py -- diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/main/python/amc_service.py b/ambari-metrics/ambari-metrics-timelineservice/src/main/python/amc_service.py index b901e5c..d69c148 100644 --- a/ambari-metrics/ambari-metrics-timelineservice/src/main/python/amc_service.py +++ b/ambari-metrics/ambari-metrics-timelineservice/src/main/python/amc_service.py @@ -38,8 +38,6 @@ class AMCollectorService(AmbariService): AmbariService._svc_display_name_ = "Ambari Metrics Collector" AmbariService._svc_description_ = "Ambari Metrics Collector Service" - AmbariService._AdjustServiceVersion() - # Adds the necessary script dir(s) to the Python's modules path. # Modify this as the deployed product's dir structure changes. def _adjustPythonPath(self, current_dir): http:/
ambari git commit: AMBARI-10911 - [WinTP2] Knox service need to be refactored due to service check failed
Repository: ambari Updated Branches: refs/heads/trunk 9c3e5dd22 -> f33e58389 AMBARI-10911 - [WinTP2] Knox service need to be refactored due to service check failed Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f33e5838 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f33e5838 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f33e5838 Branch: refs/heads/trunk Commit: f33e5838959eb1d28f06500c0314fd2d8b595fe2 Parents: 9c3e5dd Author: Artem Baranchuk Authored: Tue May 5 00:04:45 2015 +0300 Committer: Artem Baranchuk Committed: Wed May 13 15:54:05 2015 +0300 -- .../common-services/KNOX/0.5.0.2.2/metainfo.xml | 4 +- .../KNOX/0.5.0.2.2/package/scripts/knox.py | 3 +- .../0.5.0.2.2/package/scripts/knox_gateway.py | 111 +--- .../KNOX/0.5.0.2.2/package/scripts/knox_ldap.py | 3 +- .../KNOX/0.5.0.2.2/package/scripts/params.py| 178 +-- .../0.5.0.2.2/package/scripts/params_linux.py | 173 +- .../0.5.0.2.2/package/scripts/params_windows.py | 11 ++ .../0.5.0.2.2/package/scripts/service_check.py | 100 +++ .../package/scripts/service_mapping.py | 22 --- .../0.5.0.2.2/package/scripts/status_params.py | 42 +++-- .../services/KNOX/configuration/knox-env.xml| 10 -- .../ranger-knox-plugin-properties.xml | 1 - 12 files changed, 317 insertions(+), 341 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f33e5838/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/metainfo.xml b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/metainfo.xml index 5d32ce1..5d49298 100644 --- a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/metainfo.xml @@ -39,7 +39,7 @@ STARTDEMOLDAP -scripts/demo_ldap.py +scripts/knox_gateway.py PYTHON 600 @@ -47,7 +47,7 @@ STOPDEMOLDAP -scripts/demo_ldap.py +scripts/knox_gateway.py PYTHON 600 http://git-wip-us.apache.org/repos/asf/ambari/blob/f33e5838/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox.py -- diff --git a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox.py b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox.py index f3040ee..6caec01 100644 --- a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox.py +++ b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox.py @@ -25,7 +25,6 @@ from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl @OsFamilyFuncImpl(os_family=OSConst.WINSRV_FAMILY) def knox(): import params - from service_mapping import knox_geteway_win_service_name XmlConfig("gateway-site.xml", conf_dir=params.knox_conf_dir, @@ -35,7 +34,7 @@ def knox(): ) # Manually overriding service logon user & password set by the installation package - ServiceConfig(knox_geteway_win_service_name, + ServiceConfig(params.knox_gateway_win_service_name, action="change_user", username = params.knox_user, password = Script.get_password(params.knox_user)) http://git-wip-us.apache.org/repos/asf/ambari/blob/f33e5838/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox_gateway.py -- diff --git a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox_gateway.py b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox_gateway.py index bc254c5..1e2060e 100644 --- a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox_gateway.py +++ b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox_gateway.py @@ -29,32 +29,15 @@ import os from knox import knox from knox_ldap import ldap from setup_ranger_knox import setup_ranger_knox -import service_mapping from ambari_commons import OSConst from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl -c
ambari git commit: AMBARI-10845 - [WinTP2] Windows services for Yarn and MR are started but UI shows them as stopped
Repository: ambari Updated Branches: refs/heads/trunk 46c96582e -> 39272fc41 AMBARI-10845 - [WinTP2] Windows services for Yarn and MR are started but UI shows them as stopped Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/39272fc4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/39272fc4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/39272fc4 Branch: refs/heads/trunk Commit: 39272fc41a43c2b8c3d45a8ba8f50341c1a11762 Parents: 46c9658 Author: Artem Baranchuk Authored: Thu Apr 30 14:28:23 2015 +0300 Committer: Artem Baranchuk Committed: Thu Apr 30 14:28:43 2015 +0300 -- .../main/python/resource_management/core/source.py | 15 +-- .../package/scripts/mapred_service_check.py | 1 + .../YARN/2.1.0.2.0/package/scripts/service.py| 4 ++-- .../YARN/2.1.0.2.0/package/scripts/service_check.py | 1 + 4 files changed, 17 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/39272fc4/ambari-common/src/main/python/resource_management/core/source.py -- diff --git a/ambari-common/src/main/python/resource_management/core/source.py b/ambari-common/src/main/python/resource_management/core/source.py index 3e3276f..9d1fc76 100644 --- a/ambari-common/src/main/python/resource_management/core/source.py +++ b/ambari-common/src/main/python/resource_management/core/source.py @@ -33,6 +33,8 @@ import os import time import urllib2 import urlparse +from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl +from ambari_commons import OSConst class Source(object): @@ -72,9 +74,18 @@ class StaticFile(Source): if not os.path.isfile(path) and not os.path.islink(path): raise Fail("{0} Source file {1} is not found".format(repr(self), path)) - + +return self.read_file(path) + + @OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT) + def read_file(self, path): +from resource_management.core import sudo return sudo.read_file(path) - + + @OsFamilyFuncImpl(os_family=OSConst.WINSRV_FAMILY) + def read_file(self, path): +with open(path, "rb") as fp: + return fp.read() try: http://git-wip-us.apache.org/repos/asf/ambari/blob/39272fc4/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/mapred_service_check.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/mapred_service_check.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/mapred_service_check.py index 9220b93..6d17aca 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/mapred_service_check.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/mapred_service_check.py @@ -19,6 +19,7 @@ Ambari Agent """ +import sys from resource_management import * from ambari_commons import OSConst from ambari_commons.os_family_impl import OsFamilyImpl http://git-wip-us.apache.org/repos/asf/ambari/blob/39272fc4/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service.py index d6d50fe..f6487e5 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service.py @@ -25,9 +25,9 @@ from ambari_commons import OSConst @OsFamilyFuncImpl(os_family=OSConst.WINSRV_FAMILY) def service(componentName, action='start', serviceName='yarn'): - import params + import status_params if componentName == 'resourcemanager' or componentName == 'nodemanager' or componentName == 'historyserver' or componentName == 'timelineserver': -service_name = params.service_map[componentName] +service_name = status_params.service_map[componentName] if action == 'start' or action == 'stop': Service(service_name, action=action) elif action == 'status': http://git-wip-us.apache.org/repos/asf/ambari/blob/39272fc4/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py in
[2/2] ambari git commit: AMBARI-10604 - [WinTP2] StackAdvisor for HDPWIN needs to be revisited
AMBARI-10604 - [WinTP2] StackAdvisor for HDPWIN needs to be revisited Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e866f042 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e866f042 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e866f042 Branch: refs/heads/trunk Commit: e866f0426b16bfcae664ab81bbed95a73517685e Parents: 8346b21 Author: Artem Baranchuk Authored: Thu Apr 30 01:21:19 2015 +0300 Committer: Artem Baranchuk Committed: Thu Apr 30 01:21:47 2015 +0300 -- .../stacks/HDP/2.0.6/services/stack_advisor.py | 2 +- .../stacks/HDPWIN/2.1/services/stack_advisor.py | 475 ++- .../stacks/HDPWIN/2.2/services/stack_advisor.py | 571 ++- 3 files changed, 1019 insertions(+), 29 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e866f042/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py index 7892c02..afefa5d 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py @@ -335,7 +335,7 @@ class HDP206StackAdvisor(DefaultStackAdvisor): "HBASE": {"hbase-env": self.validateHbaseEnvConfigurations}, "AMBARI_METRICS": {"ams-hbase-site": self.validateAmsHbaseSiteConfigurations, "ams-hbase-env": self.validateAmsHbaseEnvConfigurations, - "ams-site": self.validateAmsSiteConfigurations}, + "ams-site": self.validateAmsSiteConfigurations} } def validateMinMax(self, items, recommendedDefaults, configurations): http://git-wip-us.apache.org/repos/asf/ambari/blob/e866f042/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/stack_advisor.py index ce0739d..c8c0c72 100644 --- a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/stack_advisor.py @@ -19,6 +19,7 @@ limitations under the License. import re import sys +import os from math import ceil from stack_advisor import DefaultStackAdvisor @@ -82,25 +83,60 @@ class HDPWIN21StackAdvisor(DefaultStackAdvisor): return { "YARN": self.recommendYARNConfigurations, "MAPREDUCE2": self.recommendMapReduce2Configurations, + "HDFS": self.recommendHDFSConfigurations, + "HBASE": self.recommendHbaseEnvConfigurations, "OOZIE": self.recommendOozieConfigurations, "HIVE": self.recommendHiveConfigurations, - "TEZ": self.recommendTezConfigurations + "TEZ": self.recommendTezConfigurations, + "AMBARI_METRICS": self.recommendAmsConfigurations } - def putProperty(self, config, configType): -config[configType] = {"properties": {}} + def putProperty(self, config, configType, services=None): +userConfigs = {} +changedConfigs = [] +# if services parameter, prefer values, set by user +if services: + if 'configurations' in services.keys(): +userConfigs = services['configurations'] + if 'changed-configurations' in services.keys(): +changedConfigs = services["changed-configurations"] + +if configType not in config: + config[configType] = {} +if"properties" not in config[configType]: + config[configType]["properties"] = {} def appendProperty(key, value): - config[configType]["properties"][key] = str(value) + if {'type': configType, 'name': key} in changedConfigs: +config[configType]["properties"][key] = userConfigs[configType]['properties'][key] + else: +config[configType]["properties"][key] = str(value) return appendProperty + def putPropertyAttribute(self, config, configType): +if configType not in config: + config[configType] = {} +def appendPropertyAttribute(key, attribute, attributeValue): + if "property_attributes" not in config[configType]: +config[configType]["property_attributes"] = {} + if key not in config[configType]["property_attributes"]: +config[configType]["property_attributes"][key] = {} + config[configType]["property_attributes"][key][attribute] = attributeValue if isinstance(attributeValue, list) else str(attributeValue) +return appendPropertyAttribute + + def recommendHDFSConfigurations(self, configurations, cluste
[1/2] ambari git commit: AMBARI-10831 - [WinTP2] server log contains lots of errors due to host OS family couldn't be found
Repository: ambari Updated Branches: refs/heads/trunk 53bc491ca -> e866f0426 AMBARI-10831 - [WinTP2] server log contains lots of errors due to host OS family couldn't be found Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8346b21c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8346b21c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8346b21c Branch: refs/heads/trunk Commit: 8346b21c85598f6a040967751edaff9f36fdc51a Parents: 53bc491 Author: Artem Baranchuk Authored: Wed Apr 29 15:00:25 2015 +0300 Committer: Artem Baranchuk Committed: Thu Apr 30 01:21:46 2015 +0300 -- .../java/org/apache/ambari/server/state/stack/OsFamily.java | 4 ++-- .../org/apache/ambari/server/state/stack/OSFamilyTest.java| 7 ++- 2 files changed, 8 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8346b21c/ambari-server/src/main/java/org/apache/ambari/server/state/stack/OsFamily.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/OsFamily.java b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/OsFamily.java index 3cdc2ce..37a6db3 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/OsFamily.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/OsFamily.java @@ -45,7 +45,7 @@ public class OsFamily { private final static String OS_FAMILY_SUSE = "suse"; private final static String OS_FAMILY_REDHAT = "redhat"; -private final String os_pattern = "([^\\d]*)([\\d]*)"; +private final String os_pattern = "([\\D]+|(?:[\\D]+[\\d]+[\\D]+))([\\d]*)"; private final String OS_DISTRO = "distro"; private final String OS_VERSION = "versions"; private final String LOAD_CONFIG_MSG = "Could not load OS family definition from %s file"; @@ -99,7 +99,7 @@ public class OsFamily { Pattern r = Pattern.compile(os_pattern); Matcher m = r.matcher(os); - if (m.find()){ + if (m.matches()){ pos.put(OS_DISTRO, m.group(1)); pos.put(OS_VERSION, m.group(2)); } else { http://git-wip-us.apache.org/repos/asf/ambari/blob/8346b21c/ambari-server/src/test/java/org/apache/ambari/server/state/stack/OSFamilyTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/stack/OSFamilyTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/stack/OSFamilyTest.java index 7957860..9654dc3 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/state/stack/OSFamilyTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/state/stack/OSFamilyTest.java @@ -101,8 +101,13 @@ public class OSFamilyTest { Assert.assertNotNull(actual_result); Assert.assertEquals(expected_result, actual_result); - } +// for windows +expected_result = "winsrv6"; +actual_result = os_family.find("win2012server6"); +Assert.assertNotNull(actual_result); +Assert.assertEquals(expected_result, actual_result); + } }
[2/2] ambari git commit: AMBARI-10714 - Separate memory configuration for Hive CLI vs HiveServer2
AMBARI-10714 - Separate memory configuration for Hive CLI vs HiveServer2 Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/930b3e4e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/930b3e4e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/930b3e4e Branch: refs/heads/trunk Commit: 930b3e4ee567006d2611d1dcb4a694726e984899 Parents: 5e2f6b8 Author: Artem Baranchuk Authored: Tue Apr 28 02:26:48 2015 +0300 Committer: Artem Baranchuk Committed: Tue Apr 28 02:27:04 2015 +0300 -- .../HIVE/0.12.0.2.0/configuration/hive-env.xml| 6 ++ .../HIVE/0.12.0.2.0/package/scripts/params_linux.py | 7 ++- .../stacks/HDP/2.2/services/HIVE/configuration/hive-env.xml | 5 + 3 files changed, 17 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/930b3e4e/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-env.xml b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-env.xml index 52cfa10..92373ad 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-env.xml +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-env.xml @@ -22,6 +22,12 @@ +hive.client.heapsize +512 +Hive Client Java heap size + + + hive_database_type mysql Default HIVE DB type. http://git-wip-us.apache.org/repos/asf/ambari/blob/930b3e4e/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py index dae198e..62d1a8a 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py @@ -214,7 +214,12 @@ start_hiveserver2_path = format("{tmp_dir}/start_hiveserver2_script") start_metastore_path = format("{tmp_dir}/start_metastore_script") hadoop_heapsize = config['configurations']['hadoop-env']['hadoop_heapsize'] -hive_heapsize = config['configurations']['hive-site']['hive.heapsize'] + +if 'role' in config and config['role'] in ["HIVE_SERVER", "HIVE_METASTORE"]: + hive_heapsize = config['configurations']['hive-site']['hive.heapsize'] +else: + hive_heapsize = config['configurations']['hive-env']['hive.client.heapsize'] + java64_home = config['hostLevelParams']['java_home'] # MYSQL http://git-wip-us.apache.org/repos/asf/ambari/blob/930b3e4e/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-env.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-env.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-env.xml index 1e0feb2..ce60563 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-env.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-env.xml @@ -21,6 +21,11 @@ --> + +hive.client.heapsize +true + + content
[1/2] ambari git commit: AMBARI-10753 - [WinTP2] sql exception during server setup
Repository: ambari Updated Branches: refs/heads/trunk 6a054b35a -> 930b3e4ee AMBARI-10753 - [WinTP2] sql exception during server setup Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5e2f6b85 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5e2f6b85 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5e2f6b85 Branch: refs/heads/trunk Commit: 5e2f6b85a25e7a87fee7054c71289c6cebd8d4b7 Parents: 6a054b3 Author: Artem Baranchuk Authored: Tue Apr 28 02:24:16 2015 +0300 Committer: Artem Baranchuk Committed: Tue Apr 28 02:27:03 2015 +0300 -- ambari-server/src/main/resources/Ambari-DDL-SQLServer-DROP.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5e2f6b85/ambari-server/src/main/resources/Ambari-DDL-SQLServer-DROP.sql -- diff --git a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-DROP.sql b/ambari-server/src/main/resources/Ambari-DDL-SQLServer-DROP.sql index 8cb3132..f972edc 100644 --- a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-DROP.sql +++ b/ambari-server/src/main/resources/Ambari-DDL-SQLServer-DROP.sql @@ -147,6 +147,8 @@ IF OBJECT_ID('request', 'U') IS NOT NULL DROP TABLE request GO IF OBJECT_ID('requestschedule', 'U') IS NOT NULL DROP TABLE requestschedule GO +IF OBJECT_ID('serviceconfighosts', 'U') IS NOT NULL DROP TABLE serviceconfighosts +GO IF OBJECT_ID('hoststate', 'U') IS NOT NULL DROP TABLE hoststate GO IF OBJECT_ID('hostcomponentdesiredstate', 'U') IS NOT NULL DROP TABLE hostcomponentdesiredstate @@ -185,8 +187,6 @@ IF OBJECT_ID('alert_history', 'U') IS NOT NULL DROP TABLE alert_history GO IF OBJECT_ID('alert_definition', 'U') IS NOT NULL DROP TABLE alert_definition GO -IF OBJECT_ID('serviceconfighosts', 'U') IS NOT NULL DROP TABLE serviceconfighosts -GO IF OBJECT_ID('serviceconfigmapping', 'U') IS NOT NULL DROP TABLE serviceconfigmapping GO IF OBJECT_ID('serviceconfig', 'U') IS NOT NULL DROP TABLE serviceconfig
[1/3] ambari git commit: AMBARI-10698 - HDFS and ZOOKEEPER deployment problems on Windows OS (Eugene Chekanskiy via abaranchuk)
Repository: ambari Updated Branches: refs/heads/trunk ae4118c96 -> 00ea69653 AMBARI-10698 - HDFS and ZOOKEEPER deployment problems on Windows OS (Eugene Chekanskiy via abaranchuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/eae822fa Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/eae822fa Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/eae822fa Branch: refs/heads/trunk Commit: eae822fa04452e9a6f4e9206473b02690525e5e3 Parents: ae4118c Author: Artem Baranchuk Authored: Fri Apr 24 19:59:44 2015 +0300 Committer: Artem Baranchuk Committed: Fri Apr 24 19:59:44 2015 +0300 -- .../HDFS/2.1.0.2.0/package/scripts/params_windows.py| 12 +--- .../ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper.py| 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/eae822fa/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_windows.py -- diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_windows.py b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_windows.py index fe7f456..c14e6ca 100644 --- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_windows.py +++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_windows.py @@ -22,9 +22,15 @@ import os from status_params import * config = Script.get_config() -hadoop_conf_dir = os.environ["HADOOP_CONF_DIR"] -hbase_conf_dir = os.environ["HBASE_CONF_DIR"] -hadoop_home = os.environ["HADOOP_HOME"] +hadoop_conf_dir = None +hbase_conf_dir = None +hadoop_home = None +try: + hadoop_conf_dir = os.environ["HADOOP_CONF_DIR"] + hbase_conf_dir = os.environ["HBASE_CONF_DIR"] + hadoop_home = os.environ["HADOOP_HOME"] +except: + pass #directories & files dfs_name_dir = config['configurations']['hdfs-site']['dfs.namenode.name.dir'] fs_checkpoint_dir = config['configurations']['hdfs-site']['dfs.namenode.checkpoint.dir'] http://git-wip-us.apache.org/repos/asf/ambari/blob/eae822fa/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper.py -- diff --git a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper.py b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper.py index 8176e2e..d6c40ee 100644 --- a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper.py +++ b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper.py @@ -102,7 +102,7 @@ def zookeeper(type = None, rolling_restart = False): ) @OsFamilyFuncImpl(os_family=OSConst.WINSRV_FAMILY) -def zookeeper(type = None): +def zookeeper(type = None, rolling_restart = False): import params configFile("zoo.cfg", template_name="zoo.cfg.j2", mode="f") configFile("configuration.xsl", template_name="configuration.xsl.j2", mode="f")
[2/3] ambari git commit: AMBARI-10660 - Need to relocate stacks/HDPWIN/2.1/services/STORM/package/alerts/check_supervisor_process.py (Eugene Chekanskiy via abaranchuk)
AMBARI-10660 - Need to relocate stacks/HDPWIN/2.1/services/STORM/package/alerts/check_supervisor_process.py (Eugene Chekanskiy via abaranchuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/43c8cd49 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/43c8cd49 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/43c8cd49 Branch: refs/heads/trunk Commit: 43c8cd496c8521f32f2bdebef296f54b37061ce7 Parents: eae822f Author: Artem Baranchuk Authored: Fri Apr 24 20:01:42 2015 +0300 Committer: Artem Baranchuk Committed: Fri Apr 24 20:01:42 2015 +0300 -- .../alerts/check_supervisor_process_win.py | 49 .../STORM/0.9.1.2.1/package/scripts/nimbus.py | 3 +- .../0.9.1.2.1/package/scripts/supervisor.py | 2 + .../0.9.1.2.1/package/scripts/ui_server.py | 2 + .../0.9.1.2.1/package/scripts/yaml_utils.py | 4 +- .../HDPWIN/2.1/services/STORM/alerts.json | 2 +- .../package/alerts/check_supervisor_process.py | 49 7 files changed, 59 insertions(+), 52 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/43c8cd49/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/alerts/check_supervisor_process_win.py -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/alerts/check_supervisor_process_win.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/alerts/check_supervisor_process_win.py new file mode 100644 index 000..dcae64a --- /dev/null +++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/alerts/check_supervisor_process_win.py @@ -0,0 +1,49 @@ +#!/usr/bin/env python + +""" +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. +""" + +from resource_management.libraries.functions import check_windows_service_status + + +RESULT_CODE_OK = 'OK' +RESULT_CODE_CRITICAL = 'CRITICAL' +RESULT_CODE_UNKNOWN = 'UNKNOWN' + + +def get_tokens(): + """ + Returns a tuple of tokens in the format {{site/property}} that will be used + to build the dictionary passed into execute + """ + return () + +def execute(parameters=None, host_name=None): + """ + Returns a tuple containing the result code and a pre-formatted result label + + Keyword arguments: + parameters (dictionary): a mapping of parameter key to value + host_name (string): the name of this host where the alert is running + """ + + try: +check_windows_service_status("supervisor") +return (RESULT_CODE_OK, ["Supervisor is running"]) + except: +return (RESULT_CODE_CRITICAL, ["Supervisor is stopped"]) http://git-wip-us.apache.org/repos/asf/ambari/blob/43c8cd49/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/nimbus.py -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/nimbus.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/nimbus.py index 98e9e9b..57db32d 100644 --- a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/nimbus.py +++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/nimbus.py @@ -32,7 +32,7 @@ from resource_management.libraries.functions.security_commons import build_expec from setup_ranger_storm import setup_ranger_storm from ambari_commons import OSConst from ambari_commons.os_family_impl import OsFamilyImpl - +from resource_management.core.resources.service import Service class Nimbus(Script): def install(self, env): @@ -132,6 +132,7 @@ class NimbusWindows(Nimbus): def status(self, env): import status_params +from resource_management.libraries.functions.windows_service_utils import check_windows_service_status en
[3/3] ambari git commit: AMBARI-10628 - HDPWIN deployment fails with cryptic message when hdp.msi is missing under resources folder (Eugene Chekanskiy via abaranchuk)
AMBARI-10628 - HDPWIN deployment fails with cryptic message when hdp.msi is missing under resources folder (Eugene Chekanskiy via abaranchuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/00ea6965 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/00ea6965 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/00ea6965 Branch: refs/heads/trunk Commit: 00ea696531fe15435c81b05eae66e0de442c1c2b Parents: 43c8cd4 Author: Artem Baranchuk Authored: Fri Apr 24 20:04:00 2015 +0300 Committer: Artem Baranchuk Committed: Fri Apr 24 20:04:00 2015 +0300 -- ambari-agent/src/main/python/ambari_agent/PythonExecutor.py | 7 +-- ambari-common/src/main/python/ambari_commons/shell.py | 5 ++--- .../libraries/functions/install_hdp_msi.py| 5 - 3 files changed, 11 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/00ea6965/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py b/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py index 09be145..42e3861 100644 --- a/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py +++ b/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py @@ -112,8 +112,11 @@ class PythonExecutor: Log some useful information after task failure. """ logger.info("Command " + pprint.pformat(pythonCommand) + " failed with exitcode=" + str(result['exitcode'])) -cmd_list = ["ps faux", "netstat -tulpn"] - +if OSCheck.is_windows_family(): + cmd_list = ["WMIC path win32_process get Caption,Processid,Commandline", "netstat -an"] +else: + cmd_list = ["ps faux", "netstat -tulpn"] + shell_runner = shellRunner() for cmd in cmd_list: http://git-wip-us.apache.org/repos/asf/ambari/blob/00ea6965/ambari-common/src/main/python/ambari_commons/shell.py -- diff --git a/ambari-common/src/main/python/ambari_commons/shell.py b/ambari-common/src/main/python/ambari_commons/shell.py index 4531cf9..8d26599 100644 --- a/ambari-common/src/main/python/ambari_commons/shell.py +++ b/ambari-common/src/main/python/ambari_commons/shell.py @@ -76,9 +76,8 @@ class shellRunnerWindows(shellRunner): def run(self, script, user=None): logger.warn("user argument ignored on windows") code = 0 -if not isinstance(script, list): - cmd = " " - cmd = cmd.join(script) +if isinstance(script, list): + cmd = " ".join(script) else: cmd = script p = subprocess.Popen(cmd, stdout=subprocess.PIPE, http://git-wip-us.apache.org/repos/asf/ambari/blob/00ea6965/ambari-common/src/main/python/resource_management/libraries/functions/install_hdp_msi.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/install_hdp_msi.py b/ambari-common/src/main/python/resource_management/libraries/functions/install_hdp_msi.py index 0fa72fe..ddb99e1 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/install_hdp_msi.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/install_hdp_msi.py @@ -178,7 +178,10 @@ def install_windows_msi(msi_url, save_dir, save_file, hadoop_password, stack_ver hdp_22_specific_props = hdp_22.format(hdp_data_dir=hdp_data_dir) # install msi -download_file(msi_url, os.path.join(msi_save_dir, save_file)) +try: + download_file(msi_url, os.path.join(msi_save_dir, save_file)) +except: + raise Fail("Failed to download {url}".format(url=msi_url)) File(os.path.join(msi_save_dir, "properties.txt"), content=cluster_properties.format(hdp_log_dir=hdp_log_dir, hdp_data_dir=hdp_data_dir, local_host=local_host,
ambari git commit: AMBARI-10605 - [WinTP2] sql error during DB creation
Repository: ambari Updated Branches: refs/heads/trunk aed7c85ca -> 14b863738 AMBARI-10605 - [WinTP2] sql error during DB creation Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/14b86373 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/14b86373 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/14b86373 Branch: refs/heads/trunk Commit: 14b863738a57b933a4b143e39e863614d8d05667 Parents: aed7c85 Author: Artem Baranchuk Authored: Mon Apr 20 19:46:27 2015 +0300 Committer: Artem Baranchuk Committed: Mon Apr 20 22:01:58 2015 +0300 -- ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/14b86373/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql -- diff --git a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql index 1567bf1..03f1ec8 100644 --- a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql +++ b/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql @@ -633,7 +633,7 @@ CREATE TABLE adminprivilege ( CREATE TABLE host_version ( id BIGINT NOT NULL, repo_version_id BIGINT NOT NULL, - host_name VARCHAR(255) NOT NULL, + host_id BIGINT NOT NULL, STATE VARCHAR(32) NOT NULL, PRIMARY KEY CLUSTERED (id) );
ambari git commit: AMBARI-10421 - [WinTP2] Merge HDPWIN HIVE package scripts to common services (init_metastore_schema)
Repository: ambari Updated Branches: refs/heads/trunk 7a68f8e49 -> 80d8eb388 AMBARI-10421 - [WinTP2] Merge HDPWIN HIVE package scripts to common services (init_metastore_schema) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/80d8eb38 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/80d8eb38 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/80d8eb38 Branch: refs/heads/trunk Commit: 80d8eb388258c16506498973872d412e7361f93d Parents: 7a68f8e Author: Artem Baranchuk Authored: Wed Apr 15 16:18:52 2015 +0300 Committer: Artem Baranchuk Committed: Wed Apr 15 16:18:52 2015 +0300 -- .../HIVE/0.12.0.2.0/package/scripts/params_windows.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/80d8eb38/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_windows.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_windows.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_windows.py index a9395a6..d84b226 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_windows.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_windows.py @@ -51,4 +51,4 @@ hive_metastore_user_passwd = config['configurations']['hive-site']['javax.jdo.op hive_exclude_packages = [] Metastore Schema -init_metastore_schema = config['configurations']['hive-site']['datanucleus.autoCreateSchema'] \ No newline at end of file +init_metastore_schema = not config['configurations']['hive-site']['datanucleus.autoCreateSchema'] \ No newline at end of file
[1/3] ambari git commit: AMBARI-10421 - [WinTP2] Merge HDPWIN HIVE package scripts to common services
Repository: ambari Updated Branches: refs/heads/trunk 316021844 -> 7a68f8e49 http://git-wip-us.apache.org/repos/asf/ambari/blob/7a68f8e4/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/etc/hive-schema-0.12.0.postgres.sql -- diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/etc/hive-schema-0.12.0.postgres.sql b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/etc/hive-schema-0.12.0.postgres.sql deleted file mode 100644 index 61769f6..000 --- a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/etc/hive-schema-0.12.0.postgres.sql +++ /dev/null @@ -1,1405 +0,0 @@ --- --- PostgreSQL database dump --- - -SET statement_timeout = 0; -SET client_encoding = 'UTF8'; -SET standard_conforming_strings = off; -SET check_function_bodies = false; -SET client_min_messages = warning; -SET escape_string_warning = off; - -SET search_path = public, pg_catalog; - -SET default_tablespace = ''; - -SET default_with_oids = false; - --- --- Name: BUCKETING_COLS; Type: TABLE; Schema: public; Owner: hiveuser; Tablespace: --- - -CREATE TABLE "BUCKETING_COLS" ( -"SD_ID" bigint NOT NULL, -"BUCKET_COL_NAME" character varying(256) DEFAULT NULL::character varying, -"INTEGER_IDX" bigint NOT NULL -); - - --- --- Name: CDS; Type: TABLE; Schema: public; Owner: hiveuser; Tablespace: --- - -CREATE TABLE "CDS" ( -"CD_ID" bigint NOT NULL -); - - --- --- Name: COLUMNS_OLD; Type: TABLE; Schema: public; Owner: hiveuser; Tablespace: --- - -CREATE TABLE "COLUMNS_OLD" ( -"SD_ID" bigint NOT NULL, -"COMMENT" character varying(256) DEFAULT NULL::character varying, -"COLUMN_NAME" character varying(128) NOT NULL, -"TYPE_NAME" character varying(4000) NOT NULL, -"INTEGER_IDX" bigint NOT NULL -); - - --- --- Name: COLUMNS_V2; Type: TABLE; Schema: public; Owner: hiveuser; Tablespace: --- - -CREATE TABLE "COLUMNS_V2" ( -"CD_ID" bigint NOT NULL, -"COMMENT" character varying(4000), -"COLUMN_NAME" character varying(128) NOT NULL, -"TYPE_NAME" character varying(4000), -"INTEGER_IDX" integer NOT NULL -); - - --- --- Name: DATABASE_PARAMS; Type: TABLE; Schema: public; Owner: hiveuser; Tablespace: --- - -CREATE TABLE "DATABASE_PARAMS" ( -"DB_ID" bigint NOT NULL, -"PARAM_KEY" character varying(180) NOT NULL, -"PARAM_VALUE" character varying(4000) DEFAULT NULL::character varying -); - - --- --- Name: DBS; Type: TABLE; Schema: public; Owner: hiveuser; Tablespace: --- - -CREATE TABLE "DBS" ( -"DB_ID" bigint NOT NULL, -"DESC" character varying(4000) DEFAULT NULL::character varying, -"DB_LOCATION_URI" character varying(4000) NOT NULL, -"NAME" character varying(128) DEFAULT NULL::character varying -); - - --- --- Name: DB_PRIVS; Type: TABLE; Schema: public; Owner: hiveuser; Tablespace: --- - -CREATE TABLE "DB_PRIVS" ( -"DB_GRANT_ID" bigint NOT NULL, -"CREATE_TIME" bigint NOT NULL, -"DB_ID" bigint, -"GRANT_OPTION" smallint NOT NULL, -"GRANTOR" character varying(128) DEFAULT NULL::character varying, -"GRANTOR_TYPE" character varying(128) DEFAULT NULL::character varying, -"PRINCIPAL_NAME" character varying(128) DEFAULT NULL::character varying, -"PRINCIPAL_TYPE" character varying(128) DEFAULT NULL::character varying, -"DB_PRIV" character varying(128) DEFAULT NULL::character varying -); - - --- --- Name: GLOBAL_PRIVS; Type: TABLE; Schema: public; Owner: hiveuser; Tablespace: --- - -CREATE TABLE "GLOBAL_PRIVS" ( -"USER_GRANT_ID" bigint NOT NULL, -"CREATE_TIME" bigint NOT NULL, -"GRANT_OPTION" smallint NOT NULL, -"GRANTOR" character varying(128) DEFAULT NULL::character varying, -"GRANTOR_TYPE" character varying(128) DEFAULT NULL::character varying, -"PRINCIPAL_NAME" character varying(128) DEFAULT NULL::character varying, -"PRINCIPAL_TYPE" character varying(128) DEFAULT NULL::character varying, -"USER_PRIV" character varying(128) DEFAULT NULL::character varying -); - - --- --- Name: IDXS; Type: TABLE; Schema: public; Owner: hiveuser; Tablespace: --- - -CREATE TABLE "IDXS" ( -"INDEX_ID" bigint NOT NULL, -"CREATE_TIME" bigint NOT NULL, -"DEFERRED_REBUILD" boolean NOT NULL, -"INDEX_HANDLER_CLASS" character varying(4000) DEFAULT NULL::character varying, -"INDEX_NAME" character varying(128) DEFAULT NULL::character varying, -"INDEX_TBL_ID" bigint, -"LAST_ACCESS_TIME" bigint NOT NULL, -"ORIG_TBL_ID" bigint, -"SD_ID" bigint -); - - --- --- Name: INDEX_PARAMS; Type: TABLE; Schema: public; Owner: hiveuser; Tablespace: --- - -CREATE TABLE "INDEX_PARAMS" ( -"INDEX_ID" bigint NOT NULL, -"PARAM_KEY" character varying(256) NOT NULL, -"PARAM_VALUE" character varying(4000) DEFAULT NULL::character varying -); - - --- --- Name: NUCLEUS_TABLES; Type: TABLE; Schema: public; Owner: hiveuser; Tablespace: --- - -CREATE TABLE "NUCLEUS_TABLES" ( -"CLASS
[2/3] ambari git commit: AMBARI-10421 - [WinTP2] Merge HDPWIN HIVE package scripts to common services
http://git-wip-us.apache.org/repos/asf/ambari/blob/7a68f8e4/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/etc/hive-schema-0.12.0.mysql.sql -- diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/etc/hive-schema-0.12.0.mysql.sql b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/etc/hive-schema-0.12.0.mysql.sql deleted file mode 100644 index bacee9e..000 --- a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/etc/hive-schema-0.12.0.mysql.sql +++ /dev/null @@ -1,777 +0,0 @@ --- MySQL dump 10.13 Distrib 5.5.25, for osx10.6 (i386) --- --- Host: localhostDatabase: test --- -- --- Server version 5.5.25 - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; -/*!40103 SET TIME_ZONE='+00:00' */; -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; - --- --- Table structure for table `BUCKETING_COLS` --- - -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE IF NOT EXISTS `BUCKETING_COLS` ( - `SD_ID` bigint(20) NOT NULL, - `BUCKET_COL_NAME` varchar(256) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, - `INTEGER_IDX` int(11) NOT NULL, - PRIMARY KEY (`SD_ID`,`INTEGER_IDX`), - KEY `BUCKETING_COLS_N49` (`SD_ID`), - CONSTRAINT `BUCKETING_COLS_FK1` FOREIGN KEY (`SD_ID`) REFERENCES `SDS` (`SD_ID`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `CDS` --- - -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE IF NOT EXISTS `CDS` ( - `CD_ID` bigint(20) NOT NULL, - PRIMARY KEY (`CD_ID`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `COLUMNS_V2` --- - -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE IF NOT EXISTS `COLUMNS_V2` ( - `CD_ID` bigint(20) NOT NULL, - `COMMENT` varchar(256) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, - `COLUMN_NAME` varchar(128) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL, - `TYPE_NAME` varchar(4000) DEFAULT NULL, - `INTEGER_IDX` int(11) NOT NULL, - PRIMARY KEY (`CD_ID`,`COLUMN_NAME`), - KEY `COLUMNS_V2_N49` (`CD_ID`), - CONSTRAINT `COLUMNS_V2_FK1` FOREIGN KEY (`CD_ID`) REFERENCES `CDS` (`CD_ID`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `DATABASE_PARAMS` --- - -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE IF NOT EXISTS `DATABASE_PARAMS` ( - `DB_ID` bigint(20) NOT NULL, - `PARAM_KEY` varchar(180) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL, - `PARAM_VALUE` varchar(4000) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, - PRIMARY KEY (`DB_ID`,`PARAM_KEY`), - KEY `DATABASE_PARAMS_N49` (`DB_ID`), - CONSTRAINT `DATABASE_PARAMS_FK1` FOREIGN KEY (`DB_ID`) REFERENCES `DBS` (`DB_ID`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `DBS` --- - -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE IF NOT EXISTS `DBS` ( - `DB_ID` bigint(20) NOT NULL, - `DESC` varchar(4000) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, - `DB_LOCATION_URI` varchar(4000) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL, - `NAME` varchar(128) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, - PRIMARY KEY (`DB_ID`), - UNIQUE KEY `UNIQUE_DATABASE` (`NAME`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `DB_PRIVS` --- - -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE IF NOT EXISTS `DB_PRIVS` ( - `DB_GRANT_ID` bigint(20) NOT NULL, - `CREATE_TIME` int(11) NOT NULL, - `DB_ID` bigint(20) DEFAULT NULL, - `GRANT_OPTION` smallint(6) NOT NULL, - `GRANTOR` varchar(128) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, - `GRANTOR_TYPE` varchar(128) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, - `PRINCIPAL_NAME` varchar(1
[3/3] ambari git commit: AMBARI-10421 - [WinTP2] Merge HDPWIN HIVE package scripts to common services
AMBARI-10421 - [WinTP2] Merge HDPWIN HIVE package scripts to common services Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7a68f8e4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7a68f8e4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7a68f8e4 Branch: refs/heads/trunk Commit: 7a68f8e49bafbc34a316c0a9fe9046ab3e5c2ffd Parents: 3160218 Author: Artem Baranchuk Authored: Wed Apr 15 14:56:34 2015 +0300 Committer: Artem Baranchuk Committed: Wed Apr 15 15:43:11 2015 +0300 -- .../HIVE/0.12.0.2.0/package/scripts/hcat.py | 15 + .../0.12.0.2.0/package/scripts/hcat_client.py | 18 +- .../package/scripts/hcat_service_check.py | 11 + .../HIVE/0.12.0.2.0/package/scripts/hive.py | 47 +- .../0.12.0.2.0/package/scripts/hive_client.py | 38 +- .../package/scripts/hive_metastore.py | 41 +- .../0.12.0.2.0/package/scripts/hive_server.py | 35 +- .../0.12.0.2.0/package/scripts/hive_service.py | 16 + .../HIVE/0.12.0.2.0/package/scripts/params.py | 397 + .../0.12.0.2.0/package/scripts/params_linux.py | 414 ++ .../package/scripts/params_windows.py | 54 + .../0.12.0.2.0/package/scripts/service_check.py | 22 +- .../0.12.0.2.0/package/scripts/status_params.py | 55 +- .../HIVE/0.12.0.2.0/package/scripts/webhcat.py | 12 +- .../package/scripts/webhcat_server.py | 37 +- .../package/scripts/webhcat_service.py | 10 + .../package/scripts/webhcat_service_check.py| 11 + .../HIVE/etc/hive-schema-0.12.0.mysql.sql | 777 -- .../HIVE/etc/hive-schema-0.12.0.oracle.sql | 717 - .../HIVE/etc/hive-schema-0.12.0.postgres.sql| 1405 -- .../HDPWIN/2.1/services/HIVE/metainfo.xml |4 + .../HIVE/package/scripts/hcat_client.py | 40 - .../HIVE/package/scripts/hcat_service_check.py | 25 - .../2.1/services/HIVE/package/scripts/hive.py | 61 - .../HIVE/package/scripts/hive_client.py | 41 - .../HIVE/package/scripts/hive_metastore.py | 53 - .../HIVE/package/scripts/hive_server.py | 52 - .../HIVE/package/scripts/mysql_server.py| 46 - .../2.1/services/HIVE/package/scripts/params.py | 55 - .../HIVE/package/scripts/service_check.py | 39 - .../HIVE/package/scripts/service_mapping.py | 23 - .../services/HIVE/package/scripts/webhcat.py| 30 - .../HIVE/package/scripts/webhcat_server.py | 48 - .../package/scripts/webhcat_service_check.py| 27 - 34 files changed, 750 insertions(+), 3926 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7a68f8e4/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hcat.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hcat.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hcat.py index 31c1673..1f7893d 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hcat.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hcat.py @@ -20,8 +20,23 @@ limitations under the License. from resource_management import * import sys +from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl +from ambari_commons import OSConst +@OsFamilyFuncImpl(os_family=OSConst.WINSRV_FAMILY) +def hcat(): + import params + + XmlConfig("hive-site.xml", +conf_dir = params.hive_conf_dir, +configurations = params.config['configurations']['hive-site'], +owner=params.hive_user, + configuration_attributes=params.config['configuration_attributes']['hive-site'] + ) + + +@OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT) def hcat(): import params http://git-wip-us.apache.org/repos/asf/ambari/blob/7a68f8e4/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hcat_client.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hcat_client.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hcat_client.py index 811cac6..79096e4 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hcat_client.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hcat_client.py @@ -21,12 +21,11 @@ limitations under the License. import sys from resource_management import * from hcat import hcat +from ambari_commons import OSConst +from ambari_commons.os_family_impl import OsFamilyImpl -class
[2/2] ambari git commit: AMBARI-10439 - [WinTP2] Merge HDPWIN YARN package scripts into common services
AMBARI-10439 - [WinTP2] Merge HDPWIN YARN package scripts into common services Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/31602184 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/31602184 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/31602184 Branch: refs/heads/trunk Commit: 316021844bb7ef6f8b362b91c76579309d5df02c Parents: 899fe99 Author: Artem Baranchuk Authored: Wed Apr 15 14:15:29 2015 +0300 Committer: Artem Baranchuk Committed: Wed Apr 15 14:47:11 2015 +0300 -- .../scripts/application_timeline_server.py | 43 ++-- .../2.1.0.2.0/package/scripts/historyserver.py | 38 ++- .../package/scripts/mapred_service_check.py | 87 +++ .../package/scripts/mapreduce2_client.py| 34 ++- .../2.1.0.2.0/package/scripts/nodemanager.py| 44 ++-- .../YARN/2.1.0.2.0/package/scripts/params.py| 212 + .../2.1.0.2.0/package/scripts/params_linux.py | 229 +++ .../2.1.0.2.0/package/scripts/params_windows.py | 58 + .../package/scripts/resourcemanager.py | 66 -- .../YARN/2.1.0.2.0/package/scripts/service.py | 13 ++ .../2.1.0.2.0/package/scripts/service_check.py | 52 + .../2.1.0.2.0/package/scripts/status_params.py | 40 ++-- .../YARN/2.1.0.2.0/package/scripts/yarn.py | 25 ++ .../2.1.0.2.0/package/scripts/yarn_client.py| 34 ++- .../scripts/application_timeline_server.py | 54 - .../YARN/package/scripts/historyserver.py | 53 - .../package/scripts/mapred_service_check.py | 105 - .../YARN/package/scripts/mapreduce2_client.py | 43 .../YARN/package/scripts/nodemanager.py | 53 - .../2.1/services/YARN/package/scripts/params.py | 57 - .../YARN/package/scripts/resourcemanager.py | 77 --- .../YARN/package/scripts/service_check.py | 68 -- .../YARN/package/scripts/service_mapping.py | 26 --- .../2.1/services/YARN/package/scripts/yarn.py | 45 .../YARN/package/scripts/yarn_client.py | 44 .../package/templates/container-executor.cfg.j2 | 40 .../package/templates/exclude_hosts_list.j2 | 21 -- .../YARN/package/templates/mapreduce.conf.j2| 35 --- .../package/templates/taskcontroller.cfg.j2 | 38 --- .../YARN/package/templates/yarn.conf.j2 | 35 --- 30 files changed, 664 insertions(+), 1105 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/31602184/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/application_timeline_server.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/application_timeline_server.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/application_timeline_server.py index 184596c..8cb5a39 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/application_timeline_server.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/application_timeline_server.py @@ -25,24 +25,44 @@ from resource_management.libraries.functions.security_commons import build_expec cached_kinit_executor, get_params_from_filesystem, validate_security_config_properties,\ FILE_TYPE_XML from resource_management.libraries.functions.format import format - from yarn import yarn from service import service +from ambari_commons import OSConst +from ambari_commons.os_family_impl import OsFamilyImpl -class ApplicationTimelineServer(Script): - - def get_stack_to_component(self): -return {"HDP": "hadoop-yarn-timelineserver"} +class ApplicationTimelineServer(Script): def install(self, env): self.install_packages(env) -#self.configure(env) + + def start(self, env, rolling_restart=False): +import params +env.set_params(params) +self.configure(env) # FOR SECURITY +service('timelineserver', action='start') + + def stop(self, env, rolling_restart=False): +import params +env.set_params(params) +service('timelineserver', action='stop') def configure(self, env): import params env.set_params(params) yarn(name='apptimelineserver') + +@OsFamilyImpl(os_family=OSConst.WINSRV_FAMILY) +class ApplicationTimelineServerWindows(ApplicationTimelineServer): + def status(self, env): +service('timelineserver', action='status') + + +@OsFamilyImpl(os_family=OsFamilyImpl.DEFAULT) +class ApplicationTimelineServerDefault(ApplicationTimelineServer): + def get_stack_to_component(self): +return {"HDP": "hadoop-yarn-timelineserver"} + def pre_rolling_restart(self, env): Logger.info("Executing Rolling Upgrade pre-restart") import param
[1/2] ambari git commit: AMBARI-10439 - [WinTP2] Merge HDPWIN YARN package scripts into common services
Repository: ambari Updated Branches: refs/heads/trunk 899fe99f1 -> 316021844 http://git-wip-us.apache.org/repos/asf/ambari/blob/31602184/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/YARN/package/templates/container-executor.cfg.j2 -- diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/YARN/package/templates/container-executor.cfg.j2 b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/YARN/package/templates/container-executor.cfg.j2 deleted file mode 100644 index 90b12e6..000 --- a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/YARN/package/templates/container-executor.cfg.j2 +++ /dev/null @@ -1,40 +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. -#} - -#/* -# * 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. -# */ -yarn.nodemanager.local-dirs={{nm_local_dirs}} -yarn.nodemanager.log-dirs={{nm_log_dirs}} -yarn.nodemanager.linux-container-executor.group={{yarn_executor_container_group}} -banned.users=hdfs,yarn,mapred,bin -min.user.id=1000 http://git-wip-us.apache.org/repos/asf/ambari/blob/31602184/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/YARN/package/templates/exclude_hosts_list.j2 -- diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/YARN/package/templates/exclude_hosts_list.j2 b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/YARN/package/templates/exclude_hosts_list.j2 deleted file mode 100644 index c7ce416..000 --- a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/YARN/package/templates/exclude_hosts_list.j2 +++ /dev/null @@ -1,21 +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. -#} - -{% for host in exclude_hosts %} -{{host}} -{% endfor %} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/31602184/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/YARN/package/templates/mapreduce.conf.j2 -- diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/YARN/package/templates/mapreduce.conf.j2 b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/YARN/package/templates/mapreduce.conf.j2 deleted file mode 100644 index b996645..000 --- a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/YARN/package/templates/mapreduce.conf.j2 +++ /dev/null @@ -1,35 +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
ambari git commit: AMBARI-10362 - [WinTP2] sql exception during cluster deploy
Repository: ambari Updated Branches: refs/heads/trunk 926e1586c -> a88a155ee AMBARI-10362 - [WinTP2] sql exception during cluster deploy Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a88a155e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a88a155e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a88a155e Branch: refs/heads/trunk Commit: a88a155ee78472ec5e00454ec60c3f5ad55c31d0 Parents: 926e158 Author: Artem Baranchuk Authored: Tue Apr 7 10:35:32 2015 +0300 Committer: Artem Baranchuk Committed: Tue Apr 7 10:35:32 2015 +0300 -- .../main/resources/Ambari-DDL-SQLServer-CREATE.sql | 17 ++--- .../main/resources/Ambari-DDL-SQLServer-DROP.sql | 2 ++ 2 files changed, 16 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a88a155e/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql -- diff --git a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql index 01c6a0c..53bfb68 100644 --- a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql +++ b/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql @@ -40,7 +40,19 @@ CREATE TABLE clusterconfigmapping (cluster_id BIGINT NOT NULL, type_name VARCHAR CREATE TABLE clusterservices (service_name VARCHAR(255) NOT NULL, cluster_id BIGINT NOT NULL, service_enabled INTEGER NOT NULL, PRIMARY KEY CLUSTERED (service_name, cluster_id)); CREATE TABLE clusterstate (cluster_id BIGINT NOT NULL, current_cluster_state VARCHAR(255) NOT NULL, current_stack_version VARCHAR(255) NOT NULL, PRIMARY KEY CLUSTERED (cluster_id)); CREATE TABLE cluster_version (id BIGINT NOT NULL, cluster_id BIGINT NOT NULL, repo_version_id BIGINT NOT NULL, state VARCHAR(255) NOT NULL, start_time BIGINT NOT NULL, end_time BIGINT, user_name VARCHAR(255), PRIMARY KEY (id)); -CREATE TABLE hostcomponentdesiredstate (cluster_id BIGINT NOT NULL, component_name VARCHAR(255) NOT NULL, desired_stack_version VARCHAR(255) NOT NULL, desired_state VARCHAR(255) NOT NULL, host_name VARCHAR(255) NOT NULL, service_name VARCHAR(255) NOT NULL, admin_state VARCHAR(32), maintenance_state VARCHAR(32) NOT NULL, security_state VARCHAR(32) NOT NULL DEFAULT 'UNSECURED', restart_required BIT NOT NULL DEFAULT 0, PRIMARY KEY CLUSTERED (cluster_id, component_name, host_name, service_name)); + +CREATE TABLE hostcomponentdesiredstate ( + cluster_id BIGINT NOT NULL, + component_name VARCHAR(255) NOT NULL, + desired_stack_version VARCHAR(255) NOT NULL, + desired_state VARCHAR(255) NOT NULL, + host_id BIGINT NOT NULL, + service_name VARCHAR(255) NOT NULL, + admin_state VARCHAR(32), + maintenance_state VARCHAR(32) NOT NULL, + security_state VARCHAR(32) NOT NULL DEFAULT 'UNSECURED', + restart_required BIT NOT NULL DEFAULT 0, + PRIMARY KEY CLUSTERED (cluster_id, component_name, host_id, service_name)); CREATE TABLE hostcomponentstate ( cluster_id BIGINT NOT NULL, @@ -156,8 +168,7 @@ ALTER TABLE clusterconfigmapping ADD CONSTRAINT clusterconfigmappingcluster_id F ALTER TABLE clusterstate ADD CONSTRAINT FK_clusterstate_cluster_id FOREIGN KEY (cluster_id) REFERENCES clusters (cluster_id); ALTER TABLE cluster_version ADD CONSTRAINT FK_cluster_version_cluster_id FOREIGN KEY (cluster_id) REFERENCES clusters (cluster_id); ALTER TABLE cluster_version ADD CONSTRAINT FK_cluster_version_repovers_id FOREIGN KEY (repo_version_id) REFERENCES repo_version (repo_version_id); -ALTER TABLE hostcomponentdesiredstate ADD CONSTRAINT hstcmponentdesiredstatehstname FOREIGN KEY (host_name) REFERENCES hosts (host_name); ---ALTER TABLE hostcomponentdesiredstate ADD CONSTRAINT hstcmponentdesiredstatehstid FOREIGN KEY (host_id) REFERENCES hosts (host_id); +ALTER TABLE hostcomponentdesiredstate ADD CONSTRAINT hstcmponentdesiredstatehstid FOREIGN KEY (host_id) REFERENCES hosts (host_id); ALTER TABLE hostcomponentdesiredstate ADD CONSTRAINT hstcmpnntdesiredstatecmpnntnme FOREIGN KEY (component_name, cluster_id, service_name) REFERENCES servicecomponentdesiredstate (component_name, cluster_id, service_name); ALTER TABLE hostcomponentstate ADD CONSTRAINT hstcomponentstatecomponentname FOREIGN KEY (component_name, cluster_id, service_name) REFERENCES servicecomponentdesiredstate (component_name, cluster_id, service_name); ALTER TABLE hostcomponentstate ADD CONSTRAINT FK_hostcomponentstate_host_id FOREIGN KEY (host_id) REFERENCES hosts (host_id); http://git-wip-us.apache.org/repos/asf/ambari/blob/a88a155e/ambari-server/src/main/resources/Ambari-DDL-SQLServer-DROP.sql -- diff --git a/ambari-server/src/ma
ambari git commit: revert BUG-34134 - [WinTP2] sql exception during cluster deploy
Repository: ambari Updated Branches: refs/heads/trunk 3640b6cd6 -> 926e1586c revert BUG-34134 - [WinTP2] sql exception during cluster deploy Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/926e1586 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/926e1586 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/926e1586 Branch: refs/heads/trunk Commit: 926e1586c207b3196198472e01e0a4f5cc656e1d Parents: 3640b6c Author: Artem Baranchuk Authored: Tue Apr 7 10:34:31 2015 +0300 Committer: Artem Baranchuk Committed: Tue Apr 7 10:34:31 2015 +0300 -- .../main/resources/Ambari-DDL-SQLServer-CREATE.sql | 17 +++-- .../main/resources/Ambari-DDL-SQLServer-DROP.sql | 2 -- 2 files changed, 3 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/926e1586/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql -- diff --git a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql index 53bfb68..01c6a0c 100644 --- a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql +++ b/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql @@ -40,19 +40,7 @@ CREATE TABLE clusterconfigmapping (cluster_id BIGINT NOT NULL, type_name VARCHAR CREATE TABLE clusterservices (service_name VARCHAR(255) NOT NULL, cluster_id BIGINT NOT NULL, service_enabled INTEGER NOT NULL, PRIMARY KEY CLUSTERED (service_name, cluster_id)); CREATE TABLE clusterstate (cluster_id BIGINT NOT NULL, current_cluster_state VARCHAR(255) NOT NULL, current_stack_version VARCHAR(255) NOT NULL, PRIMARY KEY CLUSTERED (cluster_id)); CREATE TABLE cluster_version (id BIGINT NOT NULL, cluster_id BIGINT NOT NULL, repo_version_id BIGINT NOT NULL, state VARCHAR(255) NOT NULL, start_time BIGINT NOT NULL, end_time BIGINT, user_name VARCHAR(255), PRIMARY KEY (id)); - -CREATE TABLE hostcomponentdesiredstate ( - cluster_id BIGINT NOT NULL, - component_name VARCHAR(255) NOT NULL, - desired_stack_version VARCHAR(255) NOT NULL, - desired_state VARCHAR(255) NOT NULL, - host_id BIGINT NOT NULL, - service_name VARCHAR(255) NOT NULL, - admin_state VARCHAR(32), - maintenance_state VARCHAR(32) NOT NULL, - security_state VARCHAR(32) NOT NULL DEFAULT 'UNSECURED', - restart_required BIT NOT NULL DEFAULT 0, - PRIMARY KEY CLUSTERED (cluster_id, component_name, host_id, service_name)); +CREATE TABLE hostcomponentdesiredstate (cluster_id BIGINT NOT NULL, component_name VARCHAR(255) NOT NULL, desired_stack_version VARCHAR(255) NOT NULL, desired_state VARCHAR(255) NOT NULL, host_name VARCHAR(255) NOT NULL, service_name VARCHAR(255) NOT NULL, admin_state VARCHAR(32), maintenance_state VARCHAR(32) NOT NULL, security_state VARCHAR(32) NOT NULL DEFAULT 'UNSECURED', restart_required BIT NOT NULL DEFAULT 0, PRIMARY KEY CLUSTERED (cluster_id, component_name, host_name, service_name)); CREATE TABLE hostcomponentstate ( cluster_id BIGINT NOT NULL, @@ -168,7 +156,8 @@ ALTER TABLE clusterconfigmapping ADD CONSTRAINT clusterconfigmappingcluster_id F ALTER TABLE clusterstate ADD CONSTRAINT FK_clusterstate_cluster_id FOREIGN KEY (cluster_id) REFERENCES clusters (cluster_id); ALTER TABLE cluster_version ADD CONSTRAINT FK_cluster_version_cluster_id FOREIGN KEY (cluster_id) REFERENCES clusters (cluster_id); ALTER TABLE cluster_version ADD CONSTRAINT FK_cluster_version_repovers_id FOREIGN KEY (repo_version_id) REFERENCES repo_version (repo_version_id); -ALTER TABLE hostcomponentdesiredstate ADD CONSTRAINT hstcmponentdesiredstatehstid FOREIGN KEY (host_id) REFERENCES hosts (host_id); +ALTER TABLE hostcomponentdesiredstate ADD CONSTRAINT hstcmponentdesiredstatehstname FOREIGN KEY (host_name) REFERENCES hosts (host_name); +--ALTER TABLE hostcomponentdesiredstate ADD CONSTRAINT hstcmponentdesiredstatehstid FOREIGN KEY (host_id) REFERENCES hosts (host_id); ALTER TABLE hostcomponentdesiredstate ADD CONSTRAINT hstcmpnntdesiredstatecmpnntnme FOREIGN KEY (component_name, cluster_id, service_name) REFERENCES servicecomponentdesiredstate (component_name, cluster_id, service_name); ALTER TABLE hostcomponentstate ADD CONSTRAINT hstcomponentstatecomponentname FOREIGN KEY (component_name, cluster_id, service_name) REFERENCES servicecomponentdesiredstate (component_name, cluster_id, service_name); ALTER TABLE hostcomponentstate ADD CONSTRAINT FK_hostcomponentstate_host_id FOREIGN KEY (host_id) REFERENCES hosts (host_id); http://git-wip-us.apache.org/repos/asf/ambari/blob/926e1586/ambari-server/src/main/resources/Ambari-DDL-SQLServer-DROP.sql -- diff --git a/ambari-server/sr
ambari git commit: BUG-34134 - [WinTP2] sql exception during cluster deploy
Repository: ambari Updated Branches: refs/heads/trunk ad8e9ea8c -> 3640b6cd6 BUG-34134 - [WinTP2] sql exception during cluster deploy Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3640b6cd Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3640b6cd Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3640b6cd Branch: refs/heads/trunk Commit: 3640b6cd65395b4d6281a21d253a4c66f05cd424 Parents: ad8e9ea Author: Artem Baranchuk Authored: Tue Apr 7 10:14:24 2015 +0300 Committer: Artem Baranchuk Committed: Tue Apr 7 10:14:24 2015 +0300 -- .../main/resources/Ambari-DDL-SQLServer-CREATE.sql | 17 ++--- .../main/resources/Ambari-DDL-SQLServer-DROP.sql | 2 ++ 2 files changed, 16 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3640b6cd/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql -- diff --git a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql index 01c6a0c..53bfb68 100644 --- a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql +++ b/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql @@ -40,7 +40,19 @@ CREATE TABLE clusterconfigmapping (cluster_id BIGINT NOT NULL, type_name VARCHAR CREATE TABLE clusterservices (service_name VARCHAR(255) NOT NULL, cluster_id BIGINT NOT NULL, service_enabled INTEGER NOT NULL, PRIMARY KEY CLUSTERED (service_name, cluster_id)); CREATE TABLE clusterstate (cluster_id BIGINT NOT NULL, current_cluster_state VARCHAR(255) NOT NULL, current_stack_version VARCHAR(255) NOT NULL, PRIMARY KEY CLUSTERED (cluster_id)); CREATE TABLE cluster_version (id BIGINT NOT NULL, cluster_id BIGINT NOT NULL, repo_version_id BIGINT NOT NULL, state VARCHAR(255) NOT NULL, start_time BIGINT NOT NULL, end_time BIGINT, user_name VARCHAR(255), PRIMARY KEY (id)); -CREATE TABLE hostcomponentdesiredstate (cluster_id BIGINT NOT NULL, component_name VARCHAR(255) NOT NULL, desired_stack_version VARCHAR(255) NOT NULL, desired_state VARCHAR(255) NOT NULL, host_name VARCHAR(255) NOT NULL, service_name VARCHAR(255) NOT NULL, admin_state VARCHAR(32), maintenance_state VARCHAR(32) NOT NULL, security_state VARCHAR(32) NOT NULL DEFAULT 'UNSECURED', restart_required BIT NOT NULL DEFAULT 0, PRIMARY KEY CLUSTERED (cluster_id, component_name, host_name, service_name)); + +CREATE TABLE hostcomponentdesiredstate ( + cluster_id BIGINT NOT NULL, + component_name VARCHAR(255) NOT NULL, + desired_stack_version VARCHAR(255) NOT NULL, + desired_state VARCHAR(255) NOT NULL, + host_id BIGINT NOT NULL, + service_name VARCHAR(255) NOT NULL, + admin_state VARCHAR(32), + maintenance_state VARCHAR(32) NOT NULL, + security_state VARCHAR(32) NOT NULL DEFAULT 'UNSECURED', + restart_required BIT NOT NULL DEFAULT 0, + PRIMARY KEY CLUSTERED (cluster_id, component_name, host_id, service_name)); CREATE TABLE hostcomponentstate ( cluster_id BIGINT NOT NULL, @@ -156,8 +168,7 @@ ALTER TABLE clusterconfigmapping ADD CONSTRAINT clusterconfigmappingcluster_id F ALTER TABLE clusterstate ADD CONSTRAINT FK_clusterstate_cluster_id FOREIGN KEY (cluster_id) REFERENCES clusters (cluster_id); ALTER TABLE cluster_version ADD CONSTRAINT FK_cluster_version_cluster_id FOREIGN KEY (cluster_id) REFERENCES clusters (cluster_id); ALTER TABLE cluster_version ADD CONSTRAINT FK_cluster_version_repovers_id FOREIGN KEY (repo_version_id) REFERENCES repo_version (repo_version_id); -ALTER TABLE hostcomponentdesiredstate ADD CONSTRAINT hstcmponentdesiredstatehstname FOREIGN KEY (host_name) REFERENCES hosts (host_name); ---ALTER TABLE hostcomponentdesiredstate ADD CONSTRAINT hstcmponentdesiredstatehstid FOREIGN KEY (host_id) REFERENCES hosts (host_id); +ALTER TABLE hostcomponentdesiredstate ADD CONSTRAINT hstcmponentdesiredstatehstid FOREIGN KEY (host_id) REFERENCES hosts (host_id); ALTER TABLE hostcomponentdesiredstate ADD CONSTRAINT hstcmpnntdesiredstatecmpnntnme FOREIGN KEY (component_name, cluster_id, service_name) REFERENCES servicecomponentdesiredstate (component_name, cluster_id, service_name); ALTER TABLE hostcomponentstate ADD CONSTRAINT hstcomponentstatecomponentname FOREIGN KEY (component_name, cluster_id, service_name) REFERENCES servicecomponentdesiredstate (component_name, cluster_id, service_name); ALTER TABLE hostcomponentstate ADD CONSTRAINT FK_hostcomponentstate_host_id FOREIGN KEY (host_id) REFERENCES hosts (host_id); http://git-wip-us.apache.org/repos/asf/ambari/blob/3640b6cd/ambari-server/src/main/resources/Ambari-DDL-SQLServer-DROP.sql -- diff --git a/ambari-server/src/main/
ambari git commit: AMBARI-10114 - [WinTP2] Automatic Bootstrap Ambari Agent Create the bootstrap script dependencies archive at build time (fixed linux build)
Repository: ambari Updated Branches: refs/heads/trunk 78eb54849 -> f54d75b8b AMBARI-10114 - [WinTP2] Automatic Bootstrap Ambari Agent Create the bootstrap script dependencies archive at build time (fixed linux build) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f54d75b8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f54d75b8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f54d75b8 Branch: refs/heads/trunk Commit: f54d75b8b2b0e5a747c49c34849e82cabc1c57fc Parents: 78eb548 Author: Artem Baranchuk Authored: Mon Mar 23 19:16:33 2015 +0200 Committer: Artem Baranchuk Committed: Mon Mar 23 19:35:46 2015 +0200 -- ambari-server/pom.xml | 68 +- 1 file changed, 43 insertions(+), 25 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f54d75b8/ambari-server/pom.xml -- diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml index 0ac21bf..18593bd 100644 --- a/ambari-server/pom.xml +++ b/ambari-server/pom.xml @@ -134,40 +134,17 @@ maven-assembly-plugin - ../ambari-project/src/main/assemblies/empty.xml +${assemblydescriptor} + gnu -bootstrap-zip -prepare-package - - single - - - false - bootstrap - false - gnu - -${assemblybootstrap} - - - - build-tarball package single - - false - true - gnu - -${assemblydescriptor} - - @@ -1338,6 +1315,47 @@ +maven-assembly-plugin + + + ../ambari-project/src/main/assemblies/empty.xml + + + + +bootstrap-zip +prepare-package + + single + + + false + bootstrap + false + gnu + +${assemblybootstrap} + + + + +build-tarball +package + + single + + + false + true + gnu + +${assemblydescriptor} + + + + + + org.codehaus.mojo exec-maven-plugin 1.2
ambari git commit: AMBARI-10114 - [WinTP2] Automatic Bootstrap Ambari Agent Create the bootstrap script dependencies archive at build time
Repository: ambari Updated Branches: refs/heads/trunk 360d4c814 -> a67afa945 AMBARI-10114 - [WinTP2] Automatic Bootstrap Ambari Agent Create the bootstrap script dependencies archive at build time Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a67afa94 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a67afa94 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a67afa94 Branch: refs/heads/trunk Commit: a67afa9450306e4bc22e03d5a18ffcd8aae6abf6 Parents: 360d4c8 Author: Artem Baranchuk Authored: Wed Mar 18 01:31:09 2015 +0200 Committer: Artem Baranchuk Committed: Mon Mar 23 16:56:06 2015 +0200 -- ambari-server/pom.xml | 28 +-- .../src/main/assemblies/bootstrap-windows.xml | 36 .../src/main/assemblies/server-windows.xml | 8 ++--- 3 files changed, 66 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a67afa94/ambari-server/pom.xml -- diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml index b855cc4..0ac21bf 100644 --- a/ambari-server/pom.xml +++ b/ambari-server/pom.xml @@ -134,17 +134,40 @@ maven-assembly-plugin -${assemblydescriptor} + ../ambari-project/src/main/assemblies/empty.xml - gnu +bootstrap-zip +prepare-package + + single + + + false + bootstrap + false + gnu + +${assemblybootstrap} + + + + build-tarball package single + + false + true + gnu + +${assemblydescriptor} + + @@ -1309,6 +1332,7 @@ .cmd ${project.basedir}\..\ambari-common\src\main\python;${project.basedir}\..\ambari-agent\src\main\python;${project.basedir}\..\ambari-common\src\main\python\ambari_jinja2;${project.basedir}\..\ambari-common\src\main\python\ambari_commons;${project.basedir}\..\ambari-common\src\test\python;${project.basedir}\src\main\python;${project.basedir}\src\main\python\ambari-server-state;${project.basedir}\src\main\resources\custom_actions;${project.basedir}\src\main\resources\scripts;${project.basedir}\src\test\python src/main/assemblies/server-windows.xml + src/main/assemblies/bootstrap-windows.xml jar http://git-wip-us.apache.org/repos/asf/ambari/blob/a67afa94/ambari-server/src/main/assemblies/bootstrap-windows.xml -- diff --git a/ambari-server/src/main/assemblies/bootstrap-windows.xml b/ambari-server/src/main/assemblies/bootstrap-windows.xml new file mode 100644 index 000..8c38bc8 --- /dev/null +++ b/ambari-server/src/main/assemblies/bootstrap-windows.xml @@ -0,0 +1,36 @@ + + + + bootstrap + +zip + + false + + + ${basedir}/src/main/python/setupAgent.py + + + + + ${basedir}/../ambari-common/src/main/python/ambari_commons + ambari_commons + + + http://git-wip-us.apache.org/repos/asf/ambari/blob/a67afa94/ambari-server/src/main/assemblies/server-windows.xml -- diff --git a/ambari-server/src/main/assemblies/server-windows.xml b/ambari-server/src/main/assemblies/server-windows.xml index d3fa7cb..8b5483a 100644 --- a/ambari-server/src/main/assemblies/server-windows.xml +++ b/ambari-server/src/main/assemblies/server-windows.xml @@ -32,6 +32,10 @@ ambari-server-${project.version}/resources + ${project.build.directory}/bootstrap.zip + /ambari-server-${project.version}/bootstrap + + ${basedir}/conf/windows/ambari.properties /ambari-server-${project.version}/conf @@ -60,10 +64,6 @@ /ambari-server-${project.version}/bootstrap - ${basedir}/src/main/python/setupAgent.py - /ambari-server-${project.version}/bootstrap - - ${basedir}/src/main/windows/ambari-server.cmd /ambari-server-${project.version}
ambari git commit: AMBARI-9272 - [WinGA] Views Files, Capacity-Scheduler, Pig views do not compile on Windows
Repository: ambari Updated Branches: refs/heads/trunk 4f84615da -> 9a2214f1c AMBARI-9272 - [WinGA] Views Files, Capacity-Scheduler, Pig views do not compile on Windows Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9a2214f1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9a2214f1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9a2214f1 Branch: refs/heads/trunk Commit: 9a2214f1c0388b8f3df5c29b2d4fb4bcf70bf799 Parents: 4f84615 Author: Artem Baranchuk Authored: Fri Mar 13 12:57:41 2015 +0200 Committer: Artem Baranchuk Committed: Tue Mar 17 12:45:43 2015 +0200 -- contrib/views/capacity-scheduler/pom.xml| 85 ++-- .../src/main/resources/ui/package.json | 3 +- contrib/views/files/pom.xml | 129 +-- .../files/src/main/resources/ui/package.json| 5 +- contrib/views/pig/pom.xml | 85 ++-- .../src/main/resources/ui/pig-web/package.json | 3 +- 6 files changed, 238 insertions(+), 72 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9a2214f1/contrib/views/capacity-scheduler/pom.xml -- diff --git a/contrib/views/capacity-scheduler/pom.xml b/contrib/views/capacity-scheduler/pom.xml index 57effe8..2712953 100644 --- a/contrib/views/capacity-scheduler/pom.xml +++ b/contrib/views/capacity-scheduler/pom.xml @@ -78,13 +78,31 @@ +org.apache.maven.plugins +maven-clean-plugin +2.5 + + + + ${ui.directory} + false + +public/** +node_modules/** +bower_components/** +node/** + + + + + + com.github.eirslett frontend-maven-plugin 0.0.14 -src/main/resources/ui +${ui.directory} - install node and npm @@ -92,22 +110,20 @@ install-node-and-npm -generate-resources +initialize v0.10.26 1.4.3 - npm install +npm install npm - generate-resources - -install --unsafe-perm --registry=http://registry.npmjs.eu + install --unsafe-perm --registry=http://registry.npmjs.eu @@ -117,21 +133,38 @@ org.codehaus.mojo 1.2.1 - + +node gyp executable +initialize + + exec + + + ${skip.nodegyp.chmod} + ${ui.directory} + chmod + ++x + ${ui.directory}/node/npm/bin/node-gyp-bin/node-gyp + + + + Brunch build generate-resources exec - ${basedir}/src/main/resources/ui - node/node + ${ui.directory} + ${ui.directory}/node/${node.executable} -node_modules/.bin/brunch +node_modules/brunch/bin/brunch build +--production - + @@ -244,4 +277,30 @@ - + + +windows + + +win + + + + node.exe + true + + + +linux + + +unix + + + + node + false + + + + http://git-wip-us.apache.org/repos/asf/ambari/blob/9a2214f1/contrib/views/capacity-scheduler/src/main/resources/ui/package.json -- diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/package.json b/contrib/views/capacity-scheduler/src/main/resources/ui/package.json index 11737d4..47f29b7 100644 --- a/contrib/views/capacity-scheduler/src/main/resources/ui/package.json +++ b/contrib/views/capacity-scheduler/src/main/resources/ui/package.json @@ -12,8 +12,7 @@ }, "scripts": { "start": "brunch watch --server", -"preinstall": "chmod +x node/npm/bin/node-gyp-bin/node-gyp", -"postinstall" : "bash node/with_new_path.sh node node_modules/.bin/bower --allow-root install" +"postinstall" : "bower --a
ambari git commit: AMBARI-9782 - Add metrics.json for AMBARI_METRICS service
Repository: ambari Updated Branches: refs/heads/branch-2.0.0 11f30ba26 -> 9b86ebdb6 AMBARI-9782 - Add metrics.json for AMBARI_METRICS service Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9b86ebdb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9b86ebdb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9b86ebdb Branch: refs/heads/branch-2.0.0 Commit: 9b86ebdb672660ccc61a81585f2e037c75177b26 Parents: 11f30ba Author: Artem Baranchuk Authored: Wed Feb 25 15:39:50 2015 +0200 Committer: Artem Baranchuk Committed: Wed Feb 25 15:40:06 2015 +0200 -- .../AMBARI_METRICS/0.1.0/metrics.json | 508 +++ 1 file changed, 508 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9b86ebdb/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/metrics.json -- diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/metrics.json b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/metrics.json new file mode 100644 index 000..9b8e1f4 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/metrics.json @@ -0,0 +1,508 @@ +{ + "METRICS_COLLECTOR": { +"Component": [ + { +"type": "ganglia", +"metrics": { + "metrics/hbase/ipc/ProcessCallTime_75th_percentile": {"metric": "ipc.IPC.ProcessCallTime_75th_percentile", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/ProcessCallTime_95th_percentile": {"metric": "ipc.IPC.ProcessCallTime_95th_percentile", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/ProcessCallTime_99th_percentile": {"metric": "ipc.IPC.ProcessCallTime_99th_percentile", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/ProcessCallTime_max": {"metric": "ipc.IPC.ProcessCallTime_max", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/ProcessCallTime_mean": {"metric": "ipc.IPC.ProcessCallTime_mean", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/ProcessCallTime_median": {"metric": "ipc.IPC.ProcessCallTime_median", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/ProcessCallTime_min": {"metric": "ipc.IPC.ProcessCallTime_min", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/ProcessCallTime_num_ops": {"metric": "ipc.IPC.ProcessCallTime_num_ops", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/QueueCallTime_75th_percentile": {"metric": "ipc.IPC.QueueCallTime_75th_percentile", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/QueueCallTime_95th_percentile": {"metric": "ipc.IPC.QueueCallTime_95th_percentile", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/QueueCallTime_99th_percentile": {"metric": "ipc.IPC.QueueCallTime_99th_percentile", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/QueueCallTime_max": {"metric": "ipc.IPC.QueueCallTime_max", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/QueueCallTime_mean": {"metric": "ipc.IPC.QueueCallTime_mean", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/QueueCallTime_median": {"metric": "ipc.IPC.QueueCallTime_median", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/QueueCallTime_min": {"metric": "ipc.IPC.QueueCallTime_min", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/QueueCallTime_num_ops": {"metric": "ipc.IPC.QueueCallTime_num_ops", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/authenticationFailures": {"metric": "ipc.IPC.authenticationFailures", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/authenticationSuccesses": {"metric": "ipc.IPC.authenticationSuccesses", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/authorizationFailures": {"metric": "ipc.IPC.authorizationFailures", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/authorizationSuccesses": {"metric": "ipc.IPC.authorizationSuccesses", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/numActiveHandler": {"metric": "ipc.IPC.numActiveHandler", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/numCallsInGeneralQueue": {"metric": "ipc.IPC.numCallsInGeneralQueue", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/numCallsInPriorityQueue": {"metric": "ipc.IPC.numCallsInPriorityQueue", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/numCallsInReplicationQueue": {"metric": "ipc.IPC.numCallsInReplicationQueue", "pointInTime": true, "temporal": t
ambari git commit: AMBARI-9782 - Add metrics.json for AMBARI_METRICS service
Repository: ambari Updated Branches: refs/heads/trunk b900461e7 -> b1b585747 AMBARI-9782 - Add metrics.json for AMBARI_METRICS service Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b1b58574 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b1b58574 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b1b58574 Branch: refs/heads/trunk Commit: b1b5857471a806a3501157a1cc6a4d1a1c078c12 Parents: b900461 Author: Artem Baranchuk Authored: Tue Feb 24 18:51:11 2015 +0200 Committer: Artem Baranchuk Committed: Wed Feb 25 15:35:33 2015 +0200 -- .../AMBARI_METRICS/0.1.0/metrics.json | 508 +++ 1 file changed, 508 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b1b58574/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/metrics.json -- diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/metrics.json b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/metrics.json new file mode 100644 index 000..9b8e1f4 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/metrics.json @@ -0,0 +1,508 @@ +{ + "METRICS_COLLECTOR": { +"Component": [ + { +"type": "ganglia", +"metrics": { + "metrics/hbase/ipc/ProcessCallTime_75th_percentile": {"metric": "ipc.IPC.ProcessCallTime_75th_percentile", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/ProcessCallTime_95th_percentile": {"metric": "ipc.IPC.ProcessCallTime_95th_percentile", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/ProcessCallTime_99th_percentile": {"metric": "ipc.IPC.ProcessCallTime_99th_percentile", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/ProcessCallTime_max": {"metric": "ipc.IPC.ProcessCallTime_max", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/ProcessCallTime_mean": {"metric": "ipc.IPC.ProcessCallTime_mean", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/ProcessCallTime_median": {"metric": "ipc.IPC.ProcessCallTime_median", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/ProcessCallTime_min": {"metric": "ipc.IPC.ProcessCallTime_min", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/ProcessCallTime_num_ops": {"metric": "ipc.IPC.ProcessCallTime_num_ops", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/QueueCallTime_75th_percentile": {"metric": "ipc.IPC.QueueCallTime_75th_percentile", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/QueueCallTime_95th_percentile": {"metric": "ipc.IPC.QueueCallTime_95th_percentile", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/QueueCallTime_99th_percentile": {"metric": "ipc.IPC.QueueCallTime_99th_percentile", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/QueueCallTime_max": {"metric": "ipc.IPC.QueueCallTime_max", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/QueueCallTime_mean": {"metric": "ipc.IPC.QueueCallTime_mean", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/QueueCallTime_median": {"metric": "ipc.IPC.QueueCallTime_median", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/QueueCallTime_min": {"metric": "ipc.IPC.QueueCallTime_min", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/QueueCallTime_num_ops": {"metric": "ipc.IPC.QueueCallTime_num_ops", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/authenticationFailures": {"metric": "ipc.IPC.authenticationFailures", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/authenticationSuccesses": {"metric": "ipc.IPC.authenticationSuccesses", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/authorizationFailures": {"metric": "ipc.IPC.authorizationFailures", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/authorizationSuccesses": {"metric": "ipc.IPC.authorizationSuccesses", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/numActiveHandler": {"metric": "ipc.IPC.numActiveHandler", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/numCallsInGeneralQueue": {"metric": "ipc.IPC.numCallsInGeneralQueue", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/numCallsInPriorityQueue": {"metric": "ipc.IPC.numCallsInPriorityQueue", "pointInTime": true, "temporal": true}, + "metrics/hbase/ipc/numCallsInReplicationQueue": {"metric": "ipc.IPC.numCallsInReplicationQueue", "pointInTime": true, "temporal": true}, +
[2/3] ambari git commit: AMBARI-9748 - Remove cpu amd memory metrics from metrics.jsone files because they are generated by AMS
AMBARI-9748 - Remove cpu amd memory metrics from metrics.jsone files because they are generated by AMS Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/31335a84 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/31335a84 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/31335a84 Branch: refs/heads/branch-2.0.0 Commit: 31335a84e5499501d7a002be6fcd31f1c4fd0ea5 Parents: a3e1edb Author: Artem Baranchuk Authored: Tue Feb 24 14:42:33 2015 +0200 Committer: Artem Baranchuk Committed: Tue Feb 24 14:42:33 2015 +0200 -- .../HBASE/0.96.0.2.0/metrics.json | 390 - .../common-services/HDFS/2.1.0.2.0/metrics.json | 410 -- .../STORM/0.9.1.2.1/metrics.json| 284 - .../common-services/YARN/2.1.0.2.0/metrics.json | 420 --- 4 files changed, 1504 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/31335a84/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metrics.json -- diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metrics.json b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metrics.json index 870aa38..9ebef8a 100644 --- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metrics.json +++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metrics.json @@ -229,11 +229,6 @@ "pointInTime": true, "temporal": true }, - "metrics/memory/mem_total": { -"metric": "mem_total", -"pointInTime": true, -"temporal": true - }, "metrics/jvm/memHeapCommittedM": { "metric": "jvm.JvmMetrics.MemHeapCommittedM", "pointInTime": true, @@ -334,11 +329,6 @@ "pointInTime": true, "temporal": true }, - "metrics/cpu/cpu_nice": { -"metric": "cpu_nice", -"pointInTime": true, -"temporal": true - }, "metrics/rpc/unassign_avg_time": { "metric": "rpc.rpc.unassign_avg_time", "pointInTime": true, @@ -634,11 +624,6 @@ "pointInTime": false, "temporal": true }, - "metrics/memory/mem_free": { -"metric": "mem_free", -"pointInTime": true, -"temporal": true - }, "metrics/rpc/execCoprocessor/aboveOneSec/_avg_time": { "metric": "rpc.rpc.execCoprocessor.aboveOneSec._avg_time", "pointInTime": true, @@ -694,11 +679,6 @@ "pointInTime": true, "temporal": true }, - "metrics/memory/mem_cached": { -"metric": "mem_cached", -"pointInTime": true, -"temporal": true - }, "metrics/rpc/getConfiguration/aboveOneSec/_num_ops": { "metric": "rpc.rpc.getConfiguration.aboveOneSec._num_ops", "pointInTime": true, @@ -909,16 +889,6 @@ "pointInTime": true, "temporal": true }, - "metrics/cpu/cpu_user": { -"metric": "cpu_user", -"pointInTime": true, -"temporal": true - }, - "metrics/memory/swap_free": { -"metric": "swap_free", -"pointInTime": true, -"temporal": true - }, "metrics/rpc/regionServerReport_num_ops": { "metric": "rpc.rpc.regionServerReport_num_ops", "pointInTime": true, @@ -974,11 +944,6 @@ "pointInTime": false, "temporal": true }, - "metrics/memory/mem_shared": { -"metric": "mem_shared", -"pointInTime": true, -"temporal": true - }, "metrics/rpc/abort_num_ops": { "metric": "rpc.rpc.abort_num_ops", "pointInTime": true, @@ -1004,11 +969,6 @@ "pointInTime": true, "temporal": true }, - "metrics/cpu/cpu_num": { -"metric": "cpu_num", -"pointInTime": true, -"temporal": true - }, "metrics/rpc/rollHLogWriter_num_ops": { "metric": "rpc.rpc.rollHLogWriter_num_ops", "pointInTime": true, @@ -1154,11 +1114,6 @@ "pointInTime": true, "temporal": true }, - "metrics/cpu/cpu_idle": { -"metric": "cpu_idle", -"pointInTime": true, -"temporal": true - }, "metrics/hbase/regionserver/getRequestLatency_75th_percentile": { "metric": "regionserver.Server.Get_75th_per
[3/3] ambari git commit: AMBARI-9758 - AMS: when Add Service for AMS, the first service check fails
AMBARI-9758 - AMS: when Add Service for AMS, the first service check fails Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0f433484 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0f433484 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0f433484 Branch: refs/heads/branch-2.0.0 Commit: 0f433484aac8a47ba923cf6f51d596bb4ac949f6 Parents: 31335a8 Author: Artem Baranchuk Authored: Tue Feb 24 14:43:49 2015 +0200 Committer: Artem Baranchuk Committed: Tue Feb 24 14:43:49 2015 +0200 -- .../0.1.0/package/scripts/service_check.py | 32 1 file changed, 19 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0f433484/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/service_check.py -- diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/service_check.py index 7954f8c..e5ee7f9 100644 --- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/service_check.py @@ -38,7 +38,7 @@ import socket class AMSServiceCheck(Script): AMS_METRICS_POST_URL = "/ws/v1/timeline/metrics/" AMS_METRICS_GET_URL = "/ws/v1/timeline/metrics?%s" - AMS_CONNECT_TRIES = 3 + AMS_CONNECT_TRIES = 5 AMS_CONNECT_TIMEOUT = 10 @OsFamilyFuncImpl(os_family=OSConst.WINSRV_FAMILY) @@ -83,29 +83,35 @@ class AMSServiceCheck(Script): conn = httplib.HTTPConnection(params.ams_collector_host_single, int(params.metric_collector_port)) conn.request("POST", self.AMS_METRICS_POST_URL, metric_json, headers) -break except (httplib.HTTPException, socket.error) as ex: if i < self.AMS_CONNECT_TRIES - 1: #range/xrange returns items from start to end-1 time.sleep(self.AMS_CONNECT_TIMEOUT) Logger.info("Connection failed. Next retry in %s seconds." % (self.AMS_CONNECT_TIMEOUT)) + continue else: raise Fail("Metrics were not saved. Service check has failed. " "\nConnection failed.") -response = conn.getresponse() -Logger.info("Http response: %s %s" % (response.status, response.reason)) + response = conn.getresponse() + Logger.info("Http response: %s %s" % (response.status, response.reason)) -data = response.read() -Logger.info("Http data: %s" % data) -conn.close() + data = response.read() + Logger.info("Http data: %s" % data) + conn.close() -if response.status == 200: - Logger.info("Metrics were saved.") -else: - Logger.info("Metrics were not saved. Service check has failed.") - raise Fail("Metrics were not saved. Service check has failed. POST request status: %s %s \n%s" % - (response.status, response.reason, data)) + if response.status == 200: +Logger.info("Metrics were saved.") +break + else: +Logger.info("Metrics were not saved. Service check has failed.") +if i < self.AMS_CONNECT_TRIES - 1: #range/xrange returns items from start to end-1 + time.sleep(self.AMS_CONNECT_TIMEOUT) + Logger.info("Next retry in %s seconds." + % (self.AMS_CONNECT_TIMEOUT)) +else: + raise Fail("Metrics were not saved. Service check has failed. POST request status: %s %s \n%s" % + (response.status, response.reason, data)) get_metrics_parameters = { "metricNames": "AMBARI_METRICS.SmokeTest.FakeMetric",
[1/3] ambari git commit: AMBARI-9748 - Remove cpu amd memory metrics from metrics.jsone files because they are generated by AMS
Repository: ambari Updated Branches: refs/heads/branch-2.0.0 a3e1edb33 -> 0f433484a http://git-wip-us.apache.org/repos/asf/ambari/blob/31335a84/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/metrics.json -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/metrics.json b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/metrics.json index 5d8309d..604987f 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/metrics.json +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/metrics.json @@ -4,11 +4,6 @@ { "type": "ganglia", "metrics": { - "metrics/memory/mem_total": { -"metric": "mem_total", -"pointInTime": true, -"temporal": true - }, "metrics/jvm/memHeapCommittedM": { "metric": "jvm.JvmMetrics.MemHeapCommittedM", "pointInTime": false, @@ -94,11 +89,6 @@ "pointInTime": false, "temporal": true }, - "metrics/cpu/cpu_nice": { -"metric": "cpu_nice", -"pointInTime": true, -"temporal": true - }, "metrics/jvm/threadsBlocked": { "metric": "jvm.JvmMetrics.ThreadsBlocked", "pointInTime": false, @@ -139,11 +129,6 @@ "pointInTime": false, "temporal": true }, - "metrics/disk/disk_free": { -"metric": "disk_free", -"pointInTime": true, -"temporal": true - }, "metrics/mapred/ShuffleOutputsOK": { "metric": "mapred.ShuffleOutputsOK", "pointInTime": true, @@ -169,11 +154,6 @@ "pointInTime": false, "temporal": true }, - "metrics/cpu/cpu_idle": { -"metric": "cpu_idle", -"pointInTime": true, -"temporal": true - }, "metrics/yarn/AllocatedContainers": { "metric": "yarn.NodeManagerMetrics.AllocatedContainers", "pointInTime": true, @@ -194,26 +174,6 @@ "pointInTime": true, "temporal": true }, - "metrics/memory/mem_free": { -"metric": "mem_free", -"pointInTime": true, -"temporal": true - }, - "metrics/cpu/cpu_user": { -"metric": "cpu_user", -"pointInTime": true, -"temporal": true - }, - "metrics/memory/swap_free": { -"metric": "swap_free", -"pointInTime": true, -"temporal": true - }, - "metrics/cpu/cpu_system": { -"metric": "cpu_system", -"pointInTime": true, -"temporal": true - }, "metrics/network/bytes_in": { "metric": "bytes_in", "pointInTime": true, @@ -239,21 +199,11 @@ "pointInTime": false, "temporal": true }, - "metrics/memory/mem_cached": { -"metric": "mem_cached", -"pointInTime": true, -"temporal": true - }, "metrics/yarn/ContainersRunning": { "metric": "yarn.NodeManagerMetrics.ContainersRunning", "pointInTime": true, "temporal": true }, - "metrics/disk/disk_total": { -"metric": "disk_total", -"pointInTime": true, -"temporal": true - }, "metrics/jvm/logInfo": { "metric": "jvm.JvmMetrics.LogInfo", "pointInTime": false, @@ -274,11 +224,6 @@ "pointInTime": false, "temporal": true }, - "metrics/memory/mem_shared": { -"metric": "mem_shared", -"pointInTime": true, -"temporal": true - }, "metrics/yarn/AvailableGB": { "metric": "yarn.NodeManagerMetrics.AvailableGB", "pointInTime": true, @@ -289,11 +234,6 @@ "pointInTime": true, "temporal": true }, - "metrics/cpu/cpu_wio": { -"metric": "cpu_wio", -"pointInTime": true, -"temporal": true - }, "metrics/yarn/ContainersIniting": { "metric": "yarn.NodeManagerMetrics.ContainersIniting", "pointInTime": true, @@ -309,16 +249,6 @@ "pointInTime": false, "temporal": true }, - "metrics/cpu/cpu_num": { -"metric": "cpu_num", -"pointInTime": true, -"temporal": true - }, - "metrics/cpu/cpu_speed": { -"metric": "cpu_speed", -"pointInTime": true, -"temporal": true - }, "metrics/rpc/rpcAuthorizationSuccesses": {
[2/3] ambari git commit: AMBARI-9748 - Remove cpu amd memory metrics from metrics.jsone files because they are generated by AMS
AMBARI-9748 - Remove cpu amd memory metrics from metrics.jsone files because they are generated by AMS Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ec4d1b80 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ec4d1b80 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ec4d1b80 Branch: refs/heads/trunk Commit: ec4d1b808ad105cf2a38e4da7f4d52eaa46cc028 Parents: 6d90466 Author: Artem Baranchuk Authored: Mon Feb 23 15:02:32 2015 +0200 Committer: Artem Baranchuk Committed: Tue Feb 24 14:33:09 2015 +0200 -- .../HBASE/0.96.0.2.0/metrics.json | 390 - .../common-services/HDFS/2.1.0.2.0/metrics.json | 410 -- .../STORM/0.9.1.2.1/metrics.json| 284 - .../common-services/YARN/2.1.0.2.0/metrics.json | 420 --- 4 files changed, 1504 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ec4d1b80/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metrics.json -- diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metrics.json b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metrics.json index 870aa38..9ebef8a 100644 --- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metrics.json +++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metrics.json @@ -229,11 +229,6 @@ "pointInTime": true, "temporal": true }, - "metrics/memory/mem_total": { -"metric": "mem_total", -"pointInTime": true, -"temporal": true - }, "metrics/jvm/memHeapCommittedM": { "metric": "jvm.JvmMetrics.MemHeapCommittedM", "pointInTime": true, @@ -334,11 +329,6 @@ "pointInTime": true, "temporal": true }, - "metrics/cpu/cpu_nice": { -"metric": "cpu_nice", -"pointInTime": true, -"temporal": true - }, "metrics/rpc/unassign_avg_time": { "metric": "rpc.rpc.unassign_avg_time", "pointInTime": true, @@ -634,11 +624,6 @@ "pointInTime": false, "temporal": true }, - "metrics/memory/mem_free": { -"metric": "mem_free", -"pointInTime": true, -"temporal": true - }, "metrics/rpc/execCoprocessor/aboveOneSec/_avg_time": { "metric": "rpc.rpc.execCoprocessor.aboveOneSec._avg_time", "pointInTime": true, @@ -694,11 +679,6 @@ "pointInTime": true, "temporal": true }, - "metrics/memory/mem_cached": { -"metric": "mem_cached", -"pointInTime": true, -"temporal": true - }, "metrics/rpc/getConfiguration/aboveOneSec/_num_ops": { "metric": "rpc.rpc.getConfiguration.aboveOneSec._num_ops", "pointInTime": true, @@ -909,16 +889,6 @@ "pointInTime": true, "temporal": true }, - "metrics/cpu/cpu_user": { -"metric": "cpu_user", -"pointInTime": true, -"temporal": true - }, - "metrics/memory/swap_free": { -"metric": "swap_free", -"pointInTime": true, -"temporal": true - }, "metrics/rpc/regionServerReport_num_ops": { "metric": "rpc.rpc.regionServerReport_num_ops", "pointInTime": true, @@ -974,11 +944,6 @@ "pointInTime": false, "temporal": true }, - "metrics/memory/mem_shared": { -"metric": "mem_shared", -"pointInTime": true, -"temporal": true - }, "metrics/rpc/abort_num_ops": { "metric": "rpc.rpc.abort_num_ops", "pointInTime": true, @@ -1004,11 +969,6 @@ "pointInTime": true, "temporal": true }, - "metrics/cpu/cpu_num": { -"metric": "cpu_num", -"pointInTime": true, -"temporal": true - }, "metrics/rpc/rollHLogWriter_num_ops": { "metric": "rpc.rpc.rollHLogWriter_num_ops", "pointInTime": true, @@ -1154,11 +1114,6 @@ "pointInTime": true, "temporal": true }, - "metrics/cpu/cpu_idle": { -"metric": "cpu_idle", -"pointInTime": true, -"temporal": true - }, "metrics/hbase/regionserver/getRequestLatency_75th_percentile": { "metric": "regionserver.Server.Get_75th_percentile
[3/3] ambari git commit: AMBARI-9758 - When Add Service for AMS, the first service check fails
AMBARI-9758 - When Add Service for AMS, the first service check fails Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ac2990f4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ac2990f4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ac2990f4 Branch: refs/heads/trunk Commit: ac2990f4c337c0c1e4eaf85d398c146840ab57f6 Parents: ec4d1b8 Author: Artem Baranchuk Authored: Tue Feb 24 01:15:13 2015 +0200 Committer: Artem Baranchuk Committed: Tue Feb 24 14:33:10 2015 +0200 -- .../0.1.0/package/scripts/service_check.py | 32 1 file changed, 19 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ac2990f4/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/service_check.py -- diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/service_check.py index 7954f8c..e5ee7f9 100644 --- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/service_check.py @@ -38,7 +38,7 @@ import socket class AMSServiceCheck(Script): AMS_METRICS_POST_URL = "/ws/v1/timeline/metrics/" AMS_METRICS_GET_URL = "/ws/v1/timeline/metrics?%s" - AMS_CONNECT_TRIES = 3 + AMS_CONNECT_TRIES = 5 AMS_CONNECT_TIMEOUT = 10 @OsFamilyFuncImpl(os_family=OSConst.WINSRV_FAMILY) @@ -83,29 +83,35 @@ class AMSServiceCheck(Script): conn = httplib.HTTPConnection(params.ams_collector_host_single, int(params.metric_collector_port)) conn.request("POST", self.AMS_METRICS_POST_URL, metric_json, headers) -break except (httplib.HTTPException, socket.error) as ex: if i < self.AMS_CONNECT_TRIES - 1: #range/xrange returns items from start to end-1 time.sleep(self.AMS_CONNECT_TIMEOUT) Logger.info("Connection failed. Next retry in %s seconds." % (self.AMS_CONNECT_TIMEOUT)) + continue else: raise Fail("Metrics were not saved. Service check has failed. " "\nConnection failed.") -response = conn.getresponse() -Logger.info("Http response: %s %s" % (response.status, response.reason)) + response = conn.getresponse() + Logger.info("Http response: %s %s" % (response.status, response.reason)) -data = response.read() -Logger.info("Http data: %s" % data) -conn.close() + data = response.read() + Logger.info("Http data: %s" % data) + conn.close() -if response.status == 200: - Logger.info("Metrics were saved.") -else: - Logger.info("Metrics were not saved. Service check has failed.") - raise Fail("Metrics were not saved. Service check has failed. POST request status: %s %s \n%s" % - (response.status, response.reason, data)) + if response.status == 200: +Logger.info("Metrics were saved.") +break + else: +Logger.info("Metrics were not saved. Service check has failed.") +if i < self.AMS_CONNECT_TRIES - 1: #range/xrange returns items from start to end-1 + time.sleep(self.AMS_CONNECT_TIMEOUT) + Logger.info("Next retry in %s seconds." + % (self.AMS_CONNECT_TIMEOUT)) +else: + raise Fail("Metrics were not saved. Service check has failed. POST request status: %s %s \n%s" % + (response.status, response.reason, data)) get_metrics_parameters = { "metricNames": "AMBARI_METRICS.SmokeTest.FakeMetric",
[1/3] ambari git commit: AMBARI-9748 - Remove cpu amd memory metrics from metrics.jsone files because they are generated by AMS
Repository: ambari Updated Branches: refs/heads/trunk 6d90466f6 -> ac2990f4c http://git-wip-us.apache.org/repos/asf/ambari/blob/ec4d1b80/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/metrics.json -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/metrics.json b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/metrics.json index 5d8309d..604987f 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/metrics.json +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/metrics.json @@ -4,11 +4,6 @@ { "type": "ganglia", "metrics": { - "metrics/memory/mem_total": { -"metric": "mem_total", -"pointInTime": true, -"temporal": true - }, "metrics/jvm/memHeapCommittedM": { "metric": "jvm.JvmMetrics.MemHeapCommittedM", "pointInTime": false, @@ -94,11 +89,6 @@ "pointInTime": false, "temporal": true }, - "metrics/cpu/cpu_nice": { -"metric": "cpu_nice", -"pointInTime": true, -"temporal": true - }, "metrics/jvm/threadsBlocked": { "metric": "jvm.JvmMetrics.ThreadsBlocked", "pointInTime": false, @@ -139,11 +129,6 @@ "pointInTime": false, "temporal": true }, - "metrics/disk/disk_free": { -"metric": "disk_free", -"pointInTime": true, -"temporal": true - }, "metrics/mapred/ShuffleOutputsOK": { "metric": "mapred.ShuffleOutputsOK", "pointInTime": true, @@ -169,11 +154,6 @@ "pointInTime": false, "temporal": true }, - "metrics/cpu/cpu_idle": { -"metric": "cpu_idle", -"pointInTime": true, -"temporal": true - }, "metrics/yarn/AllocatedContainers": { "metric": "yarn.NodeManagerMetrics.AllocatedContainers", "pointInTime": true, @@ -194,26 +174,6 @@ "pointInTime": true, "temporal": true }, - "metrics/memory/mem_free": { -"metric": "mem_free", -"pointInTime": true, -"temporal": true - }, - "metrics/cpu/cpu_user": { -"metric": "cpu_user", -"pointInTime": true, -"temporal": true - }, - "metrics/memory/swap_free": { -"metric": "swap_free", -"pointInTime": true, -"temporal": true - }, - "metrics/cpu/cpu_system": { -"metric": "cpu_system", -"pointInTime": true, -"temporal": true - }, "metrics/network/bytes_in": { "metric": "bytes_in", "pointInTime": true, @@ -239,21 +199,11 @@ "pointInTime": false, "temporal": true }, - "metrics/memory/mem_cached": { -"metric": "mem_cached", -"pointInTime": true, -"temporal": true - }, "metrics/yarn/ContainersRunning": { "metric": "yarn.NodeManagerMetrics.ContainersRunning", "pointInTime": true, "temporal": true }, - "metrics/disk/disk_total": { -"metric": "disk_total", -"pointInTime": true, -"temporal": true - }, "metrics/jvm/logInfo": { "metric": "jvm.JvmMetrics.LogInfo", "pointInTime": false, @@ -274,11 +224,6 @@ "pointInTime": false, "temporal": true }, - "metrics/memory/mem_shared": { -"metric": "mem_shared", -"pointInTime": true, -"temporal": true - }, "metrics/yarn/AvailableGB": { "metric": "yarn.NodeManagerMetrics.AvailableGB", "pointInTime": true, @@ -289,11 +234,6 @@ "pointInTime": true, "temporal": true }, - "metrics/cpu/cpu_wio": { -"metric": "cpu_wio", -"pointInTime": true, -"temporal": true - }, "metrics/yarn/ContainersIniting": { "metric": "yarn.NodeManagerMetrics.ContainersIniting", "pointInTime": true, @@ -309,16 +249,6 @@ "pointInTime": false, "temporal": true }, - "metrics/cpu/cpu_num": { -"metric": "cpu_num", -"pointInTime": true, -"temporal": true - }, - "metrics/cpu/cpu_speed": { -"metric": "cpu_speed", -"pointInTime": true, -"temporal": true - }, "metrics/rpc/rpcAuthorizationSuccesses": {
[1/2] ambari git commit: AMBARI-9496 - Falcon and Pig service checks fails on Windows with Hadoop 2.2
Repository: ambari Updated Branches: refs/heads/trunk c6f4d069d -> 50ee8e029 AMBARI-9496 - Falcon and Pig service checks fails on Windows with Hadoop 2.2 Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/de026eb5 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/de026eb5 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/de026eb5 Branch: refs/heads/trunk Commit: de026eb5ece3459f45956a4b4ad85d383111973d Parents: c6f4d06 Author: Artem Baranchuk Authored: Thu Feb 5 18:07:48 2015 +0200 Committer: Artem Baranchuk Committed: Fri Feb 6 01:10:28 2015 +0200 -- .../after-INSTALL/templates/Run-SmokeTests.ps1 | 1 + .../configuration/falcon-startup.properties.xml | 3 +- .../YARN/configuration-mapred/mapred-site.xml | 58 3 files changed, 26 insertions(+), 36 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/de026eb5/ambari-server/src/main/resources/stacks/HDPWIN/2.1/hooks/after-INSTALL/templates/Run-SmokeTests.ps1 -- diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/hooks/after-INSTALL/templates/Run-SmokeTests.ps1 b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/hooks/after-INSTALL/templates/Run-SmokeTests.ps1 index a5c3631..5647ff9 100644 --- a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/hooks/after-INSTALL/templates/Run-SmokeTests.ps1 +++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/hooks/after-INSTALL/templates/Run-SmokeTests.ps1 @@ -114,6 +114,7 @@ function Run-PigSmokeTest $ts=Get-TimeStamp Write-Host "Pig smoke test - wordcount using hadoop.cmd file" $pigscript = Join-Path $ENV:TMP "script-$ts.pig" +Invoke-HadoopCmd "dfs -mkdir -p /user/hadoop/" Invoke-HadoopCmd "dfs -copyFromLocal $ENV:HADOOP_HOME\bin\hadoop.cmd hadoop-$ts" Add-Content $pigscript "A = load 'hadoop-$ts' using PigStorage(' ');" Add-Content $pigscript "B = foreach A generate `$0 as id;" http://git-wip-us.apache.org/repos/asf/ambari/blob/de026eb5/ambari-server/src/main/resources/stacks/HDPWIN/2.2/services/FALCON/configuration/falcon-startup.properties.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.2/services/FALCON/configuration/falcon-startup.properties.xml b/ambari-server/src/main/resources/stacks/HDPWIN/2.2/services/FALCON/configuration/falcon-startup.properties.xml index 7651c07..1e0659f 100644 --- a/ambari-server/src/main/resources/stacks/HDPWIN/2.2/services/FALCON/configuration/falcon-startup.properties.xml +++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.2/services/FALCON/configuration/falcon-startup.properties.xml @@ -33,8 +33,7 @@ org.apache.falcon.entity.store.ConfigurationStore,\ org.apache.falcon.rerun.service.RetryService,\ org.apache.falcon.rerun.service.LateRunService,\ - org.apache.falcon.service.LogCleanupService,\ - org.apache.falcon.metadata.MetadataMappingService + org.apache.falcon.service.LogCleanupService Falcon Services http://git-wip-us.apache.org/repos/asf/ambari/blob/de026eb5/ambari-server/src/main/resources/stacks/HDPWIN/2.2/services/YARN/configuration-mapred/mapred-site.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.2/services/YARN/configuration-mapred/mapred-site.xml b/ambari-server/src/main/resources/stacks/HDPWIN/2.2/services/YARN/configuration-mapred/mapred-site.xml index d2b7ee1..8a1cc24 100644 --- a/ambari-server/src/main/resources/stacks/HDPWIN/2.2/services/YARN/configuration-mapred/mapred-site.xml +++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.2/services/YARN/configuration-mapred/mapred-site.xml @@ -24,87 +24,77 @@ mapreduce.admin.user.env - LD_LIBRARY_PATH=/usr/hdp/${hdp.version}/hadoop/lib/native:/usr/hdp/${hdp.version}/hadoop/lib/native/Linux-amd64-64 - - Additional execution environment entries for map and reduce task processes. - This is not an additive property. You must preserve the original value if - you want your map and reduce tasks to have access to native libraries (compression, etc) - +true + + mapreduce.application.classpath - $PWD/mr-framework/hadoop/share/hadoop/mapreduce/*:$PWD/mr-framework/hadoop/share/hadoop/mapreduce/lib/*:$PWD/mr-framework/hadoop/share/hadoop/common/*:$PWD/mr-framework/hadoop/share/hadoop/common/lib/*:$PWD/mr-framework/hadoop/share/hadoop/yarn/*:$PWD/mr-framework/hadoop/share/hadoop/yarn/lib/*:$PWD/mr-framework/hadoop/share/hadoop/hdfs/*:$PWD/mr-framework/hadoop/share/hadoop/hdfs/lib/*:/usr/hdp/${hdp.version}/hadoop/lib/hadoop-lzo-0.6.0.${hdp
[2/2] ambari git commit: AMBARI-35 - Monarch: preupload oozie files not executed (Ivan Kozlov via abaranchuk)
AMBARI-35 - Monarch: preupload oozie files not executed (Ivan Kozlov via abaranchuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/50ee8e02 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/50ee8e02 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/50ee8e02 Branch: refs/heads/trunk Commit: 50ee8e02993e3d34ea46dc81dffbbf2c02348332 Parents: de026eb Author: Artem Baranchuk Authored: Fri Feb 6 01:19:20 2015 +0200 Committer: Artem Baranchuk Committed: Fri Feb 6 01:19:20 2015 +0200 -- .../src/main/resources/scripts/Ambaripreupload.py| 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/50ee8e02/ambari-server/src/main/resources/scripts/Ambaripreupload.py -- diff --git a/ambari-server/src/main/resources/scripts/Ambaripreupload.py b/ambari-server/src/main/resources/scripts/Ambaripreupload.py index 7a6bf67..89e0742 100644 --- a/ambari-server/src/main/resources/scripts/Ambaripreupload.py +++ b/ambari-server/src/main/resources/scripts/Ambaripreupload.py @@ -63,6 +63,8 @@ class params(): hadoop_conf_dir = "/etc/hadoop/conf" user_group = "hadoop" security_enabled = False + oozie_user = "oozie" + execute_path = "/usr/hdp/current/hadoop-client/bin" params = params() @@ -255,8 +257,17 @@ with Environment() as env: oozie_cmd = format("{put_shared_lib_to_hdfs_cmd} ; hadoop --config {hadoop_conf_dir} dfs -chmod -R 755 {oozie_hdfs_user_dir}/share") not_if_command = format("{kinit_if_needed} hadoop --config {hadoop_conf_dir} dfs -ls /user/oozie/share | awk 'BEGIN {{count=0;}} /share/ {{count++}} END {{if (count > 0) {{exit 0}} else {{exit 1'") - - #Execute(format("hadoop --config {hadoop_conf_dir} dfs -mkdir { + HdfsDirectory(format("{oozie_hdfs_user_dir}/share"), +action="create", +owner=oozie_user, +mode=0555, +conf_dir=params.hadoop_conf_dir, +hdfs_user=params.hdfs_user, +) + + Execute( oozie_cmd, user = params.oozie_user, not_if = not_if_command, + path = params.execute_path ) + copy_tarballs_to_hdfs("/usr/hdp/current/hadoop-client/mapreduce.tar.gz", "wasb:///hdp/apps/{{ hdp_stack_version }}/mapreduce/", 'hadoop-mapreduce-historyserver', params.mapred_user, params.hdfs_user, params.user_group) copy_tarballs_to_hdfs("/usr/hdp/current/tez-client/lib/tez.tar.gz", "wasb:///hdp/apps/{{ hdp_stack_version }}/tez/", 'hadoop-mapreduce-historyserver', params.mapred_user, params.hdfs_user, params.user_group) copy_tarballs_to_hdfs("/usr/hdp/current/hive-client/hive.tar.gz", "wasb:///hdp/apps/{{ hdp_stack_version }}/hive/", 'hadoop-mapreduce-historyserver', params.mapred_user, params.hdfs_user, params.user_group)
ambari git commit: AMBARI-9426 - Flume service check failed due to there is not the FLUME_HOST in the clusterHostInfo
Repository: ambari Updated Branches: refs/heads/trunk 65209687c -> 594daa406 AMBARI-9426 - Flume service check failed due to there is not the FLUME_HOST in the clusterHostInfo Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/594daa40 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/594daa40 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/594daa40 Branch: refs/heads/trunk Commit: 594daa40637be1ed138c05d20e4df8c2b3d681cf Parents: 6520968 Author: Artem Baranchuk Authored: Mon Feb 2 17:06:57 2015 +0200 Committer: Artem Baranchuk Committed: Mon Feb 2 17:42:37 2015 +0200 -- .../src/main/resources/Ambari-DDL-SQLServer-CREATE.sql| 7 +-- .../src/main/resources/Ambari-DDL-SQLServer-DROP.sql | 2 ++ .../stacks/HDPWIN/2.1/hooks/after-INSTALL/scripts/params.py | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/594daa40/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql -- diff --git a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql index ee62dcd..7c72037 100644 --- a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql +++ b/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql @@ -86,12 +86,7 @@ CREATE TABLE adminpermission (permission_id BIGINT NOT NULL, permission_name VAR CREATE TABLE adminprivilege (privilege_id BIGINT, permission_id BIGINT NOT NULL, resource_id BIGINT NOT NULL, principal_id BIGINT NOT NULL, PRIMARY KEY(privilege_id)); CREATE TABLE host_version (id BIGINT NOT NULL, repo_version_id BIGINT NOT NULL, host_name VARCHAR(255) NOT NULL, state VARCHAR(32) NOT NULL, PRIMARY KEY (id)); CREATE TABLE repo_version (repo_version_id BIGINT NOT NULL, stack VARCHAR(255) NOT NULL, version VARCHAR(255) NOT NULL, display_name VARCHAR(128) NOT NULL, upgrade_package VARCHAR(255) NOT NULL, repositories VARCHAR(MAX) NOT NULL, PRIMARY KEY(repo_version_id)); - -CREATE TABLE artifact ( - artifact_name VARCHAR(255) NOT NULL, - foreign_keys VARCHAR(255) NOT NULL, - artifact_data VARCHAR(MAX) NOT NULL, - PRIMARY KEY(artifact_name, foreign_keys)); +CREATE TABLE artifact (artifact_name VARCHAR(255) NOT NULL, artifact_data TEXT NOT NULL, foreign_keys VARCHAR(255) NOT NULL, PRIMARY KEY (artifact_name, foreign_keys)); -- altering tables by creating unique constraints-- altering tables to add constraints-- http://git-wip-us.apache.org/repos/asf/ambari/blob/594daa40/ambari-server/src/main/resources/Ambari-DDL-SQLServer-DROP.sql -- diff --git a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-DROP.sql b/ambari-server/src/main/resources/Ambari-DDL-SQLServer-DROP.sql index ea31c4c..87029a2 100644 --- a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-DROP.sql +++ b/ambari-server/src/main/resources/Ambari-DDL-SQLServer-DROP.sql @@ -206,4 +206,6 @@ GO IF OBJECT_ID('adminprincipaltype', 'U') IS NOT NULL DROP TABLE adminprincipaltype GO IF OBJECT_ID('repo_version', 'U') IS NOT NULL DROP TABLE repo_version +GO +IF OBJECT_ID('artifact', 'U') IS NOT NULL DROP TABLE artifact GO \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/594daa40/ambari-server/src/main/resources/stacks/HDPWIN/2.1/hooks/after-INSTALL/scripts/params.py -- diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/hooks/after-INSTALL/scripts/params.py b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/hooks/after-INSTALL/scripts/params.py index 7d48ce6..3f494d3 100644 --- a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/hooks/after-INSTALL/scripts/params.py +++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/hooks/after-INSTALL/scripts/params.py @@ -95,7 +95,7 @@ hbase_master = default_string("/clusterHostInfo/hbase_master_hosts", [], delimit hbase_regionservers = default_string("/clusterHostInfo/hbase_rs_hosts", [], delimiter) flume_hosts = default_string("/clusterHostInfo/flume_hosts", [], delimiter) falcon_host = default_string("/clusterHostInfo/falcon_server_hosts", [], delimiter) -knox_host = default_string("/clusterHostInfo/knox_host", [], delimiter) +knox_host = default_string("/clusterHostInfo/knox_gateway_hosts", [], delimiter) storm_nimbus = default_string("/clusterHostInfo/nimbus_hosts", [], delimiter) storm_supervisors = default_string("/clusterHostInfo/supervisor_hosts", [], delimiter) ambari_server_host = default_string("/clusterHostInfo/ambari_server_host", [], delimiter)
[2/2] ambari git commit: AMBARI-9270 - Add SLIDER, KNOX service to HDPWIN 2.2
AMBARI-9270 - Add SLIDER, KNOX service to HDPWIN 2.2 Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4497f00c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4497f00c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4497f00c Branch: refs/heads/trunk Commit: 4497f00cc76ed6a99b69111a743038619aa7ab63 Parents: 8b79e43 Author: Artem Baranchuk Authored: Thu Jan 22 22:25:37 2015 +0200 Committer: Artem Baranchuk Committed: Thu Jan 29 12:17:11 2015 +0200 -- .../libraries/functions/install_hdp_msi.py | 7 ++- .../KNOX/0.5.0.2.2/package/scripts/knox.py | 37 + .../0.5.0.2.2/package/scripts/knox_gateway.py | 56 +++- .../KNOX/0.5.0.2.2/package/scripts/ldap.py | 10 ++-- .../KNOX/0.5.0.2.2/package/scripts/params.py| 26 +++-- .../0.5.0.2.2/package/scripts/params_linux.py | 47 .../0.5.0.2.2/package/scripts/params_windows.py | 42 +++ .../0.5.0.2.2/package/scripts/service_check.py | 11 .../package/scripts/service_mapping.py | 22 .../SLIDER/0.60.0.2.2/package/scripts/params.py | 9 ++-- .../0.60.0.2.2/package/scripts/params_linux.py | 30 +++ .../package/scripts/params_windows.py | 34 .../0.60.0.2.2/package/scripts/service_check.py | 13 - .../SLIDER/0.60.0.2.2/package/scripts/slider.py | 22 +++- .../0.60.0.2.2/package/scripts/slider_client.py | 17 -- .../after-INSTALL/templates/Run-SmokeTests.ps1 | 2 +- .../KNOX/configuration/gateway-site.xml | 38 + .../services/KNOX/configuration/knox-env.xml| 48 + .../ranger-knox-plugin-properties.xml | 29 ++ .../HDPWIN/2.2/services/KNOX/metainfo.xml | 26 + .../SLIDER/configurations/slider-client.xml | 29 ++ .../HDPWIN/2.2/services/SLIDER/metainfo.xml | 26 + 22 files changed, 541 insertions(+), 40 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4497f00c/ambari-common/src/main/python/resource_management/libraries/functions/install_hdp_msi.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/install_hdp_msi.py b/ambari-common/src/main/python/resource_management/libraries/functions/install_hdp_msi.py index 130bae4..d20dd42 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/install_hdp_msi.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/install_hdp_msi.py @@ -115,10 +115,13 @@ def _ensure_services_created(hadoop_password): # creating symlinks to services folders to avoid using stack-dependent paths -def _create_symlinks(): +def _create_symlinks(stack_version): # folders Execute("cmd /c mklink /d %HADOOP_NODE%\\hadoop %HADOOP_HOME%") Execute("cmd /c mklink /d %HADOOP_NODE%\\hive %HIVE_HOME%") + hdp_stack_version = format_hdp_stack_version(stack_version) + if hdp_stack_version != "" and compare_versions(hdp_stack_version, '2.2') >= 0: +Execute("cmd /c mklink /d %HADOOP_NODE%\\knox %KNOX_HOME%") # files pairs (symlink_path, path_template_to_target_file), use * to replace file version links_pairs = [ ("%HADOOP_HOME%\\share\\hadoop\\tools\\lib\\hadoop-streaming.jar", @@ -192,7 +195,7 @@ def install_windows_msi(msi_url, save_dir, save_file, hadoop_password, stack_ver reload_windows_env() # create additional services manually due to hdp.msi limitaitons _ensure_services_created(hadoop_password) -_create_symlinks() +_create_symlinks(stack_version) # finalizing install _write_marker() _validate_msi_install() http://git-wip-us.apache.org/repos/asf/ambari/blob/4497f00c/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox.py -- diff --git a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox.py b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox.py index 7d7d20c..7f341c5 100644 --- a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox.py +++ b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox.py @@ -17,9 +17,46 @@ limitations under the License. """ +import os from resource_management import * +from ambari_commons import OSConst +from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl +@OsFamilyFuncImpl(os_family=OSConst.WINSRV_FAMILY) +def knox(): + import params + + XmlConfig("gateway-site.xml", +conf_dir=params.knox_conf_dir, +configurations=params.config['configur
[1/2] ambari git commit: AMBARI-9269 - Add FLUME service to HDPWIN 2.1 and HDPWIN 2.2
Repository: ambari Updated Branches: refs/heads/trunk 8e94e2059 -> 4497f00cc AMBARI-9269 - Add FLUME service to HDPWIN 2.1 and HDPWIN 2.2 Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8b79e432 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8b79e432 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8b79e432 Branch: refs/heads/trunk Commit: 8b79e4326036db64d6e7a70f0590ef5a70183dd6 Parents: 8e94e20 Author: Artem Baranchuk Authored: Tue Jan 20 23:41:23 2015 +0200 Committer: Artem Baranchuk Committed: Thu Jan 29 12:17:10 2015 +0200 -- .../FLUME/1.4.0.2.0/package/scripts/flume.py| 45 .../1.4.0.2.0/package/scripts/flume_check.py| 11 +++- .../1.4.0.2.0/package/scripts/flume_handler.py | 43 +++ .../FLUME/1.4.0.2.0/package/scripts/params.py | 12 ++--- .../1.4.0.2.0/package/scripts/params_linux.py | 32 +++ .../1.4.0.2.0/package/scripts/params_windows.py | 31 +++ .../package/scripts/service_mapping.py | 21 .../stacks/HDPWIN/2.1/role_command_order.json | 18 ++- .../services/FLUME/configuration/flume-conf.xml | 33 .../services/FLUME/configuration/flume-env.xml | 57 .../HDPWIN/2.1/services/FLUME/metainfo.xml | 26 + .../HDPWIN/2.2/services/FLUME/metainfo.xml | 26 + 12 files changed, 324 insertions(+), 31 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8b79e432/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume.py -- diff --git a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume.py b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume.py index 3f30809..8bf0cc2 100644 --- a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume.py +++ b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume.py @@ -23,7 +23,52 @@ import os from resource_management import * from resource_management.libraries.functions.flume_agent_helper import is_flume_process_live from resource_management.libraries.functions.flume_agent_helper import find_expected_agent_names +from ambari_commons import OSConst +from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl +@OsFamilyFuncImpl(os_family=OSConst.WINSRV_FAMILY) +def flume(action = None): + import params + + if action == 'config': +# remove previously defined meta's +for n in find_expected_agent_names(params.flume_conf_dir): + os.unlink(os.path.join(params.flume_conf_dir, n, 'ambari-meta.json')) + +flume_agents = {} +if params.flume_conf_content is not None: + flume_agents = build_flume_topology(params.flume_conf_content) + +for agent in flume_agents.keys(): + flume_agent_conf_dir = os.path.join(params.flume_conf_dir, agent) + flume_agent_conf_file = os.path.join(flume_agent_conf_dir, 'flume.conf') + flume_agent_meta_file = os.path.join(flume_agent_conf_dir, 'ambari-meta.json') + flume_agent_log4j_file = os.path.join(flume_agent_conf_dir, 'log4j.properties') + flume_agent_env_file = os.path.join(flume_agent_conf_dir, 'flume-env.ps1') + + Directory(flume_agent_conf_dir) + + PropertiesFile(flume_agent_conf_file, + properties=flume_agents[agent]) + + File(flume_agent_log4j_file, + content=Template('log4j.properties.j2', agent_name = agent)) + + File(flume_agent_meta_file, + content = json.dumps(ambari_meta(agent, flume_agents[agent]))) + + File(flume_agent_env_file, + owner=params.flume_user, + content=InlineTemplate(params.flume_env_sh_template) + ) + + if params.has_metric_collector: +File(os.path.join(flume_agent_conf_dir, "flume-metrics2.properties"), + owner=params.flume_user, + content=Template("flume-metrics2.properties.j2") +) + +@OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT) def flume(action = None): import params http://git-wip-us.apache.org/repos/asf/ambari/blob/8b79e432/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_check.py -- diff --git a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_check.py b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_check.py index b93b8e8..ae166f8 100644 --- a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_check.py +++ b/ambari-server/src/main/resources/common-servi
[2/2] ambari git commit: AMBATI-9192 - Service Checks pass despite smoke test failures
AMBATI-9192 - Service Checks pass despite smoke test failures Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8f30fc6a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8f30fc6a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8f30fc6a Branch: refs/heads/trunk Commit: 8f30fc6a8db83448812cc729e648671aba48b60a Parents: 756a103 Author: Artem Baranchuk Authored: Mon Jan 19 01:11:19 2015 +0200 Committer: Artem Baranchuk Committed: Tue Jan 20 23:13:13 2015 +0200 -- .../libraries/functions/install_hdp_msi.py | 5 +- .../2.1/hooks/after-INSTALL/scripts/hook.py | 12 + .../after-INSTALL/templates/Run-SmokeTests.cmd | 19 + .../after-INSTALL/templates/Run-SmokeTests.ps1 | 623 +++ 4 files changed, 658 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8f30fc6a/ambari-common/src/main/python/resource_management/libraries/functions/install_hdp_msi.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/install_hdp_msi.py b/ambari-common/src/main/python/resource_management/libraries/functions/install_hdp_msi.py index bbedd2c..130bae4 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/install_hdp_msi.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/install_hdp_msi.py @@ -46,6 +46,9 @@ HDFS_NAMENODE_DATA_DIR={hdp_data_dir}\\hdpdatann #Datanode Data directory HDFS_DATANODE_DATA_DIR={hdp_data_dir}\\hdpdatadn + +IS_SLIDER=yes +IS_PHOENIX=yes """ cluster_properties = """#Log directory HDP_LOG_DIR={hdp_log_dir} @@ -91,7 +94,7 @@ OOZIE_DB_PASSWORD=oozie INSTALL_MSI_CMD = 'cmd /C start /wait msiexec /qn /i {hdp_msi_path} /lv {hdp_log_path} MSIUSEREALADMINDETECTION=1 ' \ 'HDP_LAYOUT={hdp_layout_path} DESTROY_DATA=yes HDP_USER_PASSWORD={hadoop_password_arg} HDP=yes ' \ - 'KNOX=yes KNOX_MASTER_SECRET="AmbariHDP2Windows" FALCON=yes STORM=yes HBase=yes STORM=yes FLUME=yes RANGER=no' + 'KNOX=yes KNOX_MASTER_SECRET="AmbariHDP2Windows" FALCON=yes STORM=yes HBase=yes STORM=yes FLUME=yes SLIDER=yes PHOENIX=yes RANGER=no' CREATE_SERVICE_SCRIPT = os.path.abspath("sbin\createservice.ps1") CREATE_SERVICE_CMD = 'cmd /C powershell -File "{script}" -username hadoop -password "{password}" -servicename ' \ '{servicename} -hdpresourcesdir "{resourcedir}" -servicecmdpath "{servicecmd}"' http://git-wip-us.apache.org/repos/asf/ambari/blob/8f30fc6a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/hooks/after-INSTALL/scripts/hook.py -- diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/hooks/after-INSTALL/scripts/hook.py b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/hooks/after-INSTALL/scripts/hook.py index 07a3a00..31df28d 100644 --- a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/hooks/after-INSTALL/scripts/hook.py +++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/hooks/after-INSTALL/scripts/hook.py @@ -45,5 +45,17 @@ class AfterInstallHook(Hook): mode="f" ) +File(format("{params.hadoop_install_root}/Run-SmokeTests.cmd"), + content=Template("Run-SmokeTests.cmd"), + owner=params.hdfs_user, + mode="f" +) + +File(format("{params.hadoop_install_root}/Run-SmokeTests.ps1"), + content=Template("Run-SmokeTests.ps1"), + owner=params.hdfs_user, + mode="f" +) + if __name__ == "__main__": AfterInstallHook().execute() http://git-wip-us.apache.org/repos/asf/ambari/blob/8f30fc6a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/hooks/after-INSTALL/templates/Run-SmokeTests.cmd -- diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/hooks/after-INSTALL/templates/Run-SmokeTests.cmd b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/hooks/after-INSTALL/templates/Run-SmokeTests.cmd new file mode 100644 index 000..41c669f --- /dev/null +++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/hooks/after-INSTALL/templates/Run-SmokeTests.cmd @@ -0,0 +1,19 @@ +@echo off +@rem Licensed to the Apache Software Foundation (ASF) under one or more +@rem contributor license agreements. See the NOTICE file distributed with +@rem this work for additional information regarding copyright ownership. +@rem The ASF licenses this file to You under the Apache License, Version 2.0 +@rem (the "License"); you may not use this file except in compliance with +@rem the License. You may obtain a copy of the License at +@rem +@rem http://www.apache.org/licenses/LIC
[1/2] ambari git commit: AMBARI-8278 - Database Host for HadoopMetrics, Hive Oozie should be set to corresponding server host name
Repository: ambari Updated Branches: refs/heads/branch-windows-dev 045fcb8d8 -> 7469f2ea9 refs/heads/trunk 756a10370 -> 8f30fc6a8 AMBARI-8278 - Database Host for HadoopMetrics, Hive Oozie should be set to corresponding server host name Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7469f2ea Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7469f2ea Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7469f2ea Branch: refs/heads/branch-windows-dev Commit: 7469f2ea9fe8a878a6f15c9642ca54eff938239c Parents: 045fcb8 Author: Artem Baranchuk Authored: Tue Nov 11 17:42:50 2014 +0200 Committer: Artem Baranchuk Committed: Tue Nov 11 17:47:49 2014 +0200 -- ambari-web/app/models/service_config.js | 21 + 1 file changed, 21 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7469f2ea/ambari-web/app/models/service_config.js -- diff --git a/ambari-web/app/models/service_config.js b/ambari-web/app/models/service_config.js index 9d7160a..6b7e9aa 100644 --- a/ambari-web/app/models/service_config.js +++ b/ambari-web/app/models/service_config.js @@ -459,6 +459,27 @@ App.ServiceConfigProperty = Ember.Object.extend({ case 'hadoop_host': this.set('value', masterComponentHostsInDB.filterProperty('component', 'NAMENODE').mapProperty('hostName')); break; + case 'sink_existing_mssql_server_host': + case 'sink_existing_mssql_server_2_host': +var nameNodeHost = masterComponentHostsInDB.findProperty('component', 'NAMENODE').hostName; +this.set('value', nameNodeHost).set('defaultValue', nameNodeHost); +break; + case 'hive_existing_mysql_host': + case 'hive_existing_postgresql_host': + case 'hive_existing_oracle_host': + case 'hive_existing_mssql_server_host': + case 'hive_existing_mssql_server_2_host': +var hiveServerHost = masterComponentHostsInDB.findProperty('component', 'HIVE_SERVER').hostName; +this.set('value', hiveServerHost).set('defaultValue', hiveServerHost); +break; + case 'oozie_existing_mysql_host': + case 'oozie_existing_postgresql_host': + case 'oozie_existing_oracle_host': + case 'oozie_existing_mssql_server_host': + case 'oozie_existing_mssql_server_2_host': +var oozieServerHost = masterComponentHostsInDB.findProperty('component', 'OOZIE_SERVER').hostName; +this.set('value', oozieServerHost).set('defaultValue', oozieServerHost); +break; case 'storm.zookeeper.servers': case 'zookeeperserver_hosts': this.set('value', masterComponentHostsInDB.filterProperty('component', 'ZOOKEEPER_SERVER').mapProperty('hostName'));
ambari git commit: AMBARI-8841 - Validate Ambari on Win with hdp-2.2.msi
Repository: ambari Updated Branches: refs/heads/trunk b01fdc5bd -> 856790517 AMBARI-8841 - Validate Ambari on Win with hdp-2.2.msi Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/85679051 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/85679051 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/85679051 Branch: refs/heads/trunk Commit: 85679051769b83d863868e3e2f8e57ffb925382c Parents: b01fdc5 Author: Artem Baranchuk Authored: Fri Dec 19 23:53:57 2014 +0200 Committer: Artem Baranchuk Committed: Wed Dec 31 01:23:04 2014 +0200 -- .../libraries/functions/install_hdp_msi.py | 21 +--- .../libraries/script/script.py | 3 ++- .../HIVE/package/scripts/hive_client.py | 3 ++- 3 files changed, 22 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/85679051/ambari-common/src/main/python/resource_management/libraries/functions/install_hdp_msi.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/install_hdp_msi.py b/ambari-common/src/main/python/resource_management/libraries/functions/install_hdp_msi.py index a7c2fe2..c016fbc 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/install_hdp_msi.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/install_hdp_msi.py @@ -28,6 +28,7 @@ from resource_management.core.logger import Logger from resource_management.core.exceptions import Fail from resource_management.libraries.functions.reload_windows_env import reload_windows_env from resource_management.libraries.functions.windows_service_utils import check_windows_service_exists +from resource_management.libraries.functions.version import format_hdp_stack_version, compare_versions import socket import os import glob @@ -40,12 +41,20 @@ hdp_log_dir = "c:\\hadoop\\logs" hdp_data_dir = "c:\\hadoopDefaultData" local_host = socket.getfqdn() db_flavor = "DERBY" +hdp_22 = """#Namenode Data directory +HDFS_NAMENODE_DATA_DIR={hdp_data_dir}\\hdpdatann + +#Datanode Data directory +HDFS_DATANODE_DATA_DIR={hdp_data_dir}\\hdpdatadn +""" cluster_properties = """#Log directory HDP_LOG_DIR={hdp_log_dir} #Data directory HDP_DATA_DIR={hdp_data_dir} +{hdp_22_specific_props} + #hosts NAMENODE_HOST={local_host} SECONDARY_NAMENODE_HOST={local_host} @@ -82,7 +91,7 @@ OOZIE_DB_PASSWORD=oozie INSTALL_MSI_CMD = 'cmd /C start /wait msiexec /qn /i {hdp_msi_path} /lv {hdp_log_path} MSIUSEREALADMINDETECTION=1 ' \ 'HDP_LAYOUT={hdp_layout_path} DESTROY_DATA=yes HDP_USER_PASSWORD={hadoop_password_arg} HDP=yes ' \ - 'KNOX=yes KNOX_MASTER_SECRET="AmbariHDP2Windows" FALCON=yes STORM=yes HBase=yes STORM=yes FLUME=yes' + 'KNOX=yes KNOX_MASTER_SECRET="AmbariHDP2Windows" FALCON=yes STORM=yes HBase=yes STORM=yes FLUME=yes RANGER=no' CREATE_SERVICE_SCRIPT = os.path.abspath("sbin\createservice.ps1") CREATE_SERVICE_CMD = 'cmd /C powershell -File "{script}" -username hadoop -password "{password}" -servicename ' \ '{servicename} -hdpresourcesdir "{resourcedir}" -servicecmdpath "{servicecmd}"' @@ -140,7 +149,7 @@ def _write_marker(): open(os.path.join(_working_dir, INSTALL_MARKER_FAILED), "w").close() -def install_windows_msi(msi_url, save_dir, save_file, hadoop_password): +def install_windows_msi(msi_url, save_dir, save_file, hadoop_password, stack_version): global _working_dir _working_dir = save_dir save_dir = os.path.abspath(save_dir) @@ -157,12 +166,18 @@ def install_windows_msi(msi_url, save_dir, save_file, hadoop_password): Logger.info("hdp.msi already installed") return +hdp_stack_version = format_hdp_stack_version(stack_version) +hdp_22_specific_props = '' +if hdp_stack_version != "" and compare_versions(hdp_stack_version, '2.2') >= 0: + hdp_22_specific_props = hdp_22 + # install msi download_file(msi_url, os.path.join(msi_save_dir, save_file)) File(os.path.join(msi_save_dir, "properties.txt"), content=cluster_properties.format(hdp_log_dir=hdp_log_dir, hdp_data_dir=hdp_data_dir, local_host=local_host, - db_flavor=db_flavor)) + db_flavor=db_flavor, + hdp_22_specific_props=hd
ambari git commit: AMBARI-8557 - Python EXE path seems to be hardcoded in ambari-env.cmd (Eugene Chekanskiy via abaranchuk)
Repository: ambari Updated Branches: refs/heads/trunk 4d5b3be71 -> e643e40b0 AMBARI-8557 - Python EXE path seems to be hardcoded in ambari-env.cmd (Eugene Chekanskiy via abaranchuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e643e40b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e643e40b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e643e40b Branch: refs/heads/trunk Commit: e643e40b06a253495258ae0f2628d15ff93c1a56 Parents: 4d5b3be Author: Artem Baranchuk Authored: Wed Dec 17 14:21:56 2014 +0200 Committer: Artem Baranchuk Committed: Wed Dec 17 14:22:34 2014 +0200 -- ambari-common/src/main/python/ambari_commons/os_utils.py | 9 + 1 file changed, 9 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e643e40b/ambari-common/src/main/python/ambari_commons/os_utils.py -- diff --git a/ambari-common/src/main/python/ambari_commons/os_utils.py b/ambari-common/src/main/python/ambari_commons/os_utils.py index e648124..3f4819d 100644 --- a/ambari-common/src/main/python/ambari_commons/os_utils.py +++ b/ambari-common/src/main/python/ambari_commons/os_utils.py @@ -20,6 +20,7 @@ limitations under the License. import shutil import string +import os from os_check import * @@ -100,3 +101,11 @@ def set_open_files_limit(maxOpenFiles): def get_password(prompt): return os_getpass(prompt) + +def find_in_path(file): + dirs = os.environ["PATH"].split(os.pathsep) + for dir in dirs: +full_path = os.path.join(dir, file) +if os.path.exists(full_path): + return full_path + raise Exception("File {} not found in PATH".format(file)) \ No newline at end of file
[2/2] ambari git commit: AMBARI-8682 - Failed to install Sqoop on HDPWIN (Eugene Chekanskiy via abaranchuk)
AMBARI-8682 - Failed to install Sqoop on HDPWIN (Eugene Chekanskiy via abaranchuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8c0a2f83 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8c0a2f83 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8c0a2f83 Branch: refs/heads/trunk Commit: 8c0a2f83bedf9ad848842e90ba21f6fa70e80b5c Parents: 593e2b2 Author: Artem Baranchuk Authored: Fri Dec 12 18:21:05 2014 +0200 Committer: Artem Baranchuk Committed: Fri Dec 12 18:21:05 2014 +0200 -- .../services/SQOOP/configuration/sqoop-env.xml | 66 1 file changed, 66 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8c0a2f83/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/SQOOP/configuration/sqoop-env.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/SQOOP/configuration/sqoop-env.xml b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/SQOOP/configuration/sqoop-env.xml new file mode 100644 index 000..c3bcf7e --- /dev/null +++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/SQOOP/configuration/sqoop-env.xml @@ -0,0 +1,66 @@ + + + + + + + +content +This is the jinja template for sqoop-env.cmd file +@echo off +:: 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. + +:: included in all the hadoop scripts with source command +:: should not be executable directly +:: also should not be passed any arguments, since we need original $* + +:: Set Hadoop-specific environment variables here. + +::Set path to where bin/hadoop is available +::set HADOOP_COMMON_HOME= + +::Set path to where hadoop-*-core.jar is available +::set HADOOP_MAPRED_HOME= + +::set the path to where bin/hbase is available +::set HBASE_HOME= + +::Set the path to where bin/hive is available +::set HIVE_HOME= + +::Set the path for where zookeper config dir is +::set ZOOCFGDIR= + + +
[1/2] ambari git commit: AMBARI-8683 - Failed to install Tez client
Repository: ambari Updated Branches: refs/heads/trunk a8767d6f3 -> 8c0a2f83b AMBARI-8683 - Failed to install Tez client Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/593e2b2b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/593e2b2b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/593e2b2b Branch: refs/heads/trunk Commit: 593e2b2bf2158e87f4988a56345c745b03ecb0b0 Parents: a8767d6 Author: Artem Baranchuk Authored: Fri Dec 12 15:55:54 2014 +0200 Committer: Artem Baranchuk Committed: Fri Dec 12 18:15:29 2014 +0200 -- .../stacks/HDPWIN/2.1/services/TEZ/package/scripts/tez_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/593e2b2b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/TEZ/package/scripts/tez_client.py -- diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/TEZ/package/scripts/tez_client.py b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/TEZ/package/scripts/tez_client.py index 4e3324e..89dd6bb 100644 --- a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/TEZ/package/scripts/tez_client.py +++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/TEZ/package/scripts/tez_client.py @@ -21,6 +21,7 @@ Ambari Agent import sys from resource_management import * +from tez import tez class TezClient(Script): def install(self, env): @@ -37,6 +38,5 @@ class TezClient(Script): def status(self, env): raise ClientComponentHasNoStatus() - if __name__ == "__main__": TezClient().execute()
[2/2] ambari git commit: AMBARI-8640 - Namenode install fails on multi-drive environment (Eugene Chekanskiy via abaranchuk)
AMBARI-8640 - Namenode install fails on multi-drive environment (Eugene Chekanskiy via abaranchuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/69afc2a0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/69afc2a0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/69afc2a0 Branch: refs/heads/trunk Commit: 69afc2a0505b4852b10a93cac74d9badf368e8ec Parents: dcbc0d9 Author: Artem Baranchuk Authored: Fri Dec 12 15:16:45 2014 +0200 Committer: Artem Baranchuk Committed: Fri Dec 12 15:16:45 2014 +0200 -- .../stacks/HDPWIN/2.1/services/HDFS/package/scripts/hdfs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/69afc2a0/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HDFS/package/scripts/hdfs.py -- diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HDFS/package/scripts/hdfs.py b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HDFS/package/scripts/hdfs.py index 3b292f2..174355f 100644 --- a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HDFS/package/scripts/hdfs.py +++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HDFS/package/scripts/hdfs.py @@ -25,7 +25,8 @@ import os def hdfs(component=None): import params if component == "namenode": -Directory(params.dfs_name_dir, +directories = params.dfs_name_dir.split(",") +Directory(directories, owner=params.hdfs_user, mode="(OI)(CI)F", recursive=True
[1/2] ambari git commit: AMBARI-8557 - Python EXE path seems to be hardcoded in ambari-env.cmd (Eugene Chekanskiy via abaranchuk)
Repository: ambari Updated Branches: refs/heads/trunk 42f8d67dd -> 69afc2a05 AMBARI-8557 - Python EXE path seems to be hardcoded in ambari-env.cmd (Eugene Chekanskiy via abaranchuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/dcbc0d95 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/dcbc0d95 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/dcbc0d95 Branch: refs/heads/trunk Commit: dcbc0d956710aa9c7cee7418ff023bd01cc6aa2f Parents: 42f8d67 Author: Artem Baranchuk Authored: Fri Dec 12 15:15:28 2014 +0200 Committer: Artem Baranchuk Committed: Fri Dec 12 15:15:28 2014 +0200 -- ambari-agent/conf/windows/ambari-env.cmd | 4 +--- ambari-agent/conf/windows/service_wrapper.py | 3 +++ 2 files changed, 4 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/dcbc0d95/ambari-agent/conf/windows/ambari-env.cmd -- diff --git a/ambari-agent/conf/windows/ambari-env.cmd b/ambari-agent/conf/windows/ambari-env.cmd index 6e0c317..20c5cbc 100644 --- a/ambari-agent/conf/windows/ambari-env.cmd +++ b/ambari-agent/conf/windows/ambari-env.cmd @@ -15,8 +15,6 @@ REM See the License for the specific language governing permissions and REM limitations under the License. set SERVICE_NAME=Ambari Agent -REM REM set AMBARI_AGENT_CONF_DIR=C:\work\test\agent +REM set AMBARI_AGENT_CONF_DIR=C:\work\test\agent REM set AMBARI_AGENT_LOG_DIR=logs set AGENT_SERVICE_WRAPPER=sbin\service_wrapper.py -REM python exe that will be used for command execution(must have access to pywin32 and agent python code) -set PYTHON_EXE=C:\Python27\python.exe http://git-wip-us.apache.org/repos/asf/ambari/blob/dcbc0d95/ambari-agent/conf/windows/service_wrapper.py -- diff --git a/ambari-agent/conf/windows/service_wrapper.py b/ambari-agent/conf/windows/service_wrapper.py index 7eabb56..40be1d0 100644 --- a/ambari-agent/conf/windows/service_wrapper.py +++ b/ambari-agent/conf/windows/service_wrapper.py @@ -28,6 +28,7 @@ from ambari_commons.ambari_service import AmbariService, ENV_PYTHON_PATH from ambari_commons.exceptions import * from ambari_commons.logging_utils import * from ambari_commons.os_windows import WinServiceController +from ambari_commons.os_utils import find_in_path from ambari_agent.AmbariConfig import AmbariConfig from ambari_agent.HeartbeatHandlers import HeartbeatStopHandlers @@ -55,6 +56,8 @@ def parse_options(): os.environ["AMBARI_AGENT_LOG_DIR"] = os.path.join("\\", "var", "log", "ambari-agent") if not os.path.exists(os.environ["AMBARI_AGENT_LOG_DIR"]): os.makedirs(os.environ["AMBARI_AGENT_LOG_DIR"]) + if not os.environ.has_key("PYTHON_EXE"): +os.environ["PYTHON_EXE"] = find_in_path("python.exe") class AmbariAgentService(AmbariService):
ambari git commit: AMBARI-8649 - Cluster deployment failed on Win
Repository: ambari Updated Branches: refs/heads/trunk 59fa68e77 -> 5b0e8bd9c AMBARI-8649 - Cluster deployment failed on Win Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5b0e8bd9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5b0e8bd9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5b0e8bd9 Branch: refs/heads/trunk Commit: 5b0e8bd9cf04432d8bfcccbbf838491b18e36fc4 Parents: 59fa68e Author: Artem Baranchuk Authored: Tue Dec 9 23:04:58 2014 +0200 Committer: Artem Baranchuk Committed: Thu Dec 11 13:28:22 2014 +0200 -- ambari-agent/src/main/python/ambari_agent/HostInfo.py| 8 +--- .../src/main/python/ambari_agent/PythonExecutor.py | 11 ++- .../controller/internal/AbstractResourceProvider.java| 2 +- .../src/main/resources/Ambari-DDL-SQLServer-CREATE.sql | 7 ++- .../src/main/resources/Ambari-DDL-SQLServer-DROP.sql | 2 ++ ambari-web/app/controllers/wizard/step8_controller.js| 2 +- 6 files changed, 25 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5b0e8bd9/ambari-agent/src/main/python/ambari_agent/HostInfo.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/HostInfo.py b/ambari-agent/src/main/python/ambari_agent/HostInfo.py index 0b80ffe..a99a85d 100644 --- a/ambari-agent/src/main/python/ambari_agent/HostInfo.py +++ b/ambari-agent/src/main/python/ambari_agent/HostInfo.py @@ -47,6 +47,8 @@ class HostInfo(object): "hadoop", "zookeeper" ] + RESULT_UNAVAILABLE = "unable_to_determine" + current_umask = -1 def __init__(self, config=None): @@ -167,8 +169,6 @@ class HostInfoLinux(HostInfo): "ambari", "HDP-UTILS" ] - RESULT_UNAVAILABLE = "unable_to_determine" - DEFAULT_SERVICE_NAME = "ntpd" SERVICE_STATUS_CMD = "%s %s status" % (SERVICE_CMD, DEFAULT_SERVICE_NAME) @@ -412,6 +412,8 @@ class HostInfoWindows(HostInfo): DEFAULT_LIVE_SERVICES = [ {OSConst.WINSRV_FAMILY: "W32Time"} ] + DEFAULT_USERS = ["hadoop"] + def checkUsers(self, users, results): get_users_cmd = ["powershell", '-noProfile', '-NonInteractive', '-nologo', "-Command", self.GET_USERS_CMD] try: @@ -521,4 +523,4 @@ def main(argv=None): if __name__ == '__main__': - main() + main() \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/5b0e8bd9/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py b/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py index 15698a5..2ba492f 100644 --- a/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py +++ b/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py @@ -142,9 +142,18 @@ class PythonExecutor: to make possible unit testing """ close_fds = None if OSCheck.get_os_family() == OSConst.WINSRV_FAMILY else True + +if OSCheck.get_os_family() == OSConst.WINSRV_FAMILY: + command_env = dict(os.environ) + command_env["PYTHONPATH"] = os.pathsep.join(sys.path) + for k, v in command_env.iteritems(): +command_env[k] = str(v) +else: + command_env = None + return subprocess.Popen(command, stdout=tmpout, - stderr=tmperr, close_fds=close_fds) + stderr=tmperr, close_fds=close_fds, env=command_env) def isSuccessfull(self, returncode): return not self.python_process_has_been_killed and returncode == 0 http://git-wip-us.apache.org/repos/asf/ambari/blob/5b0e8bd9/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractResourceProvider.java index 69d13b5..652cae3 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractResourceProvider.java @@ -366,7 +366,7 @@ public abstract class AbstractResourceProvider extends BaseProvider implements R PropertyHelper.getPropertyName(desiredConfigKey + '/' + e.getKey()); String absCatategory = PropertyHelper.getPropertyCategory(desiredConfigKey + '/' + e.getKey()); - parseProperties(newConfig, absCatategory, propName, e.getValue().toString()); + parseProperties(newConfig, absCatategory, propName, e.getValue() == null ? null : e.getValue().toString()
[1/2] ambari git commit: AMBARI-8373 - Refactor the OS-dependent Ambari Agent Windows components (Eugene Chekanskiy via abaranchuk)
Repository: ambari Updated Branches: refs/heads/trunk bca33177d -> 15c65b930 http://git-wip-us.apache.org/repos/asf/ambari/blob/15c65b93/ambari-agent/src/main/python/ambari_agent/PackagesAnalyzer.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/PackagesAnalyzer.py b/ambari-agent/src/main/python/ambari_agent/PackagesAnalyzer.py index e7dcc8b..93f3e89 100644 --- a/ambari-agent/src/main/python/ambari_agent/PackagesAnalyzer.py +++ b/ambari-agent/src/main/python/ambari_agent/PackagesAnalyzer.py @@ -20,7 +20,6 @@ limitations under the License. import os import logging -import pwd import shell import subprocess from threading import Thread http://git-wip-us.apache.org/repos/asf/ambari/blob/15c65b93/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py b/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py index 2a8fa5a..15698a5 100644 --- a/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py +++ b/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py @@ -27,7 +27,7 @@ import platform from threading import Thread import time from BackgroundCommandExecutionHandle import BackgroundCommandExecutionHandle - +from ambari_commons.os_check import OSConst, OSCheck from Grep import Grep import shell, sys @@ -141,7 +141,7 @@ class PythonExecutor: Creates subprocess with given parameters. This functionality was moved to separate method to make possible unit testing """ -close_fds = None if platform.system() == "Windows" else True +close_fds = None if OSCheck.get_os_family() == OSConst.WINSRV_FAMILY else True return subprocess.Popen(command, stdout=tmpout, stderr=tmperr, close_fds=close_fds) http://git-wip-us.apache.org/repos/asf/ambari/blob/15c65b93/ambari-agent/src/main/python/ambari_agent/main.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/main.py b/ambari-agent/src/main/python/ambari_agent/main.py index b8d73b8..5b1048b 100644 --- a/ambari-agent/src/main/python/ambari_agent/main.py +++ b/ambari-agent/src/main/python/ambari_agent/main.py @@ -36,23 +36,19 @@ from PingPortListener import PingPortListener import hostname from DataCleaner import DataCleaner import socket +from ambari_commons import OSConst, OSCheck from ambari_agent import shell +import HeartbeatHandlers +from HeartbeatHandlers import bind_signal_handlers logger = logging.getLogger() formatstr = "%(levelname)s %(asctime)s %(filename)s:%(lineno)d - %(message)s" agentPid = os.getpid() config = AmbariConfig.AmbariConfig() -configFile = config.CONFIG_FILE +configFile = config.getConfigFile() two_way_ssl_property = config.TWO_WAY_SSL_PROPERTY -IS_WINDOWS = platform.system() == "Windows" -if IS_WINDOWS: - from HeartbeatHandlers_windows import bind_signal_handlers -else: - from HeartbeatStopHandler_linux import bind_signal_handlers - from HeartbeatStopHandler_linux import signal_handler - from HeartbeatStopHandler_linux import debug def setup_logging(verbose): formatter = logging.Formatter(formatstr) @@ -119,7 +115,7 @@ def perform_prestart_checks(expected_hostname): logger.error(msg) sys.exit(1) # Check if there is another instance running - if os.path.isfile(ProcessHelper.pidfile) and not IS_WINDOWS: + if os.path.isfile(ProcessHelper.pidfile) and not OSCheck.get_os_family() == OSConst.WINSRV_FAMILY: print("%s already exists, exiting" % ProcessHelper.pidfile) sys.exit(1) # check if ambari prefix exists @@ -232,7 +228,7 @@ def main(heartbeat_stop_callback=None): perform_prestart_checks(expected_hostname) - if not IS_WINDOWS: + if not OSCheck.get_os_family() == OSConst.WINSRV_FAMILY: daemonize() # Starting ping port listener @@ -265,7 +261,7 @@ def main(heartbeat_stop_callback=None): controller = Controller(config, heartbeat_stop_callback) controller.start() controller.join() - if not IS_WINDOWS: + if not OSCheck.get_os_family() == OSConst.WINSRV_FAMILY: stop_agent() logger.info("finished") http://git-wip-us.apache.org/repos/asf/ambari/blob/15c65b93/ambari-agent/src/test/python/ambari_agent/TestActionQueue.py -- diff --git a/ambari-agent/src/test/python/ambari_agent/TestActionQueue.py b/ambari-agent/src/test/python/ambari_agent/TestActionQueue.py index 034dba3..52b586b 100644 --- a/ambari-agent/src/test/python/ambari_agent/TestActionQueue.py +++ b/ambari-agent/src/test/python/ambari_agent/TestActionQueue.py @@ -36,7 +36,7 @@ from ambari_agent.PythonExecutor import PythonExecutor from ambari_agent.CommandStatusDict import CommandStatusDict from ambari_agent.ActualConfigHandler import ActualConfigHandler
[2/2] ambari git commit: AMBARI-8373 - Refactor the OS-dependent Ambari Agent Windows components (Eugene Chekanskiy via abaranchuk)
AMBARI-8373 - Refactor the OS-dependent Ambari Agent Windows components (Eugene Chekanskiy via abaranchuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/15c65b93 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/15c65b93 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/15c65b93 Branch: refs/heads/trunk Commit: 15c65b93005c7c7470d73db1cd6d53cab184e398 Parents: bca3317 Author: Artem Baranchuk Authored: Tue Dec 9 01:36:46 2014 +0200 Committer: Artem Baranchuk Committed: Tue Dec 9 01:36:46 2014 +0200 -- ambari-agent/conf/windows/service_wrapper.py| 15 +- .../src/main/python/ambari_agent/ActionQueue.py | 2 - .../python/ambari_agent/AgentConfig_linux.py| 230 - .../python/ambari_agent/AgentConfig_windows.py | 232 - .../main/python/ambari_agent/AmbariConfig.py| 181 +-- .../src/main/python/ambari_agent/Controller.py | 14 +- .../src/main/python/ambari_agent/Facter.py | 36 +- .../src/main/python/ambari_agent/Hardware.py| 4 +- .../python/ambari_agent/HeartbeatHandlers.py| 147 ++ .../ambari_agent/HeartbeatHandlers_windows.py | 58 --- .../ambari_agent/HeartbeatStopHandler_linux.py | 91 .../src/main/python/ambari_agent/HostCleanup.py | 10 +- .../src/main/python/ambari_agent/HostInfo.py| 508 ++- .../main/python/ambari_agent/HostInfo_linux.py | 380 -- .../main/python/ambari_agent/HostInfo_win.py| 227 - .../src/main/python/ambari_agent/NetUtil.py | 9 +- .../python/ambari_agent/PackagesAnalyzer.py | 1 - .../main/python/ambari_agent/PythonExecutor.py | 4 +- .../src/main/python/ambari_agent/main.py| 18 +- .../test/python/ambari_agent/TestActionQueue.py | 4 +- .../test/python/ambari_agent/TestHardware.py| 10 +- .../test/python/ambari_agent/TestHeartbeat.py | 8 +- .../test/python/ambari_agent/TestHostInfo.py| 80 +-- .../src/test/python/ambari_agent/TestMain.py| 14 +- .../python/ambari_agent/TestRegistration.py | 1 - .../src/main/python/ambari_commons/os_check.py | 192 +++ .../python/ambari_commons/os_family_impl.py | 64 +++ .../src/main/python/ambari_commons/os_utils.py | 4 +- .../functions/get_unique_id_and_date.py | 2 +- ambari-server/src/main/python/ambari-server.py | 2 +- .../python/ambari_server/dbConfiguration.py | 4 +- .../python/ambari_server/serverConfiguration.py | 2 +- .../main/python/ambari_server/serverSetup.py| 9 +- .../main/python/ambari_server/setupSecurity.py | 4 +- ambari-server/src/test/python/TestOSCheck.py| 22 - 35 files changed, 1050 insertions(+), 1539 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/15c65b93/ambari-agent/conf/windows/service_wrapper.py -- diff --git a/ambari-agent/conf/windows/service_wrapper.py b/ambari-agent/conf/windows/service_wrapper.py index 1d11202..7eabb56 100644 --- a/ambari-agent/conf/windows/service_wrapper.py +++ b/ambari-agent/conf/windows/service_wrapper.py @@ -28,11 +28,18 @@ from ambari_commons.ambari_service import AmbariService, ENV_PYTHON_PATH from ambari_commons.exceptions import * from ambari_commons.logging_utils import * from ambari_commons.os_windows import WinServiceController -from ambari_agent.AmbariConfig import AmbariConfig, SETUP_ACTION, START_ACTION, DEBUG_ACTION, STOP_ACTION, STATUS_ACTION -from ambari_agent.HeartbeatHandlers_windows import HeartbeatStopHandler +from ambari_agent.AmbariConfig import AmbariConfig +from ambari_agent.HeartbeatHandlers import HeartbeatStopHandlers AMBARI_VERSION_VAR = "AMBARI_VERSION_VAR" +SETUP_ACTION = "setup" +START_ACTION = "start" +STOP_ACTION = "stop" +RESET_ACTION = "reset" +STATUS_ACTION = "status" +DEBUG_ACTION = "debug" + def parse_options(): # parse env cmd with open(os.path.join(os.getcwd(), "ambari-env.cmd"), "r") as env_cmd: @@ -82,7 +89,7 @@ class AmbariAgentService(AmbariService): # Soft dependency on the Windows Time service ensure_time_service_is_started() -self.heartbeat_stop_handler = HeartbeatStopHandler(self._heventSvcStop) +self.heartbeat_stop_handler = HeartbeatStopHandlers(self._heventSvcStop) self.ReportServiceStatus(win32service.SERVICE_RUNNING) @@ -101,7 +108,7 @@ class AmbariAgentService(AmbariService): def ensure_time_service_is_started(): ret = WinServiceController.EnsureServiceIsStarted("W32Time") if 0 != ret: -raise FatalException(-1, "Error starting Windows Time service: " + string(ret)) +raise FatalException(-1, "Error starting Windows Time service: &
ambari git commit: AMBARI-8489 - Enable ambari server unit tests on Windows
Repository: ambari Updated Branches: refs/heads/trunk 956a0e708 -> 498a13bab AMBARI-8489 - Enable ambari server unit tests on Windows Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/498a13ba Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/498a13ba Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/498a13ba Branch: refs/heads/trunk Commit: 498a13bab6f38ffa529da1a5cdd7cc400728ca01 Parents: 956a0e7 Author: Artem Baranchuk Authored: Mon Dec 1 14:01:50 2014 +0200 Committer: Artem Baranchuk Committed: Wed Dec 3 13:54:04 2014 +0200 -- .../ambari/server/bootstrap/BSRunner.java | 11 +- .../server/api/services/AmbariMetaInfoTest.java | 98 .../services/ViewSubResourceServiceTest.java| 2 +- .../serializers/JsonSerializerTest.java | 6 +- .../ambari/server/bootstrap/BootStrapTest.java | 155 ++- .../ClientConfigResourceProviderTest.java | 20 ++- .../server/orm/InMemoryDefaultTestModule.java | 21 ++- .../server/security/CertGenerationTest.java | 25 +-- .../ambari/server/stack/StackManagerTest.java | 42 - .../ambari/server/state/stack/OSFamilyTest.java | 2 +- .../ambari/server/view/ViewExtractorTest.java | 61 ++-- .../ambari/server/view/ViewRegistryTest.java| 154 +- ambari-server/src/test/resources/os_family.json | 11 ++ 13 files changed, 419 insertions(+), 189 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/498a13ba/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BSRunner.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BSRunner.java b/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BSRunner.java index 31343b5..4790691 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BSRunner.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BSRunner.java @@ -181,9 +181,9 @@ class BSRunner extends Thread { /* Running command: * script hostlist bsdir user sshkeyfile */ - shellCommand[0] = "sh"; - shellCommand[1] = "-c"; - + shellCommand[0] = System.getProperty("os.name").contains("Windows") ? "cmd" : "sh"; + shellCommand[1] = System.getProperty("os.name").contains("Windows") ? "/C" : "-c"; + commands[0] = this.bsScript; commands[1] = hostString; commands[2] = this.requestIdDir.toString(); @@ -212,16 +212,15 @@ class BSRunner extends Thread { commandString.append(" " + comm); } - if (LOG.isDebugEnabled()) { LOG.debug(commandString); } - + String bootStrapOutputFile = requestIdDir + File.separator + "bootstrap.out"; String bootStrapErrorFile = requestIdDir + File.separator + "bootstrap.err"; commandString.append( " 1> " + bootStrapOutputFile + " 2>" + bootStrapErrorFile); - + shellCommand[2] = commandString.toString(); Process process = Runtime.getRuntime().exec(shellCommand, env); http://git-wip-us.apache.org/repos/asf/ambari/blob/498a13ba/ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java index 136e8a8..8a4e627 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java @@ -130,7 +130,13 @@ public class AmbariMetaInfoTest { @Before public void before() throws Exception { -metaInfo = createAmbariMetaInfo(new File("src/test/resources/stacks"), new File("target/version"), true); +File stacks = new File("src/test/resources/stacks"); +File version = new File("target/version"); +if (System.getProperty("os.name").contains("Windows")) { + stacks = new File(ClassLoader.getSystemClassLoader().getResource("stacks").getPath()); + version = new File(new File(ClassLoader.getSystemClassLoader().getResource("").getPath()).getParent(), "version"); +} +metaInfo = createAmbariMetaInfo(stacks, version, true); } public class MockModule extends AbstractModule { @@ -197,10 +203,14 @@ public class AmbariMetaInfoTest { // Deleting the json file referenced by the latestBaseUrl to simulate No // Internet. -File latestUrlFile = new File(buildDir, -"ambari-metaInfo/HDP/2.1.1/repos/hdp.json"); -FileUtils.deleteQuietly(
ambari git commit: AMBARI-8366 - Sqoop Configs fail to load on Services page on WINHDP (Eugene Chekanskiy via abaranchuk)
Repository: ambari Updated Branches: refs/heads/trunk 5d07646ee -> f9a08f9f8 AMBARI-8366 - Sqoop Configs fail to load on Services page on WINHDP (Eugene Chekanskiy via abaranchuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f9a08f9f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f9a08f9f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f9a08f9f Branch: refs/heads/trunk Commit: f9a08f9f8c5100dc35c7233057f5dc5acde83ab5 Parents: 5d07646 Author: Artem Baranchuk Authored: Mon Dec 1 13:57:04 2014 +0200 Committer: Artem Baranchuk Committed: Mon Dec 1 13:57:04 2014 +0200 -- .../FALCON/package/scripts/falcon_client.py | 2 +- .../2.1/services/HDFS/package/scripts/hdfs.py | 5 +- .../2.1/services/OOZIE/package/scripts/oozie.py | 3 +- .../2.1/services/PIG/package/scripts/pig.py | 6 +- .../services/SQOOP/configuration/sqoop-site.xml | 156 --- .../services/SQOOP/package/scripts/params.py| 2 +- .../2.1/services/SQOOP/package/scripts/sqoop.py | 9 +- .../SQOOP/package/scripts/sqoop_client.py | 10 +- .../services/STORM/package/scripts/nimbus.py| 2 +- .../STORM/package/scripts/supervisor.py | 2 +- .../STORM/package/scripts/yaml_config.py| 4 +- .../services/TEZ/package/scripts/tez_client.py | 1 + .../ZOOKEEPER/package/scripts/zookeeper.py | 6 +- .../package/scripts/zookeeper_client.py | 1 + 14 files changed, 28 insertions(+), 181 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f9a08f9f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/FALCON/package/scripts/falcon_client.py -- diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/FALCON/package/scripts/falcon_client.py b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/FALCON/package/scripts/falcon_client.py index a5d47da..86c7545 100644 --- a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/FALCON/package/scripts/falcon_client.py +++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/FALCON/package/scripts/falcon_client.py @@ -24,7 +24,7 @@ class FalconClient(Script): import params if params.falcon_home is None: self.install_packages(env) - self.configure(env) +self.configure(env) def configure(self, env): import params http://git-wip-us.apache.org/repos/asf/ambari/blob/f9a08f9f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HDFS/package/scripts/hdfs.py -- diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HDFS/package/scripts/hdfs.py b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HDFS/package/scripts/hdfs.py index 790c8ea..3b292f2 100644 --- a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HDFS/package/scripts/hdfs.py +++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HDFS/package/scripts/hdfs.py @@ -20,6 +20,7 @@ Ambari Agent """ from resource_management import * +import os def hdfs(component=None): import params @@ -50,12 +51,12 @@ def hdfs(component=None): mode="f", configuration_attributes=params.config['configuration_attributes']['hdfs-site'] ) - File(format("{params.hadoop_conf_dir}/hadoop-metrics2.properties"), + File(os.path.join(params.hadoop_conf_dir, "hadoop-metrics2.properties"), content=Template("hadoop-metrics2.properties.j2"), owner=params.hdfs_user, mode="f" ) - File(format("{params.hbase_conf_dir}/hadoop-metrics2-hbase.properties"), + File(os.path.join(params.hbase_conf_dir, "hadoop-metrics2-hbase.properties"), content=Template("hadoop-metrics2.properties.j2"), owner=params.hdfs_user, mode="f" http://git-wip-us.apache.org/repos/asf/ambari/blob/f9a08f9f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/package/scripts/oozie.py -- diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/package/scripts/oozie.py b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/package/scripts/oozie.py index e2056c4..0e59ea0 100644 --- a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/package/scripts/oozie.py +++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/OOZIE/package/scripts/oozie.py @@ -20,6 +20,7 @@ Ambari Agent """ from resource_management import * +import os def oozie(