浏览代码

AMBARI-7048. Change component message from "cannot" to "should not"

Srimanth Gunturi 10 年之前
父节点
当前提交
f23e09de6c

+ 2 - 2
ambari-server/src/main/resources/stacks/HDP/1.3.2/services/stack_advisor.py

@@ -192,8 +192,8 @@ class HDP132StackAdvisor(StackAdvisor):
       secondaryNameNodeHosts = secondaryNameNodeHosts[0]
       commonHosts = list(set(nameNodeHosts).intersection(secondaryNameNodeHosts))
       for host in commonHosts:
-        items.append( { "type": 'host-component', "level": 'WARN', "message": 'NameNode and Secondary NameNode cannot be hosted on same machine', "component-name": 'NAMENODE', "host": str(host) } )
-        items.append( { "type": 'host-component', "level": 'WARN', "message": 'NameNode and Secondary NameNode cannot be hosted on same machine', "component-name": 'SECONDARY_NAMENODE', "host": str(host) } )
+        items.append( { "type": 'host-component', "level": 'WARN', "message": 'NameNode and Secondary NameNode should not be hosted on same machine', "component-name": 'NAMENODE', "host": str(host) } )
+        items.append( { "type": 'host-component', "level": 'WARN', "message": 'NameNode and Secondary NameNode should not be hosted on same machine', "component-name": 'SECONDARY_NAMENODE', "host": str(host) } )
 
     # Validating cardinality
     for component in componentsList:

+ 2 - 2
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py

@@ -192,8 +192,8 @@ class HDP206StackAdvisor(StackAdvisor):
       secondaryNameNodeHosts = secondaryNameNodeHosts[0]
       commonHosts = list(set(nameNodeHosts).intersection(secondaryNameNodeHosts))
       for host in commonHosts:
-        items.append( { "type": 'host-component', "level": 'WARN', "message": 'NameNode and Secondary NameNode cannot be hosted on same machine', "component-name": 'NAMENODE', "host": str(host) } )
-        items.append( { "type": 'host-component', "level": 'WARN', "message": 'NameNode and Secondary NameNode cannot be hosted on same machine', "component-name": 'SECONDARY_NAMENODE', "host": str(host) } )
+        items.append( { "type": 'host-component', "level": 'WARN', "message": 'NameNode and Secondary NameNode should not be hosted on same machine', "component-name": 'NAMENODE', "host": str(host) } )
+        items.append( { "type": 'host-component', "level": 'WARN', "message": 'NameNode and Secondary NameNode should not be hosted on same machine', "component-name": 'SECONDARY_NAMENODE', "host": str(host) } )
 
     # Validating cardinality
     for component in componentsList:

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

@@ -99,8 +99,8 @@ class TestHDP206StackAdvisor(TestCase):
     result = self.stackAdvisor.validateComponentLayout(services, hosts)
 
     expectedItems = [
-      {"message": "NameNode and Secondary NameNode cannot be hosted on same machine", "level": "WARN", "host": "host1"},
-      {"message": "NameNode and Secondary NameNode cannot be hosted on same machine", "level": "WARN", "host": "host1"},
+      {"message": "NameNode and Secondary NameNode should not be hosted on same machine", "level": "WARN", "host": "host1"},
+      {"message": "NameNode and Secondary NameNode should not be hosted on same machine", "level": "WARN", "host": "host1"},
       {"message": "Host is not used", "level": "ERROR", "host": "host2"}
     ]
     self.assertValidationResult(expectedItems, result)