Github user jiangxb1987 commented on a diff in the pull request: https://github.com/apache/spark/pull/22699#discussion_r224507524 --- Diff: core/src/main/scala/org/apache/spark/deploy/history/HistoryServerArguments.scala --- @@ -34,26 +34,25 @@ private[history] class HistoryServerArguments(conf: SparkConf, args: Array[Strin @tailrec private def parse(args: List[String]): Unit = { - if (args.length == 1) { - setLogDirectory(args.head) - } else { - args match { - case ("--dir" | "-d") :: value :: tail => - setLogDirectory(value) - parse(tail) - - case ("--help" | "-h") :: tail => - printUsageAndExit(0) - - case ("--properties-file") :: value :: tail => - propertiesFile = value - parse(tail) - - case Nil => - - case _ => - printUsageAndExit(1) - } + args match { + case ("--dir" | "-d") :: value :: tail => + setLogDirectory(value) + parse(tail) + + case ("--help" | "-h") :: tail => + printUsageAndExit(0) + + case ("--properties-file") :: value :: tail => + propertiesFile = value + parse(tail) + + case dir :: Nil => --- End diff -- I'm not against the change, but we shall mention it in the PR desc.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org