[ 
https://issues.apache.org/jira/browse/HDDS-1663?focusedWorklogId=257079&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-257079
 ]

ASF GitHub Bot logged work on HDDS-1663:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 10/Jun/19 19:23
            Start Date: 10/Jun/19 19:23
    Worklog Time Spent: 10m 
      Work Description: xiaoyuyao commented on pull request #937: HDDS-1663. 
Add datanode to network topology cluster during node regis…
URL: https://github.com/apache/hadoop/pull/937#discussion_r292154168
 
 

 ##########
 File path: 
hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/node/TestSCMNodeManager.java
 ##########
 @@ -945,4 +954,124 @@ public void testHandlingSCMCommandEvent()
     }
   }
 
+  /**
+   * Test add node into network topology during node register. Datanode
+   * uses Ip address to resolve network location.
+   */
+  @Test
+  public void testScmRegisterNodeWithIpAddress()
+      throws IOException, InterruptedException, AuthenticationException {
+    testScmRegisterNodeWithNetworkTopology(false);
+  }
+
+  /**
+   * Test add node into network topology during node register. Datanode
+   * uses hostname to resolve network location.
+   */
+  @Test
+  public void testScmRegisterNodeWithHostname()
+      throws IOException, InterruptedException, AuthenticationException {
+    testScmRegisterNodeWithNetworkTopology(true);
+  }
+
+  /**
+   * Test add node into a 4-layer network topology during node register.
+   */
+  @Test
+  public void testScmRegisterNodeWith4LayerNetworkTopology()
+      throws IOException, InterruptedException, AuthenticationException {
+    OzoneConfiguration conf = getConf();
+    conf.setTimeDuration(OZONE_SCM_HEARTBEAT_PROCESS_INTERVAL, 1000,
+        MILLISECONDS);
+
+    // create table mapping file
+    String[] hostNames = {"host1", "host2", "host3", "host4"};
+    String[] IpAddress = {"1.2.3.4", "2.3.4.5", "3.4.5.6", "4.5.6.7"};
+    File mapFile = File.createTempFile(getClass().getSimpleName() +
 
 Review comment:
   NIT: Can we use GenericTestUtils.getTestDir() to make sure the test file are 
cleaned up safely?
 
----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 257079)
    Time Spent: 2h  (was: 1h 50m)

> Add datanode to network topology cluster during node register
> -------------------------------------------------------------
>
>                 Key: HDDS-1663
>                 URL: https://issues.apache.org/jira/browse/HDDS-1663
>             Project: Hadoop Distributed Data Store
>          Issue Type: Sub-task
>            Reporter: Sammi Chen
>            Assignee: Sammi Chen
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 2h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to