Jelajahi Sumber

AMBARI-15508 Enable HDFS alerts with multiple namservices (hkropp via dsen)

Dmytro Sen 9 tahun lalu
induk
melakukan
fce65dbad6

+ 3 - 3
ambari-agent/src/test/python/ambari_agent/TestAlerts.py

@@ -843,7 +843,7 @@ class TestAlerts(TestCase):
       "https_property": "{{hdfs-site/dfs.http.policy}}",
       "https_property_value": "HTTPS_ONLY",
       "high_availability": {
-        "nameservice": "{{hdfs-site/dfs.nameservices}}",
+        "nameservice": "{{hdfs-site/dfs.internal.nameservices}}",
         "alias_key" : "{{hdfs-site/dfs.ha.namenodes.{{ha-nameservice}}}}",
         "http_pattern" : "{{hdfs-site/dfs.namenode.http-address.{{ha-nameservice}}.{{alias}}}}",
         "https_pattern" : "{{hdfs-site/dfs.namenode.https-address.{{ha-nameservice}}.{{alias}}}}"
@@ -903,7 +903,7 @@ class TestAlerts(TestCase):
       { 'dfs.http.policy' : 'HTTP_ONLY',
         'dfs.namenode.http.address' : 'c6401.ambari.apache.org:80',
         'dfs.namenode.https.address' : 'c6401.ambari.apache.org:443',
-        'dfs.nameservices' : 'c1ha',
+        'dfs.internal.nameservices' : 'c1ha',
         'dfs.ha.namenodes.c1ha' : 'nn1, nn2',
         'dfs.namenode.http-address.c1ha.nn1' : 'c6401.ambari.apache.org:8080',
         'dfs.namenode.http-address.c1ha.nn2' : 'c6402.ambari.apache.org:8080',
@@ -923,7 +923,7 @@ class TestAlerts(TestCase):
       { 'dfs.http.policy' : 'HTTPS_ONLY',
         'dfs.namenode.http.address' : 'c6401.ambari.apache.org:80',
         'dfs.namenode.https.address' : 'c6401.ambari.apache.org:443',
-        'dfs.nameservices' : 'c1ha',
+        'dfs.internal.nameservices' : 'c1ha',
         'dfs.ha.namenodes.c1ha' : 'nn1, nn2',
         'dfs.namenode.http-address.c1ha.nn1' : 'c6401.ambari.apache.org:8080',
         'dfs.namenode.http-address.c1ha.nn2' : 'c6402.ambari.apache.org:8080',

+ 8 - 8
ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json

@@ -102,7 +102,7 @@
             "kerberos_principal": "{{hdfs-site/dfs.web.authentication.kerberos.principal}}",
             "connection_timeout": 5.0,
             "high_availability": {
-              "nameservice": "{{hdfs-site/dfs.nameservices}}",
+              "nameservice": "{{hdfs-site/dfs.internal.nameservices}}",
               "alias_key" : "{{hdfs-site/dfs.ha.namenodes.{{ha-nameservice}}}}",
               "http_pattern" : "{{hdfs-site/dfs.namenode.http-address.{{ha-nameservice}}.{{alias}}}}",
               "https_pattern" : "{{hdfs-site/dfs.namenode.https-address.{{ha-nameservice}}.{{alias}}}}"
@@ -152,7 +152,7 @@
             "https_property_value": "HTTPS_ONLY",
             "connection_timeout": 5.0,
             "high_availability": {
-              "nameservice": "{{hdfs-site/dfs.nameservices}}",
+              "nameservice": "{{hdfs-site/dfs.internal.nameservices}}",
               "alias_key" : "{{hdfs-site/dfs.ha.namenodes.{{ha-nameservice}}}}",
               "http_pattern" : "{{hdfs-site/dfs.namenode.http-address.{{ha-nameservice}}.{{alias}}}}",
               "https_pattern" : "{{hdfs-site/dfs.namenode.https-address.{{ha-nameservice}}.{{alias}}}}"
@@ -200,7 +200,7 @@
             "https_property_value": "HTTPS_ONLY",
             "connection_timeout": 5.0,
             "high_availability": {
-              "nameservice": "{{hdfs-site/dfs.nameservices}}",
+              "nameservice": "{{hdfs-site/dfs.internal.nameservices}}",
               "alias_key" : "{{hdfs-site/dfs.ha.namenodes.{{ha-nameservice}}}}",
               "http_pattern" : "{{hdfs-site/dfs.namenode.http-address.{{ha-nameservice}}.{{alias}}}}",
               "https_pattern" : "{{hdfs-site/dfs.namenode.https-address.{{ha-nameservice}}.{{alias}}}}"
@@ -247,7 +247,7 @@
             "https_property_value": "HTTPS_ONLY",
             "connection_timeout": 5.0,
             "high_availability": {
-              "nameservice": "{{hdfs-site/dfs.nameservices}}",
+              "nameservice": "{{hdfs-site/dfs.internal.nameservices}}",
               "alias_key" : "{{hdfs-site/dfs.ha.namenodes.{{ha-nameservice}}}}",
               "http_pattern" : "{{hdfs-site/dfs.namenode.http-address.{{ha-nameservice}}.{{alias}}}}",
               "https_pattern" : "{{hdfs-site/dfs.namenode.https-address.{{ha-nameservice}}.{{alias}}}}"
@@ -293,7 +293,7 @@
             "https_property_value": "HTTPS_ONLY",
             "connection_timeout": 5.0,
             "high_availability": {
-              "nameservice": "{{hdfs-site/dfs.nameservices}}",
+              "nameservice": "{{hdfs-site/dfs.internal.nameservices}}",
               "alias_key" : "{{hdfs-site/dfs.ha.namenodes.{{ha-nameservice}}}}",
               "http_pattern" : "{{hdfs-site/dfs.namenode.http-address.{{ha-nameservice}}.{{alias}}}}",
               "https_pattern" : "{{hdfs-site/dfs.namenode.https-address.{{ha-nameservice}}.{{alias}}}}"
@@ -341,7 +341,7 @@
             "https_property_value": "HTTPS_ONLY",
             "connection_timeout": 5.0,
             "high_availability": {
-              "nameservice": "{{hdfs-site/dfs.nameservices}}",
+              "nameservice": "{{hdfs-site/dfs.internal.nameservices}}",
               "alias_key" : "{{hdfs-site/dfs.ha.namenodes.{{ha-nameservice}}}}",
               "http_pattern" : "{{hdfs-site/dfs.namenode.http-address.{{ha-nameservice}}.{{alias}}}}",
               "https_pattern" : "{{hdfs-site/dfs.namenode.https-address.{{ha-nameservice}}.{{alias}}}}"
@@ -388,7 +388,7 @@
             "https_property_value": "HTTPS_ONLY",
             "connection_timeout": 5.0,
             "high_availability": {
-              "nameservice": "{{hdfs-site/dfs.nameservices}}",
+              "nameservice": "{{hdfs-site/dfs.internal.nameservices}}",
               "alias_key" : "{{hdfs-site/dfs.ha.namenodes.{{ha-nameservice}}}}",
               "http_pattern" : "{{hdfs-site/dfs.namenode.http-address.{{ha-nameservice}}.{{alias}}}}",
               "https_pattern" : "{{hdfs-site/dfs.namenode.https-address.{{ha-nameservice}}.{{alias}}}}"
@@ -434,7 +434,7 @@
             "https_property_value": "HTTPS_ONLY",
             "connection_timeout": 5.0,
             "high_availability": {
-              "nameservice": "{{hdfs-site/dfs.nameservices}}",
+              "nameservice": "{{hdfs-site/dfs.internal.nameservices}}",
               "alias_key": "{{hdfs-site/dfs.ha.namenodes.{{ha-nameservice}}}}",
               "http_pattern": "{{hdfs-site/dfs.namenode.http-address.{{ha-nameservice}}.{{alias}}}}",
               "https_pattern": "{{hdfs-site/dfs.namenode.https-address.{{ha-nameservice}}.{{alias}}}}"

+ 8 - 8
ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/HDFS/alerts.json

@@ -96,7 +96,7 @@
             "kerberos_principal": "{{hdfs-site/dfs.web.authentication.kerberos.principal}}",
             "connection_timeout": 5.0,
             "high_availability": {
-              "nameservice": "{{hdfs-site/dfs.nameservices}}",
+              "nameservice": "{{hdfs-site/dfs.internal.nameservices}}",
               "alias_key" : "{{hdfs-site/dfs.ha.namenodes.{{ha-nameservice}}}}",
               "http_pattern" : "{{hdfs-site/dfs.namenode.http-address.{{ha-nameservice}}.{{alias}}}}",
               "https_pattern" : "{{hdfs-site/dfs.namenode.https-address.{{ha-nameservice}}.{{alias}}}}"
@@ -131,7 +131,7 @@
             "https_property_value": "HTTPS_ONLY",
             "connection_timeout": 5.0,
             "high_availability": {
-              "nameservice": "{{hdfs-site/dfs.nameservices}}",
+              "nameservice": "{{hdfs-site/dfs.internal.nameservices}}",
               "alias_key" : "{{hdfs-site/dfs.ha.namenodes.{{ha-nameservice}}}}",
               "http_pattern" : "{{hdfs-site/dfs.namenode.http-address.{{ha-nameservice}}.{{alias}}}}",
               "https_pattern" : "{{hdfs-site/dfs.namenode.https-address.{{ha-nameservice}}.{{alias}}}}"
@@ -176,7 +176,7 @@
             "https_property_value": "HTTPS_ONLY",
             "connection_timeout": 5.0,
             "high_availability": {
-              "nameservice": "{{hdfs-site/dfs.nameservices}}",
+              "nameservice": "{{hdfs-site/dfs.internal.nameservices}}",
               "alias_key" : "{{hdfs-site/dfs.ha.namenodes.{{ha-nameservice}}}}",
               "http_pattern" : "{{hdfs-site/dfs.namenode.http-address.{{ha-nameservice}}.{{alias}}}}",
               "https_pattern" : "{{hdfs-site/dfs.namenode.https-address.{{ha-nameservice}}.{{alias}}}}"
@@ -221,7 +221,7 @@
             "https_property_value": "HTTPS_ONLY",
             "connection_timeout": 5.0,
             "high_availability": {
-              "nameservice": "{{hdfs-site/dfs.nameservices}}",
+              "nameservice": "{{hdfs-site/dfs.internal.nameservices}}",
               "alias_key" : "{{hdfs-site/dfs.ha.namenodes.{{ha-nameservice}}}}",
               "http_pattern" : "{{hdfs-site/dfs.namenode.http-address.{{ha-nameservice}}.{{alias}}}}",
               "https_pattern" : "{{hdfs-site/dfs.namenode.https-address.{{ha-nameservice}}.{{alias}}}}"
@@ -266,7 +266,7 @@
             "https_property_value": "HTTPS_ONLY",
             "connection_timeout": 5.0,
             "high_availability": {
-              "nameservice": "{{hdfs-site/dfs.nameservices}}",
+              "nameservice": "{{hdfs-site/dfs.internal.nameservices}}",
               "alias_key" : "{{hdfs-site/dfs.ha.namenodes.{{ha-nameservice}}}}",
               "http_pattern" : "{{hdfs-site/dfs.namenode.http-address.{{ha-nameservice}}.{{alias}}}}",
               "https_pattern" : "{{hdfs-site/dfs.namenode.https-address.{{ha-nameservice}}.{{alias}}}}"
@@ -311,7 +311,7 @@
             "https_property_value": "HTTPS_ONLY",
             "connection_timeout": 5.0,
             "high_availability": {
-              "nameservice": "{{hdfs-site/dfs.nameservices}}",
+              "nameservice": "{{hdfs-site/dfs.internal.nameservices}}",
               "alias_key" : "{{hdfs-site/dfs.ha.namenodes.{{ha-nameservice}}}}",
               "http_pattern" : "{{hdfs-site/dfs.namenode.http-address.{{ha-nameservice}}.{{alias}}}}",
               "https_pattern" : "{{hdfs-site/dfs.namenode.https-address.{{ha-nameservice}}.{{alias}}}}"
@@ -355,7 +355,7 @@
             "https_property_value": "HTTPS_ONLY",
             "connection_timeout": 5.0,
             "high_availability": {
-              "nameservice": "{{hdfs-site/dfs.nameservices}}",
+              "nameservice": "{{hdfs-site/dfs.internal.nameservices}}",
               "alias_key" : "{{hdfs-site/dfs.ha.namenodes.{{ha-nameservice}}}}",
               "http_pattern" : "{{hdfs-site/dfs.namenode.http-address.{{ha-nameservice}}.{{alias}}}}",
               "https_pattern" : "{{hdfs-site/dfs.namenode.https-address.{{ha-nameservice}}.{{alias}}}}"
@@ -634,4 +634,4 @@
       }
     ]
   }
-}
+}

+ 2 - 2
ambari-server/src/test/python/stacks/2.0.6/common/test_stack_advisor.py

@@ -1151,7 +1151,7 @@ class TestHDP206StackAdvisor(TestCase):
     self.assertEquals(configurations, expected)
 
     # Verify dfs.namenode.rpc-address is recommended to be deleted when NN HA
-    configurations["hdfs-site"]["properties"]['dfs.nameservices'] = "mycluster"
+    configurations["hdfs-site"]["properties"]['dfs.internal.nameservices'] = "mycluster"
     configurations["hdfs-site"]["properties"]['dfs.ha.namenodes.mycluster'] = "nn1,nn2"
     services['configurations'] = configurations
 
@@ -1159,7 +1159,7 @@ class TestHDP206StackAdvisor(TestCase):
       'properties': {
         'dfs.datanode.data.dir': '/hadoop/hdfs/data',
         'dfs.datanode.du.reserved': '1024',
-        'dfs.nameservices': 'mycluster',
+        'dfs.internal.nameservices': 'mycluster',
         'dfs.ha.namenodes.mycluster': 'nn1,nn2'
       },
       'property_attributes': {