symious opened a new pull request, #3350:
URL: https://github.com/apache/ozone/pull/3350

   ## What changes were proposed in this pull request?
   
   In `NodeSchemaLoader.init()`, the file of "network-topology-default.xml" is 
loaded to retrieve the topology schema.
   
   By default the result schema is "/datacenter/rack/nodegroup/node", and the 
schema size is 4, since datacenter is treated as "ROOT".
   
   The schema size will also be sent to NetworkTopologyImpl to build the 
topology, the schema size is used as maxLevel.
   ```
   public NetworkTopologyImpl(ConfigurationSource conf) {
     schemaManager = NodeSchemaManager.getInstance();
     schemaManager.init(conf);
     maxLevel = schemaManager.getMaxLevel();
     factory = InnerNodeImpl.FACTORY;
     clusterTree = factory.newInnerNode(ROOT, null, null,
         NetConstants.ROOT_LEVEL,
         schemaManager.getCost(NetConstants.ROOT_LEVEL));
   } 
   ```
   But for "/datacenter/rack/nodegroup/node" the maxLevel is in fact 5, the 
reason of the issue is that "datacenter" is treated as "ROOT" incorrectly. 
While the yaml file version is correctly treated "datacenter" to a InnerNode.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-6648
   
   ## How was this patch tested?
   
   unit test.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to