ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlun...@apache.org
Subject ambari git commit: AMBARI-11815: [WinTP2] AMS service metrics don't show up on Windows (jluniya)
Date Tue, 09 Jun 2015 17:47:11 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 0fa830d92 -> 8461ff2e1


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/8461ff2e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8461ff2e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8461ff2e

Branch: refs/heads/branch-2.1
Commit: 8461ff2e1ef69b429f626975a8652e07e31dc4a6
Parents: 0fa830d
Author: Jayush Luniya <jluniya@hortonworks.com>
Authored: Tue Jun 9 10:45:48 2015 -0700
Committer: Jayush Luniya <jluniya@hortonworks.com>
Committed: Tue Jun 9 10:47:05 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/8461ff2e/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/8461ff2e/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/8461ff2e/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:


Mime
View raw message