SteNicholas commented on code in PR #2367:
URL: 
https://github.com/apache/incubator-celeborn/pull/2367#discussion_r1520924604


##########
master/src/main/java/org/apache/celeborn/service/deploy/master/clustermeta/AbstractMetaManager.java:
##########
@@ -238,7 +240,13 @@ public void updateRegisterWorkerMeta(
             disks,
             userResourceConsumption);
     workerInfo.lastHeartbeat_$eq(System.currentTimeMillis());
-    
workerInfo.networkLocation_$eq(rackResolver.resolve(host).getNetworkLocation());
+    if (networkLocation != null

Review Comment:
   ```suggestion
       if (!networkTopology.DEFAULT_RACK.equals(networkLocation))
   ```



##########
common/src/test/scala/org/apache/celeborn/common/network/CelebornRackResolverSuite.scala:
##########
@@ -62,7 +62,7 @@ class CelebornRackResolverSuite extends AnyFunSuite {
     assertEquals("/rack1", resultMap(hostName1).getNetworkLocation)
     assertEquals("/rack2", resultMap(hostName2).getNetworkLocation)
 
-    val hostNamesList = new util.ArrayList[String]()
+    val hostNamesList = new ArrayList[String]()

Review Comment:
   Is it necessary to change?



##########
master/src/main/java/org/apache/celeborn/service/deploy/master/clustermeta/AbstractMetaManager.java:
##########
@@ -330,8 +338,10 @@ public void restoreMetaFromFile(File file) throws 
IOException {
               .peek(
                   workerInfo -> {
                     // Reset worker's network location with current master's 
configuration.
-                    workerInfo.networkLocation_$eq(
-                        
resolveMap.get(workerInfo.host()).get().getNetworkLocation());
+                    if 
(workerInfo.networkLocation().equals(NetworkTopology.DEFAULT_RACK)) {

Review Comment:
   ```suggestion
                       if 
(NetworkTopology.DEFAULT_RACK.equals(workerInfo.networkLocation())) {
   ```



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to