diff options
author | Feynman Liang <feynman.liang@gmail.com> | 2015-11-30 15:38:44 -0800 |
---|---|---|
committer | Xiangrui Meng <meng@databricks.com> | 2015-11-30 15:38:44 -0800 |
commit | 55358889309cf2d856b72e72e0f3081dfdf61cfa (patch) | |
tree | c52e01ffa7276e514bfb622f704afa6b3be264d3 /examples/src/main | |
parent | de64b65f7cf2ac58c1abc310ba547637fdbb8557 (diff) | |
download | spark-55358889309cf2d856b72e72e0f3081dfdf61cfa.tar.gz spark-55358889309cf2d856b72e72e0f3081dfdf61cfa.tar.bz2 spark-55358889309cf2d856b72e72e0f3081dfdf61cfa.zip |
[SPARK-11960][MLLIB][DOC] User guide for streaming tests
CC jkbradley mengxr josepablocam
Author: Feynman Liang <feynman.liang@gmail.com>
Closes #10005 from feynmanliang/streaming-test-user-guide.
Diffstat (limited to 'examples/src/main')
-rw-r--r-- | examples/src/main/scala/org/apache/spark/examples/mllib/StreamingTestExample.scala | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/src/main/scala/org/apache/spark/examples/mllib/StreamingTestExample.scala b/examples/src/main/scala/org/apache/spark/examples/mllib/StreamingTestExample.scala index ab29f90254..b6677c6476 100644 --- a/examples/src/main/scala/org/apache/spark/examples/mllib/StreamingTestExample.scala +++ b/examples/src/main/scala/org/apache/spark/examples/mllib/StreamingTestExample.scala @@ -64,6 +64,7 @@ object StreamingTestExample { dir.toString }) + // $example on$ val data = ssc.textFileStream(dataDir).map(line => line.split(",") match { case Array(label, value) => (label.toBoolean, value.toDouble) }) @@ -75,6 +76,7 @@ object StreamingTestExample { val out = streamingTest.registerStream(data) out.print() + // $example off$ // Stop processing if test becomes significant or we time out var timeoutCounter = numBatchesTimeout |