[ https://issues.apache.org/jira/browse/FLUME-2777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14906864#comment-14906864 ]
Hari Shreedharan commented on FLUME-2777: ----------------------------------------- I see test failures here: {code} testFileRoll(org.apache.flume.source.taildir.TestTaildirSource) Time elapsed: 15080 sec <<< FAILURE! java.lang.AssertionError: expected:<300> but was:<100> at org.junit.Assert.fail(Assert.java:93) at org.junit.Assert.failNotEquals(Assert.java:647) at org.junit.Assert.assertEquals(Assert.java:128) at org.junit.Assert.assertEquals(Assert.java:472) at org.junit.Assert.assertEquals(Assert.java:456) at org.apache.flume.source.taildir.TestTaildirSource.testFileRoll(TestTaildirSource.java:373) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) at org.junit.runners.ParentRunner.run(ParentRunner.java:300) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75) {code} > Tail Dir Source leads to duplicate events on rolling the tailed file > -------------------------------------------------------------------- > > Key: FLUME-2777 > URL: https://issues.apache.org/jira/browse/FLUME-2777 > Project: Flume > Issue Type: Bug > Components: Sinks+Sources > Affects Versions: notrack > Reporter: Johny Rufus > Assignee: Johny Rufus > Attachments: FLUME-2777-1.patch, FLUME-2777.patch > > > I have a simple setup, where I write 200 events to logfile1. [TailSrc is on > the lookout for logfile* ] > Then I rename logfile1 to logfile2. > I create a new logfile1 and write 100 events to it. > Typically I should see 300 events in my channel. But I see 500 events. > I was able to trace the duplicates to ReliableTaildirEventReader.java > updateFiles(boolean) to the way renamed files are handled , by specifying > starting position as 0. [This starting position should be obtained from > tf.getPosition()] > I am attaching a proposed fix, would be great if one of you guys > [~iijima_satoshi] / [~hshreedharan]/ [~roshan_naik] can take a look at the > fix and validate the issue. -- This message was sent by Atlassian JIRA (v6.3.4#6332)