ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vbrodets...@apache.org
Subject ambari git commit: AMBARI-13880. DataNode Data Directories Which Contain Meta Information Tags Trigger Alerts.(vbrodetskyi)
Date Fri, 13 Nov 2015 14:44:29 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 2d03c6d00 -> 77d0fc158


AMBARI-13880. DataNode Data Directories Which Contain Meta Information Tags Trigger Alerts.(vbrodetskyi)


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

Branch: refs/heads/trunk
Commit: 77d0fc15880e286ccd147dd77a15641ef91d6fd3
Parents: 2d03c6d
Author: Vitaly Brodetskyi <vbrodetskyi@hortonworks.com>
Authored: Fri Nov 13 16:42:25 2015 +0200
Committer: Vitaly Brodetskyi <vbrodetskyi@hortonworks.com>
Committed: Fri Nov 13 16:42:25 2015 +0200

----------------------------------------------------------------------
 .../package/alerts/alert_datanode_unmounted_data_dir.py        | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/77d0fc15/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/alerts/alert_datanode_unmounted_data_dir.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/alerts/alert_datanode_unmounted_data_dir.py
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/alerts/alert_datanode_unmounted_data_dir.py
index f95daac..606633e 100644
--- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/alerts/alert_datanode_unmounted_data_dir.py
+++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/alerts/alert_datanode_unmounted_data_dir.py
@@ -30,6 +30,7 @@ RESULT_STATE_CRITICAL = 'CRITICAL'
 RESULT_STATE_UNKNOWN = 'UNKNOWN'
 
 DFS_DATA_DIR = '{{hdfs-site/dfs.datanode.data.dir}}'
+DATA_STORAGE_TAGS = ['[DISK]','[SSD]','[RAM_DISK]','[ARCHIVE]']
 DATA_DIR_MOUNT_FILE = "/var/lib/ambari-agent/data/datanode/dfs_data_dir_mount.hist"
 
 logger = logging.getLogger()
@@ -84,6 +85,11 @@ def execute(configurations={}, parameters={}, host_name=None):
     if data_dir is None or data_dir.strip() == "":
       continue
     data_dir = data_dir.strip()
+    # filter out data storage tags
+    for tag in DATA_STORAGE_TAGS:
+      if data_dir.startswith(tag):
+        data_dir = data_dir.replace(tag, "")
+        continue
     valid_data_dirs.add(data_dir)
 
   # Sort the data dirs, which is needed for deterministic behavior when running the unit
tests.


Mime
View raw message