Skip to content

Commit 7590937

Browse files
committed
Added warning
1 parent 9a81b93 commit 7590937

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

streaming/src/main/scala/org/apache/spark/streaming/dstream/ReceiverInputDStream.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ abstract class ReceiverInputDStream[T: ClassTag](@transient ssc_ : StreamingCont
119119
val validBlockIds = blockIds.filter { id =>
120120
ssc.sparkContext.env.blockManager.master.contains(id)
121121
}
122+
if (validBlockIds.size != blockIds.size) {
123+
logWarning("Some blocks could not be recovered as they were not found in memory. " +
124+
"To prevent such data loss, enabled Write Ahead Log (see programming guide " +
125+
"for more details.")
126+
}
122127
new BlockRDD[T](ssc.sc, validBlockIds)
123128
}
124129
} else {

0 commit comments

Comments
 (0)