GitHub user tdas opened a pull request:
https://github.com/apache/spark/pull/12592
[SPARK-14833][SQL][STREAMING][TEST] Refactor StreamTests to test for source
fault-tolerance correctly.
## What changes were proposed in this pull request?
Current StreamTest allows testing of a streaming Dataset generated
explicitly wraps a source. This is different from the actual production code
path where the source object is dynamically created through a DataSource object
every time a query is started. So all the fault-tolerance testing in
FileSourceSuite and FileSourceStressSuite is not really testing the actual code
path as they are just reusing the FileStreamSource object. This PR fixes
StreamTest and the FileSource***Suite to test this correctly. Instead of
maintaining a mapping of source --> expected offset in StreamTest (which
requires reuse of source object), it now maintains a mapping of source index
--> offset, so that it is independent of the source object.
## How was this patch tested?
Refactored unit tests.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/tdas/spark SPARK-14833
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/12592.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 #12592
----
commit ef65ad768d6e6ca70b6339c43b57ee61576f77ec
Author: Tathagata Das <[email protected]>
Date: 2016-04-22T00:33:06Z
Refactored test code for better testing
----
---
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]