Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class DeleteBatchCommand(cliConfig: CliConfig) extends Command[Batch](cliConfig)

val result = batchRestApi.deleteBatch(batchId)

info(JsonUtils.toJson(result))
info(JsonUtils.toPrettyJson(result))

if (!result.isSuccess) {
val batch = batchRestApi.getBatchById(batchId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package org.apache.kyuubi.ctl.cmd.submit

import org.apache.kyuubi.client.api.v1.dto.Batch
import org.apache.kyuubi.client.util.{BatchUtils, JsonUtils}
import org.apache.kyuubi.client.util.BatchUtils
import org.apache.kyuubi.ctl.ControlCliException
import org.apache.kyuubi.ctl.cmd.Command
import org.apache.kyuubi.ctl.cmd.create.CreateBatchCommand
Expand Down Expand Up @@ -48,7 +48,8 @@ class SubmitBatchCommand(cliConfig: CliConfig) extends Command[Batch](cliConfig)
batch = logBatchCommand.doRun()

if (BatchUtils.isTerminalState(batch.getState) && !BatchUtils.isFinishedState(batch.getState)) {
error(s"Batch ${batch.getId} failed: ${JsonUtils.toJson(batch)}")
error(s"Batch ${batch.getId} failed:")
error(Render.renderBatchInfo(batch))
throw ControlCliException(1)
}

Expand Down
Loading