aboutsummaryrefslogtreecommitdiff
path: root/streaming/src/main
diff options
context:
space:
mode:
authorTathagata Das <tathagata.das1565@gmail.com>2013-01-19 23:50:17 -0800
committerTathagata Das <tathagata.das1565@gmail.com>2013-01-19 23:50:17 -0800
commit214345ceace634ec9cc83c4c85b233b699e0d219 (patch)
tree0ba6c9f68bbdb64d6505c48bffc5954c066b4989 /streaming/src/main
parentf466ee44bc65779f6bb9c1ba488a87edfc9b28a3 (diff)
downloadspark-214345ceace634ec9cc83c4c85b233b699e0d219.tar.gz
spark-214345ceace634ec9cc83c4c85b233b699e0d219.tar.bz2
spark-214345ceace634ec9cc83c4c85b233b699e0d219.zip
Fixed issue https://spark-project.atlassian.net/browse/STREAMING-29, along with updates to doc comments in SparkContext.checkpoint().
Diffstat (limited to 'streaming/src/main')
-rw-r--r--streaming/src/main/scala/spark/streaming/DStream.scala8
1 files changed, 7 insertions, 1 deletions
diff --git a/streaming/src/main/scala/spark/streaming/DStream.scala b/streaming/src/main/scala/spark/streaming/DStream.scala
index fbe3cebd6d..c4442b6a0c 100644
--- a/streaming/src/main/scala/spark/streaming/DStream.scala
+++ b/streaming/src/main/scala/spark/streaming/DStream.scala
@@ -154,11 +154,17 @@ abstract class DStream[T: ClassManifest] (
assert(
!mustCheckpoint || checkpointDuration != null,
- "The checkpoint interval for " + this.getClass.getSimpleName + " has not been set. " +
+ "The checkpoint interval for " + this.getClass.getSimpleName + " has not been set." +
" Please use DStream.checkpoint() to set the interval."
)
assert(
+ checkpointDuration == null || ssc.sc.checkpointDir.isDefined,
+ "The checkpoint directory has not been set. Please use StreamingContext.checkpoint()" +
+ " or SparkContext.checkpoint() to set the checkpoint directory."
+ )
+
+ assert(
checkpointDuration == null || checkpointDuration >= slideDuration,
"The checkpoint interval for " + this.getClass.getSimpleName + " has been set to " +
checkpointDuration + " which is lower than its slide time (" + slideDuration + "). " +