Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/718#discussion_r13621315
--- Diff:
core/src/main/scala/org/apache/spark/deploy/history/HistoryServerArguments.scala
---
@@ -67,10 +69,29 @@ private[spark] class HistoryServerArguments(args:
Array[String]) {
private def printUsageAndExit(exitCode: Int) {
System.err.println(
- "Usage: HistoryServer [options]\n" +
- "\n" +
- "Options:\n" +
- " -d DIR, --dir DIR Location of event log files")
+ """
+ |Usage: HistoryServer [-d logDir]
+ |
+ |The preferred way to pass options is to set the configuration below
using
+ |SPARK_HISTORY_OPTS. The "-d" command line argument is avalable for
backwards
--- End diff --
Right now there are two ways of setting the logging directory, one through
the command line and the other through `spark.history.fs.logDirectory`. In the
long run, we should favor the latter, as your comments seem to suggest. Given
that, I think we should just remove all documentation of the command line way,
but for backward compatibility keep the code that supports it. Otherwise, it's
a little confusing for the user if we document both ways. (Note that there are
multiple files that document this: HistoryServer.scala,
HistoryServerArguments.scala, and monitoring.md)
Then, in `start-history-server.sh`, if the user passes in a command line
argument, we should print a deprecated warning, and convert that to
`spark.history.fs.logDirectory` as a JVM `-D` option.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---