aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorXin Ren <iamshrek@126.com>2016-03-03 09:32:47 -0800
committerXiangrui Meng <meng@databricks.com>2016-03-03 09:32:47 -0800
commit70f6f9649bdb13b6745473b7edc4cd06b10f99d2 (patch)
tree72b9f2de8f67f5917a37f65b2cc805243b413fe2 /data
parent645c3a85e2029928d37ec2de9ef5a2d884620b9b (diff)
downloadspark-70f6f9649bdb13b6745473b7edc4cd06b10f99d2.tar.gz
spark-70f6f9649bdb13b6745473b7edc4cd06b10f99d2.tar.bz2
spark-70f6f9649bdb13b6745473b7edc4cd06b10f99d2.zip
[SPARK-13013][DOCS] Replace example code in mllib-clustering.md using include_example
Replace example code in mllib-clustering.md using include_example https://issues.apache.org/jira/browse/SPARK-13013 The example code in the user guide is embedded in the markdown and hence it is not easy to test. It would be nice to automatically test them. This JIRA is to discuss options to automate example code testing and see what we can do in Spark 1.6. Goal is to move actual example code to spark/examples and test compilation in Jenkins builds. Then in the markdown, we can reference part of the code to show in the user guide. This requires adding a Jekyll tag that is similar to https://github.com/jekyll/jekyll/blob/master/lib/jekyll/tags/include.rb, e.g., called include_example. `{% include_example scala/org/apache/spark/examples/mllib/KMeansExample.scala %}` Jekyll will find `examples/src/main/scala/org/apache/spark/examples/mllib/KMeansExample.scala` and pick code blocks marked "example" and replace code block in `{% highlight %}` in the markdown. See more sub-tasks in parent ticket: https://issues.apache.org/jira/browse/SPARK-11337 Author: Xin Ren <iamshrek@126.com> Closes #11116 from keypointt/SPARK-13013.
Diffstat (limited to 'data')
-rw-r--r--data/mllib/streaming_kmeans_data_test.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/data/mllib/streaming_kmeans_data_test.txt b/data/mllib/streaming_kmeans_data_test.txt
new file mode 100644
index 0000000000..649a0d6cf4
--- /dev/null
+++ b/data/mllib/streaming_kmeans_data_test.txt
@@ -0,0 +1,2 @@
+(1.0), [1.7, 0.4, 0.9]
+(2.0), [2.2, 1.8, 0.0]