1. [SPARK-25711][CORE] Improve show usage (details)
Commit 26c1b959cf29b8552beb715cc5d39288d5298bdc by dongjoon
[SPARK-25711][CORE] Improve show usage
User-Friendly and remove deprecated options
## What changes were proposed in this pull request?
Currently, if we try run
./ -h
``` We will get such error
``` File -h does not exist
1. This is not User-Friendly.  For option `-h` or `--help`, it should be
parsed correctly and show the usage of the class/script. 2. We can
remove deprecated options for setting event log directory through
command line options.
After fix, we can get following output:
``` Usage: ./sbin/ [options]
--properties-file FILE      Path to a custom Spark properties file.
                             Default is conf/spark-defaults.conf.
Configuration options can be set by setting the corresponding JVM system
property. History Server options are always available; additional
options depend on the provider.
History Server options:
  spark.history.ui.port              Port where server will listen for
                                    (default 18080)
spark.history.acls.enable          Whether to enable view acls for all
                                    (default false)
spark.history.provider             Name of history provider class
(defaults to
                                    file system-based provider)
spark.history.retainedApplications Max number of application UIs to
keep loaded in memory
                                    (default 50) FsHistoryProvider
  spark.history.fs.logDirectory      Directory where app logs are stored
                                    (default: file:/tmp/spark-events)
spark.history.fs.updateInterval    How often to reload log data from
                                    (in seconds, default: 10)
## How was this patch tested?
Manual test
Closes #22699 from gengliangwang/refactorSHSUsage.
Authored-by: Gengliang Wang <>
Signed-off-by: Dongjoon Hyun <>
The file was modifiedsbin/ (diff)
The file was modifiedcore/src/main/scala/org/apache/spark/deploy/history/HistoryServerArguments.scala (diff)
The file was modifiedcore/src/test/scala/org/apache/spark/deploy/history/HistoryServerArgumentsSuite.scala (diff)