Patrick Wendell created FLUME-1683:
--------------------------------------
Summary: Fix Time Granularity Bug in SpoolingFileLineReader
Key: FLUME-1683
URL: https://issues.apache.org/jira/browse/FLUME-1683
Project: Flume
Issue Type: Bug
Reporter: Patrick Wendell
Assignee: Patrick Wendell
This patch fixes a test in the SpoolingFileLineReader, and a bug associated
with that test:
The issue is related to the way that the source sorts files which are
candidates for ingestion. It sorts the files by timestamp, and the unit test
assumes that if it creates two files:
x = new File()
Files.write("something", x)
y = new File()
Files.write("something", y)
// Read from files
that x will be processed before y. In my filesystem, the time granularity is
only 1 second, so these files were actually processed in a non-deterministic
order. On your filesystem, they were processed in the correct order, and the
test (correctly) failed.
I didn't notice that the test was mixed up because it was passing for me due to
this issue.
I updated the sorting order to take into account filename when there is a tie
in the timestamp, so at least we have a consistent ordering we can test.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira