Skip to content

Conversation

@tdas
Copy link
Contributor

@tdas tdas commented Dec 8, 2016

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.

@tdas
Copy link
Contributor Author

tdas commented Dec 8, 2016

@marmbrus @zsxwing

* Offset for the [[FileStreamSource]].
* @param logOffset Position in the [[FileStreamSourceLog]]
*/
case class FileStreamSourceOffset(logOffset: Long) extends Offset {
Copy link
Contributor Author

@tdas tdas Dec 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I named it logoffset to make a more clear that this is a offset in the log of FileStreamSource

@SparkQA
Copy link

SparkQA commented Dec 8, 2016

Test build #69841 has finished for PR 16205 at commit 5dda0f3.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • case class FileStreamSourceOffset(logOffset: Long) extends Offset

@zsxwing
Copy link
Member

zsxwing commented Dec 8, 2016

LGTM. Merging to master and 2.1.

@zsxwing
Copy link
Member

zsxwing commented Dec 8, 2016

Oh, please also support to read the old format in case RC2 is passed.

@zsxwing
Copy link
Member

zsxwing commented Dec 8, 2016

LGTM pending tests

@SparkQA
Copy link

SparkQA commented Dec 9, 2016

Test build #69888 has finished for PR 16205 at commit 05f8b56.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@tdas
Copy link
Contributor Author

tdas commented Dec 9, 2016

Merging to master and 2.1

asfgit pushed a commit that referenced this pull request Dec 9, 2016
…d 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.

Author: Tathagata Das <[email protected]>

Closes #16205 from tdas/SPARK-18776.

(cherry picked from commit 458fa33)
Signed-off-by: Tathagata Das <[email protected]>
@asfgit asfgit closed this in 458fa33 Dec 9, 2016
robert3005 pushed a commit to palantir/spark that referenced this pull request Dec 15, 2016
…d 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.

Author: Tathagata Das <[email protected]>

Closes apache#16205 from tdas/SPARK-18776.
uzadude pushed a commit to uzadude/spark that referenced this pull request Jan 27, 2017
…d 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.

Author: Tathagata Das <[email protected]>

Closes apache#16205 from tdas/SPARK-18776.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants