aboutsummaryrefslogtreecommitdiff
path: root/sbin/start-history-server.sh
diff options
context:
space:
mode:
authorMarcelo Vanzin <vanzin@cloudera.com>2014-06-23 13:53:44 -0700
committerPatrick Wendell <pwendell@gmail.com>2014-06-23 13:53:44 -0700
commit21ddd7d1e9f8e2a726427f32422c31706a20ba3f (patch)
tree0e789473fdf117d4768fca9f20b7169b3ebbc4ff /sbin/start-history-server.sh
parent6dc6722a666ec1afc6fb13e7110907d8f5f9cd9d (diff)
downloadspark-21ddd7d1e9f8e2a726427f32422c31706a20ba3f.tar.gz
spark-21ddd7d1e9f8e2a726427f32422c31706a20ba3f.tar.bz2
spark-21ddd7d1e9f8e2a726427f32422c31706a20ba3f.zip
[SPARK-1768] History server enhancements.
Two improvements to the history server: - Separate the HTTP handling from history fetching, so that it's easy to add new backends later (thinking about SPARK-1537 in the long run) - Avoid loading all UIs in memory. Do lazy loading instead, keeping a few in memory for faster access. This allows the app limit to go away, since holding just the listing in memory shouldn't be too expensive unless the user has millions of completed apps in the history (at which point I'd expect other issues to arise aside from history server memory usage, such as FileSystem.listStatus() starting to become ridiculously expensive). I also fixed a few minor things along the way which aren't really worth mentioning. I also removed the app's log path from the UI since that information may not even exist depending on which backend is used (even though there is only one now). Author: Marcelo Vanzin <vanzin@cloudera.com> Closes #718 from vanzin/hist-server and squashes the following commits: 53620c9 [Marcelo Vanzin] Add mima exclude, fix scaladoc wording. c21f8d8 [Marcelo Vanzin] Feedback: formatting, docs. dd8cc4b [Marcelo Vanzin] Standardize on using spark.history.* configuration. 4da3a52 [Marcelo Vanzin] Remove UI from ApplicationHistoryInfo. 2a7f68d [Marcelo Vanzin] Address review feedback. 4e72c77 [Marcelo Vanzin] Remove comment about ordering. 249bcea [Marcelo Vanzin] Remove offset / count from provider interface. ca5d320 [Marcelo Vanzin] Remove code that deals with unfinished apps. 6e2432f [Marcelo Vanzin] Second round of feedback. b2c570a [Marcelo Vanzin] Make class package-private. 4406f61 [Marcelo Vanzin] Cosmetic change to listing header. e852149 [Marcelo Vanzin] Initialize new app array to expected size. e8026f4 [Marcelo Vanzin] Review feedback. 49d2fd3 [Marcelo Vanzin] Fix a comment. 91e96ca [Marcelo Vanzin] Fix scalastyle issues. 6fbe0d8 [Marcelo Vanzin] Better handle failures when loading app info. eee2f5a [Marcelo Vanzin] Ensure server.stop() is called when shutting down. bda2fa1 [Marcelo Vanzin] Rudimentary paging support for the history UI. b284478 [Marcelo Vanzin] Separate history server from history backend.
Diffstat (limited to 'sbin/start-history-server.sh')
-rwxr-xr-xsbin/start-history-server.sh17
1 files changed, 8 insertions, 9 deletions
diff --git a/sbin/start-history-server.sh b/sbin/start-history-server.sh
index 4a90c68763..e30493da32 100755
--- a/sbin/start-history-server.sh
+++ b/sbin/start-history-server.sh
@@ -19,19 +19,18 @@
# Starts the history server on the machine this script is executed on.
#
-# Usage: start-history-server.sh <base-log-dir> [<web-ui-port>]
-# Example: ./start-history-server.sh --dir /tmp/spark-events --port 18080
+# Usage: start-history-server.sh
+#
+# Use the SPARK_HISTORY_OPTS environment variable to set history server configuration.
#
sbin=`dirname "$0"`
sbin=`cd "$sbin"; pwd`
-if [ $# -lt 1 ]; then
- echo "Usage: ./start-history-server.sh <base-log-dir>"
- echo "Example: ./start-history-server.sh /tmp/spark-events"
- exit
+if [ $# != 0 ]; then
+ echo "Using command line arguments for setting the log directory is deprecated. Please "
+ echo "set the spark.history.fs.logDirectory configuration option instead."
+ export SPARK_HISTORY_OPTS="$SPARK_HISTORY_OPTS -Dspark.history.fs.logDirectory=$1"
fi
-LOG_DIR=$1
-
-"$sbin"/spark-daemon.sh start org.apache.spark.deploy.history.HistoryServer 1 --dir "$LOG_DIR"
+exec "$sbin"/spark-daemon.sh start org.apache.spark.deploy.history.HistoryServer 1