You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celeborn.apache.org by ni...@apache.org on 2024/08/16 08:26:54 UTC
(celeborn) branch main updated: [CELEBORN-1563] Log networkLocation in WorkerInfo
This is an automated email from the ASF dual-hosted git repository.
nicholasjiang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/celeborn.git
The following commit(s) were added to refs/heads/main by this push:
new 2ad44baee [CELEBORN-1563] Log networkLocation in WorkerInfo
2ad44baee is described below
commit 2ad44baeefd4bcd5d8220d491e1a1a2828043005
Author: Aravind Patnam <ap...@linkedin.com>
AuthorDate: Fri Aug 16 16:26:45 2024 +0800
[CELEBORN-1563] Log networkLocation in WorkerInfo
### What changes were proposed in this pull request?
Log networkLocation so that it appears during worker registration
### Why are the changes needed?
in the case of custom network location, it would be good to log it
### Does this PR introduce _any_ user-facing change?
### How was this patch tested?
updated unit tests
Closes #2685 from akpatnam25/CELEBORN-1563.
Authored-by: Aravind Patnam <ap...@linkedin.com>
Signed-off-by: SteNicholas <pr...@163.com>
---
.../src/main/scala/org/apache/celeborn/common/meta/WorkerInfo.scala | 1 +
.../test/scala/org/apache/celeborn/common/meta/WorkerInfoSuite.scala | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/common/src/main/scala/org/apache/celeborn/common/meta/WorkerInfo.scala b/common/src/main/scala/org/apache/celeborn/common/meta/WorkerInfo.scala
index 1524ab2be..5d6dbd7fc 100644
--- a/common/src/main/scala/org/apache/celeborn/common/meta/WorkerInfo.scala
+++ b/common/src/main/scala/org/apache/celeborn/common/meta/WorkerInfo.scala
@@ -280,6 +280,7 @@ class WorkerInfo(
|UserResourceConsumption: $userResourceConsumptionString
|WorkerRef: $endpoint
|WorkerStatus: $workerStatus
+ |NetworkLocation: $networkLocation
|""".stripMargin
}
diff --git a/common/src/test/scala/org/apache/celeborn/common/meta/WorkerInfoSuite.scala b/common/src/test/scala/org/apache/celeborn/common/meta/WorkerInfoSuite.scala
index 401177e63..c1a67f5c2 100644
--- a/common/src/test/scala/org/apache/celeborn/common/meta/WorkerInfoSuite.scala
+++ b/common/src/test/scala/org/apache/celeborn/common/meta/WorkerInfoSuite.scala
@@ -234,6 +234,7 @@ class WorkerInfoSuite extends CelebornFunSuite {
val worker1 = new WorkerInfo("h1", 10001, 10002, 10003, 1000, 10004)
val worker2 =
new WorkerInfo("h2", 20001, 20002, 20003, 2000, 20004, null, null)
+ worker2.networkLocation_$eq("/1")
val worker3 = new WorkerInfo(
"h3",
@@ -307,6 +308,7 @@ class WorkerInfoSuite extends CelebornFunSuite {
|Disks: empty
|UserResourceConsumption: empty
|WorkerRef: null
+ |NetworkLocation: /default-rack
|""".stripMargin
val exp2 =
@@ -322,6 +324,7 @@ class WorkerInfoSuite extends CelebornFunSuite {
|Disks: empty
|UserResourceConsumption: empty
|WorkerRef: null
+ |NetworkLocation: /1
|""".stripMargin
val exp3 =
s"""
@@ -336,6 +339,7 @@ class WorkerInfoSuite extends CelebornFunSuite {
|Disks: empty
|UserResourceConsumption: empty
|WorkerRef: null
+ |NetworkLocation: /default-rack
|""".stripMargin
val exp4 =
s"""
@@ -354,6 +358,7 @@ class WorkerInfoSuite extends CelebornFunSuite {
|UserResourceConsumption: $placeholder
| UserIdentifier: `tenant1`.`name1`, ResourceConsumption: ResourceConsumption(diskBytesWritten: 20.0 MiB, diskFileCount: 1, hdfsBytesWritten: 50.0 MiB, hdfsFileCount: 1, subResourceConsumptions: (application_1697697127390_2171854 -> ResourceConsumption(diskBytesWritten: 20.0 MiB, diskFileCount: 1, hdfsBytesWritten: 50.0 MiB, hdfsFileCount: 1, subResourceConsumptions: empty)))
|WorkerRef: null
+ |NetworkLocation: /default-rack
|""".stripMargin
assertEquals(