[ 
https://issues.apache.org/jira/browse/HDDS-6648?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated HDDS-6648:
---------------------------------
    Labels: pull-request-available  (was: )

> NodeSchemaLoader return incorrect networkLocation
> -------------------------------------------------
>
>                 Key: HDDS-6648
>                 URL: https://issues.apache.org/jira/browse/HDDS-6648
>             Project: Apache Ozone
>          Issue Type: Bug
>            Reporter: Janus Chow
>            Assignee: Janus Chow
>            Priority: Major
>              Labels: pull-request-available
>
> 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.
> {code:java}
> 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));
> } {code}
> 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.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

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

Reply via email to