ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From avija...@apache.org
Subject ambari git commit: AMBARI-17614 : Clean up import * for AMBARI_METRICS service (Masahiro Tanaka via avijayan)
Date Wed, 13 Jul 2016 21:25:40 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 6f7d69aee -> 4426ebc54


AMBARI-17614 : Clean up import * for AMBARI_METRICS service (Masahiro Tanaka via avijayan)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4426ebc5
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4426ebc5
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4426ebc5

Branch: refs/heads/trunk
Commit: 4426ebc54149319f2a8160435700e0a6666d8f65
Parents: 6f7d69a
Author: Aravindan Vijayan <avijayan@hortonworks.com>
Authored: Wed Jul 13 14:25:28 2016 -0700
Committer: Aravindan Vijayan <avijayan@hortonworks.com>
Committed: Wed Jul 13 14:25:28 2016 -0700

----------------------------------------------------------------------
 .../AMBARI_METRICS/0.1.0/package/scripts/metrics_monitor.py      | 2 +-
 .../AMBARI_METRICS/0.1.0/package/scripts/status.py               | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/4426ebc5/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_monitor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_monitor.py
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_monitor.py
index 7dc66b2..b344464 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_monitor.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_monitor.py
@@ -18,7 +18,7 @@ limitations under the License.
 
 """
 
-from resource_management import *
+from resource_management.libraries.script.script import Script
 from ams import ams
 from ams_service import ams_service
 from status import check_service_status

http://git-wip-us.apache.org/repos/asf/ambari/blob/4426ebc5/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/status.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/status.py
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/status.py
index fa4e8a4..41cafc2 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/status.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/status.py
@@ -17,13 +17,14 @@ limitations under the License.
 
 """
 
-from resource_management import *
+from resource_management.libraries.functions import format
 from ambari_commons import OSConst
 from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl
 import os
 
 @OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT)
 def check_service_status(name):
+  from resource_management.libraries.functions.check_process_status import check_process_status
   if name=='collector':
     pid_file = format("{ams_collector_pid_dir}/ambari-metrics-collector.pid")
     check_process_status(pid_file)
@@ -44,6 +45,7 @@ def check_service_status(name):
 @OsFamilyFuncImpl(os_family=OSConst.WINSRV_FAMILY)
 def check_service_status(name):
   import service_mapping
+  from resource_management.libraries.functions.windows_service_utils import check_windows_service_status
   if name=='collector':
     check_windows_service_status(service_mapping.ams_collector_win_service_name)
   elif name == 'monitor':


Mime
View raw message