You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jl...@apache.org on 2015/06/09 19:45:56 UTC
ambari git commit: AMBARI-11815: [WinTP2] AMS service metrics don't
show up on Windows (jluniya)
Repository: ambari
Updated Branches:
refs/heads/trunk 5240ca45e -> b66d46aed
AMBARI-11815: [WinTP2] AMS service metrics don't show up on Windows (jluniya)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b66d46ae
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b66d46ae
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b66d46ae
Branch: refs/heads/trunk
Commit: b66d46aed49c0bbe60a496e34ddb8f35a666b3a6
Parents: 5240ca4
Author: Jayush Luniya <jl...@hortonworks.com>
Authored: Tue Jun 9 10:45:48 2015 -0700
Committer: Jayush Luniya <jl...@hortonworks.com>
Committed: Tue Jun 9 10:45:48 2015 -0700
----------------------------------------------------------------------
.../AMBARI_METRICS/0.1.0/package/scripts/ams.py | 12 ++++++++++++
.../AMBARI_METRICS/0.1.0/package/scripts/hbase.py | 6 ++++++
.../FLUME/1.4.0.2.0/package/scripts/flume.py | 2 +-
3 files changed, 19 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/b66d46ae/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams.py
index b08e705..50a29d1 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams.py
@@ -120,6 +120,18 @@ def ams(name=None):
action="change_user",
username = params.ams_user,
password = Script.get_password(params.ams_user))
+ # creating symbolic links on ams jars to make them available to services
+ links_pairs = [
+ ("%COLLECTOR_HOME%\\hbase\\lib\\ambari-metrics-hadoop-sink-with-common.jar",
+ "%SINK_HOME%\\hadoop-sink\\ambari-metrics-hadoop-sink-with-common-*.jar"),
+ ]
+ for link_pair in links_pairs:
+ link, target = link_pair
+ real_link = os.path.expandvars(link)
+ target = compress_backslashes(glob.glob(os.path.expandvars(target))[0])
+ if not os.path.exists(real_link):
+ #TODO check the symlink destination too. Broken in Python 2.x on Windows.
+ Execute('cmd /c mklink "{0}" "{1}"'.format(real_link, target))
pass
elif name == 'monitor':
http://git-wip-us.apache.org/repos/asf/ambari/blob/b66d46ae/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/hbase.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/hbase.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/hbase.py
index d03931f..bb3f17f 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/hbase.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/hbase.py
@@ -59,6 +59,12 @@ def hbase(name=None, action = None):
owner = params.hadoop_user
)
+ # Metrics properties
+ File(os.path.join(params.hbase_conf_dir, "hadoop-metrics2-hbase.properties"),
+ owner = params.hbase_user,
+ content=Template("hadoop-metrics2-hbase.properties.j2")
+ )
+
hbase_TemplateConfig('regionservers', user=params.hadoop_user)
if params.security_enabled:
http://git-wip-us.apache.org/repos/asf/ambari/blob/b66d46ae/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 aee44c6..6fb26fd 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
@@ -24,7 +24,6 @@ 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 resource_management.libraries.functions.flume_agent_helper import await_flume_process_termination
-from resource_management.core import sudo
from ambari_commons import OSConst
from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl
@@ -273,6 +272,7 @@ def _set_desired_state(state):
def get_desired_state():
import params
+ from resource_management.core import sudo
if os.path.exists(params.ambari_state_file):
return sudo.read_file(params.ambari_state_file)
else: