Skip to content

Commit

Permalink
Qualification tool Enable UI by default (#5677)
Browse files Browse the repository at this point in the history
Signed-off-by: Ahmed Hussein (amahussein) <a@ahussein.me>
  • Loading branch information
amahussein authored May 27, 2022
1 parent af865fd commit e860228
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,12 @@ Usage: java -cp rapids-4-spark-tools_2.12-<version>.jar:$SPARK_HOME/jars/*
val userName: ScallopOption[String] =
opt[String](required = false,
descr = "Applications which a particular user has submitted." )
val uiEnabled: ScallopOption[Boolean] =
opt[Boolean](required = false,
descr = "Whether to render the report into HTML pages. Default is false",
default = Some(QualificationArgs.DEFAULT_UI_ENABLED))
val htmlReport : ScallopOption[Boolean] =
toggle("html-report",
default = Some(true),
prefix = "no-",
descrYes = "Generates an HTML Report. Enabled by default.",
descrNo = "Disables generating the HTML report.")

validate(order) {
case o if (QualificationArgs.isOrderAsc(o) || QualificationArgs.isOrderDesc(o)) => Right(Unit)
Expand Down Expand Up @@ -158,8 +160,6 @@ Usage: java -cp rapids-4-spark-tools_2.12-<version>.jar:$SPARK_HOME/jars/*
}

object QualificationArgs {
val DEFAULT_UI_ENABLED = false

def isOrderAsc(order: String): Boolean = {
order.toLowerCase.startsWith("asc")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ object QualificationMain extends Logging {
val timeout = appArgs.timeout.toOption
val reportReadSchema = appArgs.reportReadSchema.getOrElse(false)
val order = appArgs.order.getOrElse("desc")
val uiEnabled = appArgs.uiEnabled.getOrElse(false)
val uiEnabled = appArgs.htmlReport.getOrElse(false)

val hadoopConf = new Configuration()

Expand Down

0 comments on commit e860228

Please sign in to comment.