Uh oh!
There was an error while loading. Please reload this page.
[SPARK-19041][SS] Fix code snippet compilation issues in Structured Streaming Programming Guide - #16442
[SPARK-19041][SS] Fix code snippet compilation issues in Structured Streaming Programming Guide#16442lw-lin wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
type won't compile in scala since it is a keyword, hence here change it to deviceType
There was a problem hiding this comment.
file format requires checkpointLocation and path to be explicitly specified
There was a problem hiding this comment.
currently we don't have parquet(...)/csv(...)/text(...)/etc. methods
| query.recentProgress // an array of the most recent process updates for this query | ||
| query.sinkStatus() // progress information about data written to the output sink | ||
| query.lastProgress// the most recent process update of this streaming query |
There was a problem hiding this comment.
we've wrapped source/sink statuses into recentProcesses/lastProcess
| } | ||
| @Overrides void onQueryProgress(QueryProgressEvent queryProgress) { | ||
| @Override | ||
| public void onQueryProgress(QueryProgressEvent queryProgress) { |
There was a problem hiding this comment.
It's @Override in java, and these methods must be public
lw-lin
commented
Dec 31, 2016
@srowen would you take a look, thanks! |
| // Running average signal for each device type | ||
| import org.apache.spark.sql.expressions.scalalang.typed._ | ||
| ds.groupByKey(_.type).agg(typed.avg(_.signal)) // using typed API | ||
| import org.apache.spark.sql.expressions.scalalang.typed |
There was a problem hiding this comment.
this import should be ….scalalang.typed rather than ….scalalang.typed._
SparkQA
commented
Dec 31, 2016
Test build #70763 has finished for PR 16442 at commit
|
SparkQA
commented
Dec 31, 2016
Test build #70764 has finished for PR 16442 at commit
|
srowen
left a comment
There was a problem hiding this comment.
I take your word for it on the recentProgress()/lastProgress() change but looks OK except for one comment
| noAggDF | ||
| .writeStream() | ||
| .parquet("path/to/destination/directory") | ||
| .writeStream |
There was a problem hiding this comment.
This is a method call? it needs parens then.
SparkQA
commented
Jan 1, 2017
Test build #70769 has finished for PR 16442 at commit
|
srowen
commented
Jan 2, 2017
Merged to master |
Thanks! LGTM. I'm going to also cherry-pick to branch 2.1 in case we may want to push new docs to the website.. |
…treaming Programming Guide ## What changes were proposed in this pull request? Currently some code snippets in the programming guide just do not compile. We should fix them. ## How was this patch tested? ``` SKIP_API=1 jekyll build ``` ## Screenshot from part of the change:  Author: Liwei Lin <lwlin7@gmail.com> Closes#16442 from lw-lin/ss-pro-guide-.
tdas
commented
Jan 3, 2017
@lw-lin thanks for catching these! :) |
…treaming Programming Guide ## What changes were proposed in this pull request? Currently some code snippets in the programming guide just do not compile. We should fix them. ## How was this patch tested? ``` SKIP_API=1 jekyll build ``` ## Screenshot from part of the change:  Author: Liwei Lin <lwlin7@gmail.com> Closesapache#16442 from lw-lin/ss-pro-guide-.
…treaming Programming Guide ## What changes were proposed in this pull request? Currently some code snippets in the programming guide just do not compile. We should fix them. ## How was this patch tested? ``` SKIP_API=1 jekyll build ``` ## Screenshot from part of the change:  Author: Liwei Lin <lwlin7@gmail.com> Closesapache#16442 from lw-lin/ss-pro-guide-.
What changes were proposed in this pull request?
Currently some code snippets in the programming guide just do not compile. We should fix them.
How was this patch tested?
Screenshot from part of the change: