camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashwin Pejavar (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-5478) File component does not consume empty files with the changed readLock
Date Wed, 15 Aug 2012 18:33:37 GMT

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

Ashwin Pejavar commented on CAMEL-5478:
---------------------------------------

I have a route that is triggered via a cron based policy, and has three distinct scenarios
that I need to distinguish between:
1) Producer has updates to submit and generates a non-zero file
2) Producer has no updates to submit and hence generates a zero length file.
3) No file present. This is an exception scenario indicating that the producing system had
an error

Basically i'm trying to distinguish between three states:
1) Value present and is non-empty
2) Value present but is null/empty
3) Value not present.

I guess this is analogous to the nillable attribute on xml element definitions that allows
a element to have a null value against not being present at all.
                
> File component does not consume empty files with the changed readLock
> ---------------------------------------------------------------------
>
>                 Key: CAMEL-5478
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5478
>             Project: Camel
>          Issue Type: Wish
>          Components: camel-core
>    Affects Versions: 2.10.0
>         Environment: All
>            Reporter: Ashwin Pejavar
>            Priority: Minor
>
> In the 2.10.0 version of the FileChangedExclusiveReadLockStrategy, a read-lock cannot
be obtained on a zero length file. There is an explicit check to disallow this.
> e.g.
> if (newLastModified == lastModified && newLength == length && length
!= 0) {
> // We consider that zero-length files are files in progress
> LOG.trace("Read lock acquired.");
> I disagree with the reasoning in the comment. If the size of a file hasn't changed in
the poll interval, it should be consumed irrespective of size.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message