You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2015/03/05 16:57:42 UTC

[jira] [Commented] (CAMEL-8434) Camel HDFS2 - Unable to consume an empty file

    [ https://issues.apache.org/jira/browse/CAMEL-8434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14348979#comment-14348979 ] 

Claus Ibsen commented on CAMEL-8434:
------------------------------------

I dont think this works as intended. As the consumer has no idempotency, so you would essentially end up reading the same file over and over again.

Adding

        Thread.sleep(5000);

In your empty file tests, causes

java.lang.AssertionError: mock://result Received message count. Expected: <1> but was: <49931>
	at org.apache.camel.component.mock.MockEndpoint.fail(MockEndpoint.java:1394)
	at org.apache.camel.component.mock.MockEndpoint.assertEquals(MockEndpoint.java:1376)
	at org.apache.camel.component.mock.MockEndpoint.doAssertIsSatisfied(MockEndpoint.java:399)
	at org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied(MockEndpoint.java:378)
	at org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied(MockEndpoint.java:366)
	at org.apache.camel.component.hdfs.HdfsConsumerTest.testSimpleConsumerWithEmptyFile(HdfsConsumerTest.java:183)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)

eg the file was read 49xxx times.

The hdfs consumer really need a delete | idempotent option as the regular file consumer or something. Not sure what was the original thought behind the hdfs component consumer.



> Camel HDFS2 - Unable to consume an empty file
> ---------------------------------------------
>
>                 Key: CAMEL-8434
>                 URL: https://issues.apache.org/jira/browse/CAMEL-8434
>             Project: Camel
>          Issue Type: Bug
>    Affects Versions: 2.14.2, 2.15.0
>            Reporter: Grzegorz Grzybek
>            Assignee: Grzegorz Grzybek
>             Fix For: 2.14.3, 2.15.0
>
>
> It is not possible to consume an empty file with camel HDFS2 consumer.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)