GitHub user tdas opened a pull request:
https://github.com/apache/spark/pull/16205
[SPARK-18776][SS] Make Offset for FileStreamSource corrected formatted in
json
## What changes were proposed in this pull request?
- Changed FileStreamSource to use new FileStreamSourceOffset rather than
LongOffset. The field is named as `logOffset` to make it more clear that this
is a offset in the file stream log.
- Fixed bug in FileStreamSourceLog, the field endId in the
FileStreamSourceLog.get(startId, endId) was not being used at all. No test
caught it earlier. Only my updated tests caught it.
Other minor changes
- Dont use batchId in the FileStreamSource, as calling it batch id is
extremely miss leading. With multiple sources, it may happen that a new batch
has no new data from a file source. So offset of FileStreamSource != batchId
after that batch.
## How was this patch tested?
Updated unit test.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/tdas/spark SPARK-18776
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/16205.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 #16205
----
commit 7b31dbcc1bfb9e0d67f0e49f418a6eed043e8018
Author: Tathagata Das <[email protected]>
Date: 2016-12-08T03:22:16Z
Make FileStreamSourceOffset, and fix FileStreamSourceLog bug
commit 5dda0f3b18ed52b2cd89b52d3427bae63cdc866b
Author: Tathagata Das <[email protected]>
Date: 2016-12-08T03:41:23Z
Renamed stuff
----
---
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]