[ https://issues.apache.org/jira/browse/HDDS-699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16786253#comment-16786253 ]
Tsz Wo Nicholas Sze commented on HDDS-699: ------------------------------------------ Some other comments: - Move getNumOfLeaves() from InnerNode to Node. It returns 1 for non-InnerNode. - In Node, getParent() should return InnerNode instead of Node. - Add a new field fullPath to NodeImpl. The getNetworkFullPath() just return it in order to avoid constructing the string many many times. - In InnerNodeImpl, remove getNodes(int level) and getChildren(). They are unused. - In InnerNodeImpl.isParent(node), it seems wrong to return true when node.getNetworkLocation().equals(NetConstants.ROOT). - In InnerNodeImpl.getNode(String loc), we should first check if loc is absolute and then return null if the prefix does not match. {code} // InnerNodeImpl.getNode(String loc), if (loc.startsWith(PATH_SEPARATOR_STR)) { // remove this node's location from loc if (loc.startsWith(this.getNetworkFullPath())) { loc = loc.substring(this.getNetworkFullPath().length()); } else { return null; } } {code} - Add \@Override for the overrided methods > Detect Ozone Network topology > ----------------------------- > > Key: HDDS-699 > URL: https://issues.apache.org/jira/browse/HDDS-699 > Project: Hadoop Distributed Data Store > Issue Type: Sub-task > Reporter: Xiaoyu Yao > Assignee: Sammi Chen > Priority: Major > Attachments: HDDS-699.00.patch, HDDS-699.01.patch, HDDS-699.02.patch, > HDDS-699.03.patch, HDDS-699.04.patch, HDDS-699.05.patch > > > Traditionally this has been implemented in Hadoop via script or customizable > java class. One thing we want to add here is the flexible multi-level support > instead of fixed levels like DC/Rack/NG/Node. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org