You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Janus Chow (Jira)" <ji...@apache.org> on 2022/04/26 08:04:00 UTC
[jira] [Created] (HDDS-6648) NodeSchemaLoader return incorrect networkLocation
Janus Chow created HDDS-6648:
--------------------------------
Summary: 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
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: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org