Skip to content

Commit 5134b9b

Browse files
committed
readme
1 parent f31d202 commit 5134b9b

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

cli/src/main/scala/org/apache/celeborn/cli/master/MasterSubcommandImpl.scala

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,15 @@
1818
package org.apache.celeborn.cli.master
1919

2020
import java.util
21+
2122
import scala.collection.JavaConverters._
23+
24+
import org.apache.commons.lang3.StringUtils
2225
import picocli.CommandLine.{Command, ParameterException}
26+
2327
import org.apache.celeborn.cli.config.CliConfigManager
2428
import org.apache.celeborn.rest.v1.model._
2529
import org.apache.celeborn.rest.v1.model.SendWorkerEventRequest.EventTypeEnum
26-
import org.apache.commons.lang3.StringUtils
2730

2831
@Command(name = "master", mixinStandardHelpOptions = true)
2932
class MasterSubcommandImpl extends Runnable with MasterSubcommand {
@@ -222,18 +225,26 @@ class MasterSubcommandImpl extends Runnable with MasterSubcommand {
222225
private[master] def runShowContainerInfo: ContainerInfo = defaultApi.getContainerInfo
223226

224227
override private[master] def reviseLostShuffles: HandleResponse = {
225-
val app = commonOptions.apps
226-
if (app.contains(",")) {
228+
if (StringUtils.isEmpty(commonOptions.apps)) {
227229
throw new ParameterException(
228230
spec.commandLine(),
229-
"Only one application id can be provided for this command.")
231+
"Application id must be provided for this command.")
230232
}
231233
if (StringUtils.isEmpty(reviseLostShuffleOptions.shuffleIds)) {
232234
throw new ParameterException(
233235
spec.commandLine(),
234236
"Shuffle ids must be provided for this command.")
235237
}
236-
val shuffleIds = util.Arrays.asList[Integer](reviseLostShuffleOptions.shuffleIds.split(",").map(Integer.valueOf): _*)
238+
239+
val app = commonOptions.apps
240+
if (app.contains(",")) {
241+
throw new ParameterException(
242+
spec.commandLine(),
243+
"Only one application id can be provided for this command.")
244+
}
245+
246+
val shuffleIds = util.Arrays.asList[Integer](
247+
reviseLostShuffleOptions.shuffleIds.split(",").map(Integer.valueOf): _*)
237248
val request =
238249
new ReviseLostShufflesRequest().appId(app).shuffleIds(shuffleIds)
239250
applicationApi.reviseLostShuffles(request)
@@ -243,9 +254,9 @@ class MasterSubcommandImpl extends Runnable with MasterSubcommand {
243254
if (StringUtils.isEmpty(commonOptions.apps)) {
244255
throw new ParameterException(
245256
spec.commandLine(),
246-
"App ids must be provided for this command.")
257+
"Applications must be provided for this command.")
247258
}
248-
val appIds = util.Arrays.asList[String](reviseLostShuffleOptions.shuffleIds.split(","): _*)
259+
val appIds = util.Arrays.asList[String](commonOptions.apps.split(","): _*)
249260
val request = new DeleteAppsRequest().apps(appIds)
250261
applicationApi.deleteApps(request)
251262
}

openapi/openapi-client/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Celeborn OpenAPI Client
22

3+
**Note:** It is recommended to use `under_score` style naming for new RESTful APIs to maintain consistency and readability.
4+
35
To update the OpenAPI specification
46
- just update the specification under `openapi/openapi-client/src/main/openapi3/` and keep the schema definitions consistent between master and worker.
57
- Install JDK 11 or above by whatever mechanism is appropriate for your system, and set that version to be the default Java version (e.g., by setting env variable `JAVA_HOME`)

0 commit comments

Comments
 (0)