GitHub user tcondie opened a pull request:
https://github.com/apache/spark/pull/16686
[SPARK-18682][SS] Batch Source for Kafka
## What changes were proposed in this pull request?
Today, you can start a stream that reads from kafka. However, given kafka's
configurable retention period, it seems like sometimes you might just want to
read all of the data that is available now. As such we should add a version
that works with spark.read as well.
The options should be the same as the streaming kafka source, with the
following differences:
startingOffsets should default to earliest, and should not allow latest
(which would always be empty).
endingOffsets should also be allowed and should default to latest. the same
assign json format as startingOffsets should also be accepted.
It would be really good, if things like .limit(n) were enough to prevent
all the data from being read (this might just work).
## How was this patch tested?
KafkaRelationSuite was added for testing batch queries via KafkaUtils.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/tcondie/spark SPARK-18682
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/16686.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #16686
----
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]