[ https://issues.apache.org/jira/browse/HDDS-699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16752183#comment-16752183 ]
Yiqun Lin edited comment on HDDS-699 at 1/25/19 11:39 AM: ---------------------------------------------------------- For the unit test, some comments from me: *TestNetworkTopology#testAncestor* line 209: This is same to the line 200. Should this intend to be {{isSameAncestor(dataNodes[1], dataNodes[2], maxLevel - 1)}}? *TestNetworkTopology#testAddRemove* We should add some corner cases as I mentioned above; https://issues.apache.org/jira/browse/HDDS-699?focusedCommentId=16747999&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16747999 *TestNetworkTopology#testCreateInvalidTopology* Line 189: I prefer to verify this with a more detail message {{assertTrue(e.getMessage().startsWith("Failed to add...Its path depth is not ..."));}}. It will be easy to understand. Additional one comment for the place: *NetworkTopology#sortByDistanceCost* Line 599: This can be simplified to {{Collections.shuffle(list)}}. It will reuse the random instance inside {{Collections}}. was (Author: linyiqun): For the unit test, some comments from me: *TestNetworkTopology#testAncestor* line 209: This is same to the line 200. Should this intend to be {{isSameAncestor(dataNodes[1], dataNodes[2], maxLevel - 1)}}? *TestNetworkTopology#testAddRemove* We should add some corner cases as I mentioned above; https://issues.apache.org/jira/browse/HDDS-699?focusedCommentId=16747999&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16747999 *TestNetworkTopology#testCreateInvalidTopology* Line 189: I prefer to verify this with a more detail message {{assertTrue(e.getMessage().startsWith("Failed to add...Its path depth is not"));}}. It will be easy to understanding. Additional one comment for the place: *NetworkTopology#sortByDistanceCost* Line 599: This can be simplified to {{Collections.shuffle(list)}}. It will reuse the random instance inside {{Collections}}. > 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 > > > 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