This is an automated email from the ASF dual-hosted git repository.
nicholasjiang pushed a commit to branch branch-0.6
in repository https://gitbox.apache.org/repos/asf/celeborn.git
The following commit(s) were added to refs/heads/branch-0.6 by this push:
new 58746422d [CELEBORN-1258][FOLLOWUP] Introduce --show-cluster-apps-info
master command to show cluster application's info
58746422d is described below
commit 58746422d144bf25ecd44321c12bd7056dfdcc7f
Author: SteNicholas <[email protected]>
AuthorDate: Wed Nov 5 14:57:14 2025 +0800
[CELEBORN-1258][FOLLOWUP] Introduce --show-cluster-apps-info master command
to show cluster application's info
### What changes were proposed in this pull request?
Introduce `--show-cluster-apps-info` master command to show cluster
application's info.
### Why are the changes needed?
#3428 introduces `/api/v1/applications/info` to list all running
application's info of the cluster. Therefore, Cli should also introduce
--show-cluster-apps-info master command.
### Does this PR resolve a correctness bug?
No.
### Does this PR introduce _any_ user-facing change?
Cli adds `--show-cluster-apps-info` master command to show cluster
application's info.
### How was this patch tested?
`TestCelebornCliCommands#master --show-cluster-apps-info`
Closes #3530 from SteNicholas/CELEBORN-1258.
Authored-by: SteNicholas <[email protected]>
Signed-off-by: SteNicholas <[email protected]>
(cherry picked from commit 7efff4bdbe4d55f18a7e5cb41cecbb142c06bdf2)
Signed-off-by: SteNicholas <[email protected]>
---
.../scala/org/apache/celeborn/cli/master/MasterOptions.scala | 9 ++++++++-
.../org/apache/celeborn/cli/master/MasterSubcommandImpl.scala | 4 ++++
.../scala/org/apache/celeborn/cli/TestCelebornCliCommands.scala | 5 +++++
docs/celeborn_cli.md | 8 +++++---
4 files changed, 22 insertions(+), 4 deletions(-)
diff --git
a/cli/src/main/scala/org/apache/celeborn/cli/master/MasterOptions.scala
b/cli/src/main/scala/org/apache/celeborn/cli/master/MasterOptions.scala
index c8c93deee..b25ea2fe2 100644
--- a/cli/src/main/scala/org/apache/celeborn/cli/master/MasterOptions.scala
+++ b/cli/src/main/scala/org/apache/celeborn/cli/master/MasterOptions.scala
@@ -24,9 +24,16 @@ final class MasterOptions {
@Option(names = Array("--show-masters-info"), description = Array("Show
master group info"))
private[master] var showMastersInfo: Boolean = _
- @Option(names = Array("--show-cluster-apps"), description = Array("Show
cluster applications"))
+ @Option(
+ names = Array("--show-cluster-apps"),
+ description = Array("Show cluster application's ids"))
private[master] var showClusterApps: Boolean = _
+ @Option(
+ names = Array("--show-cluster-apps-info"),
+ description = Array("Show cluster application's info"))
+ private[master] var showClusterAppsInfo: Boolean = _
+
@Option(names = Array("--show-cluster-shuffles"), description = Array("Show
cluster shuffles"))
private[master] var showClusterShuffles: Boolean = _
diff --git
a/cli/src/main/scala/org/apache/celeborn/cli/master/MasterSubcommandImpl.scala
b/cli/src/main/scala/org/apache/celeborn/cli/master/MasterSubcommandImpl.scala
index 444f5f0f9..579a153a6 100644
---
a/cli/src/main/scala/org/apache/celeborn/cli/master/MasterSubcommandImpl.scala
+++
b/cli/src/main/scala/org/apache/celeborn/cli/master/MasterSubcommandImpl.scala
@@ -33,6 +33,7 @@ class MasterSubcommandImpl extends MasterSubcommand {
override def run(): Unit = {
if (masterOptions.showMastersInfo) log(runShowMastersInfo)
if (masterOptions.showClusterApps) log(runShowClusterApps)
+ if (masterOptions.showClusterAppsInfo) log(runShowClusterAppsInfo)
if (masterOptions.showClusterShuffles) log(runShowClusterShuffles)
if (masterOptions.excludeWorkers) log(runExcludeWorkers)
if (masterOptions.removeExcludedWorkers) log(runRemoveExcludedWorkers)
@@ -68,6 +69,9 @@ class MasterSubcommandImpl extends MasterSubcommand {
private[master] def runShowClusterApps: ApplicationsHeartbeatResponse =
applicationApi.getApplications(commonOptions.getAuthHeader)
+ private[master] def runShowClusterAppsInfo: ApplicationInfoResponse =
+ applicationApi.getApplicationsInfo(commonOptions.getAuthHeader)
+
private[master] def runShowClusterShuffles: ShufflesResponse =
shuffleApi.getShuffles(commonOptions.getAuthHeader)
diff --git
a/cli/src/test/scala/org/apache/celeborn/cli/TestCelebornCliCommands.scala
b/cli/src/test/scala/org/apache/celeborn/cli/TestCelebornCliCommands.scala
index 5422239d1..4f4d44919 100644
--- a/cli/src/test/scala/org/apache/celeborn/cli/TestCelebornCliCommands.scala
+++ b/cli/src/test/scala/org/apache/celeborn/cli/TestCelebornCliCommands.scala
@@ -189,6 +189,11 @@ class TestCelebornCliCommands extends CelebornFunSuite
with MiniClusterFeature {
captureOutputAndValidateResponse(args, "ApplicationsHeartbeatResponse")
}
+ test("master --show-cluster-apps-info") {
+ val args = prepareMasterArgs() :+ "--show-cluster-apps-info"
+ captureOutputAndValidateResponse(args, "ApplicationInfoResponse")
+ }
+
test("master --show-cluster-shuffles") {
val args = prepareMasterArgs() :+ "--show-cluster-shuffles"
captureOutputAndValidateResponse(args, "ShufflesResponse")
diff --git a/docs/celeborn_cli.md b/docs/celeborn_cli.md
index b301208a3..d6e88e8bf 100644
--- a/docs/celeborn_cli.md
+++ b/docs/celeborn_cli.md
@@ -85,8 +85,8 @@ Usage: celeborn-cli master [-hV] [--apps=appId]
[--auth-header=authHeader]
h3...] [--hostport=host:port] [--upsert-configs=k1:
v1,k2:v2,k3:v3...] [--worker-ids=w1,w2,w3...]
(--show-masters-info | --show-cluster-apps |
- --show-cluster-shuffles | --exclude-worker |
- --remove-excluded-worker |
+ --show-cluster-apps-info | --show-cluster-shuffles |
+ --exclude-worker | --remove-excluded-worker |
--send-worker-event=IMMEDIATELY | DECOMMISSION |
DECOMMISSION_THEN_IDLE | GRACEFUL | RECOMMISSION |
NONE | --show-worker-event-info |
@@ -140,7 +140,9 @@ Usage: celeborn-cli master [-hV] [--apps=appId]
[--auth-header=authHeader]
--send-worker-event=IMMEDIATELY | DECOMMISSION | DECOMMISSION_THEN_IDLE
|
GRACEFUL | RECOMMISSION | NONE
Send an event to a worker
- --show-cluster-apps Show cluster applications
+ --show-cluster-apps Show cluster application's ids
+ --show-cluster-apps-info
+ Show cluster application's info
--show-cluster-shuffles
Show cluster shuffles
--show-conf Show master conf