You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Rafal Janik (JIRA)" <ji...@apache.org> on 2009/07/21 16:43:35 UTC

[jira] Created: (CAMEL-1844) Files size after simply route from file to file is smaller then the original size.

Files size after simply route from file to file is smaller then the original size.
----------------------------------------------------------------------------------

                 Key: CAMEL-1844
                 URL: https://issues.apache.org/activemq/browse/CAMEL-1844
             Project: Apache Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 2.0-M2
         Environment: Java: 1.6.0.14
OS: Linux, Kubuntu 9.04
Intel Core Duo (2x2,5GHz), 4GB ram 
            Reporter: Rafal Janik


I've got very simply camel route:

CamelContext context = new DefaultCamelContext();
context.addRoutes(new RouteBuilder() {
  public void configure() {
    from("file://" + INBOX_DIR + "?noop=false").to("file://" + OUTBOX_DIR);
  }
});
context.start();

All this route does, is to copy a file from INBOX_DIR to OUTBOX_DIR.

And everything goes fine for smaller files, but when I put something bigger into INBOX_DIR (on my machine problem starts with files bigger than ~100MB) things go wrong.
The file in OUTBOX_DIR has different size than the original one. In general it is smaller than the original (its size varies - can be 3/4 of the original, can be 1/2 etc).
With Camel 1.6.1 with noop set to "true" the file in OUTBOX was bigger than the original one (even 1,5-2 times larger !). With Camel 2.0-M2 setting noop to true or false didn't matter - the file in OUTBOX was smaller than the original one.

It is possible to avoid this bug, by setting delay but this is no good. To handle large files, I'd have to set a very high value which would slow down the whole application.

I've tried all possible configurations noop=true/false, readLock, readLockTimeout but without success.

Tested on both Apache Camel 1.6.1 and 2.0-M2 with similar results.


My environment:
Java: 1.6.0.14
OS: Linux, Kubuntu 9.04


Attached you will find a Maven project which exposes the bug.
Unpack it, run
mvn assembly:assembly
next run
run.sh
and copy big file to inbox dir and observe resulting file in outbox dir.

To kill the application hit CTRL+C 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1844) Files size after simply route from file to file is smaller then the original size.

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52925#action_52925 ] 

Claus Ibsen commented on CAMEL-1844:
------------------------------------

Update wiki pages as well

> Files size after simply route from file to file is smaller then the original size.
> ----------------------------------------------------------------------------------
>
>                 Key: CAMEL-1844
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1844
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.0-M2
>         Environment: Java: 1.6.0.14
> OS: Linux, Kubuntu 9.04
> Intel Core Duo (2x2,5GHz), 4GB ram 
>            Reporter: Rafal Janik
>            Assignee: Claus Ibsen
>             Fix For: 2.0.0
>
>         Attachments: camel-core-2.0-SNAPSHOT.jar, camelTest.tar.gz
>
>
> I've got very simply camel route:
> CamelContext context = new DefaultCamelContext();
> context.addRoutes(new RouteBuilder() {
>   public void configure() {
>     from("file://" + INBOX_DIR + "?noop=false").to("file://" + OUTBOX_DIR);
>   }
> });
> context.start();
> All this route does, is to copy a file from INBOX_DIR to OUTBOX_DIR.
> And everything goes fine for smaller files, but when I put something bigger into INBOX_DIR (on my machine problem starts with files bigger than ~100MB) things go wrong.
> The file in OUTBOX_DIR has different size than the original one. In general it is smaller than the original (its size varies - can be 3/4 of the original, can be 1/2 etc).
> With Camel 1.6.1 with noop set to "true" the file in OUTBOX was bigger than the original one (even 1,5-2 times larger !). With Camel 2.0-M2 setting noop to true or false didn't matter - the file in OUTBOX was smaller than the original one.
> It is possible to avoid this bug, by setting delay but this is no good. To handle large files, I'd have to set a very high value which would slow down the whole application.
> I've tried all possible configurations noop=true/false, readLock, readLockTimeout but without success.
> Tested on both Apache Camel 1.6.1 and 2.0-M2 with similar results.
> My environment:
> Java: 1.6.0.14
> OS: Linux, Kubuntu 9.04
> Attached you will find a Maven project which exposes the bug.
> Unpack it, run
> mvn assembly:assembly
> next run
> run.sh
> and copy big file to inbox dir and observe resulting file in outbox dir.
> To kill the application hit CTRL+C 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1844) Files size after simply route from file to file is smaller then the original size.

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52912#action_52912 ] 

Claus Ibsen commented on CAMEL-1844:
------------------------------------

See answer posted on user forum
http://www.nabble.com/Large-files-processing-td24568287.html

> Files size after simply route from file to file is smaller then the original size.
> ----------------------------------------------------------------------------------
>
>                 Key: CAMEL-1844
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1844
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.0-M2
>         Environment: Java: 1.6.0.14
> OS: Linux, Kubuntu 9.04
> Intel Core Duo (2x2,5GHz), 4GB ram 
>            Reporter: Rafal Janik
>         Attachments: camelTest.tar.gz
>
>
> I've got very simply camel route:
> CamelContext context = new DefaultCamelContext();
> context.addRoutes(new RouteBuilder() {
>   public void configure() {
>     from("file://" + INBOX_DIR + "?noop=false").to("file://" + OUTBOX_DIR);
>   }
> });
> context.start();
> All this route does, is to copy a file from INBOX_DIR to OUTBOX_DIR.
> And everything goes fine for smaller files, but when I put something bigger into INBOX_DIR (on my machine problem starts with files bigger than ~100MB) things go wrong.
> The file in OUTBOX_DIR has different size than the original one. In general it is smaller than the original (its size varies - can be 3/4 of the original, can be 1/2 etc).
> With Camel 1.6.1 with noop set to "true" the file in OUTBOX was bigger than the original one (even 1,5-2 times larger !). With Camel 2.0-M2 setting noop to true or false didn't matter - the file in OUTBOX was smaller than the original one.
> It is possible to avoid this bug, by setting delay but this is no good. To handle large files, I'd have to set a very high value which would slow down the whole application.
> I've tried all possible configurations noop=true/false, readLock, readLockTimeout but without success.
> Tested on both Apache Camel 1.6.1 and 2.0-M2 with similar results.
> My environment:
> Java: 1.6.0.14
> OS: Linux, Kubuntu 9.04
> Attached you will find a Maven project which exposes the bug.
> Unpack it, run
> mvn assembly:assembly
> next run
> run.sh
> and copy big file to inbox dir and observe resulting file in outbox dir.
> To kill the application hit CTRL+C 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1844) Files size after simply route from file to file is smaller then the original size.

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52923#action_52923 ] 

Claus Ibsen commented on CAMEL-1844:
------------------------------------

Rafal I have attached a camel-core .jar with this new feature. You can test in your environment by adding this to the URI

{code}
readLock=changed
{code}

That will use the new strategy and it should avoid copying the file while its being in progress.

> Files size after simply route from file to file is smaller then the original size.
> ----------------------------------------------------------------------------------
>
>                 Key: CAMEL-1844
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1844
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.0-M2
>         Environment: Java: 1.6.0.14
> OS: Linux, Kubuntu 9.04
> Intel Core Duo (2x2,5GHz), 4GB ram 
>            Reporter: Rafal Janik
>            Assignee: Claus Ibsen
>         Attachments: camel-core-2.0-SNAPSHOT.jar, camelTest.tar.gz
>
>
> I've got very simply camel route:
> CamelContext context = new DefaultCamelContext();
> context.addRoutes(new RouteBuilder() {
>   public void configure() {
>     from("file://" + INBOX_DIR + "?noop=false").to("file://" + OUTBOX_DIR);
>   }
> });
> context.start();
> All this route does, is to copy a file from INBOX_DIR to OUTBOX_DIR.
> And everything goes fine for smaller files, but when I put something bigger into INBOX_DIR (on my machine problem starts with files bigger than ~100MB) things go wrong.
> The file in OUTBOX_DIR has different size than the original one. In general it is smaller than the original (its size varies - can be 3/4 of the original, can be 1/2 etc).
> With Camel 1.6.1 with noop set to "true" the file in OUTBOX was bigger than the original one (even 1,5-2 times larger !). With Camel 2.0-M2 setting noop to true or false didn't matter - the file in OUTBOX was smaller than the original one.
> It is possible to avoid this bug, by setting delay but this is no good. To handle large files, I'd have to set a very high value which would slow down the whole application.
> I've tried all possible configurations noop=true/false, readLock, readLockTimeout but without success.
> Tested on both Apache Camel 1.6.1 and 2.0-M2 with similar results.
> My environment:
> Java: 1.6.0.14
> OS: Linux, Kubuntu 9.04
> Attached you will find a Maven project which exposes the bug.
> Unpack it, run
> mvn assembly:assembly
> next run
> run.sh
> and copy big file to inbox dir and observe resulting file in outbox dir.
> To kill the application hit CTRL+C 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1844) Files size after simply route from file to file is smaller then the original size.

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52921#action_52921 ] 

Claus Ibsen commented on CAMEL-1844:
------------------------------------

tunnk: 797105.

> Files size after simply route from file to file is smaller then the original size.
> ----------------------------------------------------------------------------------
>
>                 Key: CAMEL-1844
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1844
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.0-M2
>         Environment: Java: 1.6.0.14
> OS: Linux, Kubuntu 9.04
> Intel Core Duo (2x2,5GHz), 4GB ram 
>            Reporter: Rafal Janik
>            Assignee: Claus Ibsen
>         Attachments: camelTest.tar.gz
>
>
> I've got very simply camel route:
> CamelContext context = new DefaultCamelContext();
> context.addRoutes(new RouteBuilder() {
>   public void configure() {
>     from("file://" + INBOX_DIR + "?noop=false").to("file://" + OUTBOX_DIR);
>   }
> });
> context.start();
> All this route does, is to copy a file from INBOX_DIR to OUTBOX_DIR.
> And everything goes fine for smaller files, but when I put something bigger into INBOX_DIR (on my machine problem starts with files bigger than ~100MB) things go wrong.
> The file in OUTBOX_DIR has different size than the original one. In general it is smaller than the original (its size varies - can be 3/4 of the original, can be 1/2 etc).
> With Camel 1.6.1 with noop set to "true" the file in OUTBOX was bigger than the original one (even 1,5-2 times larger !). With Camel 2.0-M2 setting noop to true or false didn't matter - the file in OUTBOX was smaller than the original one.
> It is possible to avoid this bug, by setting delay but this is no good. To handle large files, I'd have to set a very high value which would slow down the whole application.
> I've tried all possible configurations noop=true/false, readLock, readLockTimeout but without success.
> Tested on both Apache Camel 1.6.1 and 2.0-M2 with similar results.
> My environment:
> Java: 1.6.0.14
> OS: Linux, Kubuntu 9.04
> Attached you will find a Maven project which exposes the bug.
> Unpack it, run
> mvn assembly:assembly
> next run
> run.sh
> and copy big file to inbox dir and observe resulting file in outbox dir.
> To kill the application hit CTRL+C 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-1844) Files size after simply route from file to file is smaller then the original size.

Posted by "Rafal Janik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1844?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rafal Janik updated CAMEL-1844:
-------------------------------

    Attachment: camelTest.tar.gz

Maven project which exposes the bug.
Unpack it, run
mvn assembly:assembly
next run
run.sh
and copy big file to inbox dir and observe resulting file in outbox dir.

To kill the application hit CTRL+C 

> Files size after simply route from file to file is smaller then the original size.
> ----------------------------------------------------------------------------------
>
>                 Key: CAMEL-1844
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1844
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.0-M2
>         Environment: Java: 1.6.0.14
> OS: Linux, Kubuntu 9.04
> Intel Core Duo (2x2,5GHz), 4GB ram 
>            Reporter: Rafal Janik
>         Attachments: camelTest.tar.gz
>
>
> I've got very simply camel route:
> CamelContext context = new DefaultCamelContext();
> context.addRoutes(new RouteBuilder() {
>   public void configure() {
>     from("file://" + INBOX_DIR + "?noop=false").to("file://" + OUTBOX_DIR);
>   }
> });
> context.start();
> All this route does, is to copy a file from INBOX_DIR to OUTBOX_DIR.
> And everything goes fine for smaller files, but when I put something bigger into INBOX_DIR (on my machine problem starts with files bigger than ~100MB) things go wrong.
> The file in OUTBOX_DIR has different size than the original one. In general it is smaller than the original (its size varies - can be 3/4 of the original, can be 1/2 etc).
> With Camel 1.6.1 with noop set to "true" the file in OUTBOX was bigger than the original one (even 1,5-2 times larger !). With Camel 2.0-M2 setting noop to true or false didn't matter - the file in OUTBOX was smaller than the original one.
> It is possible to avoid this bug, by setting delay but this is no good. To handle large files, I'd have to set a very high value which would slow down the whole application.
> I've tried all possible configurations noop=true/false, readLock, readLockTimeout but without success.
> Tested on both Apache Camel 1.6.1 and 2.0-M2 with similar results.
> My environment:
> Java: 1.6.0.14
> OS: Linux, Kubuntu 9.04
> Attached you will find a Maven project which exposes the bug.
> Unpack it, run
> mvn assembly:assembly
> next run
> run.sh
> and copy big file to inbox dir and observe resulting file in outbox dir.
> To kill the application hit CTRL+C 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1844) Files size after simply route from file to file is smaller then the original size.

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52913#action_52913 ] 

Claus Ibsen commented on CAMEL-1844:
------------------------------------

Could you try with adding option {{readLock=rename}} to the Camel file consumer.

> Files size after simply route from file to file is smaller then the original size.
> ----------------------------------------------------------------------------------
>
>                 Key: CAMEL-1844
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1844
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.0-M2
>         Environment: Java: 1.6.0.14
> OS: Linux, Kubuntu 9.04
> Intel Core Duo (2x2,5GHz), 4GB ram 
>            Reporter: Rafal Janik
>         Attachments: camelTest.tar.gz
>
>
> I've got very simply camel route:
> CamelContext context = new DefaultCamelContext();
> context.addRoutes(new RouteBuilder() {
>   public void configure() {
>     from("file://" + INBOX_DIR + "?noop=false").to("file://" + OUTBOX_DIR);
>   }
> });
> context.start();
> All this route does, is to copy a file from INBOX_DIR to OUTBOX_DIR.
> And everything goes fine for smaller files, but when I put something bigger into INBOX_DIR (on my machine problem starts with files bigger than ~100MB) things go wrong.
> The file in OUTBOX_DIR has different size than the original one. In general it is smaller than the original (its size varies - can be 3/4 of the original, can be 1/2 etc).
> With Camel 1.6.1 with noop set to "true" the file in OUTBOX was bigger than the original one (even 1,5-2 times larger !). With Camel 2.0-M2 setting noop to true or false didn't matter - the file in OUTBOX was smaller than the original one.
> It is possible to avoid this bug, by setting delay but this is no good. To handle large files, I'd have to set a very high value which would slow down the whole application.
> I've tried all possible configurations noop=true/false, readLock, readLockTimeout but without success.
> Tested on both Apache Camel 1.6.1 and 2.0-M2 with similar results.
> My environment:
> Java: 1.6.0.14
> OS: Linux, Kubuntu 9.04
> Attached you will find a Maven project which exposes the bug.
> Unpack it, run
> mvn assembly:assembly
> next run
> run.sh
> and copy big file to inbox dir and observe resulting file in outbox dir.
> To kill the application hit CTRL+C 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-1844) Files size after simply route from file to file is smaller then the original size.

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1844?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-1844:
-------------------------------

    Attachment: camel-core-2.0-SNAPSHOT.jar

.jar with the new changed option

> Files size after simply route from file to file is smaller then the original size.
> ----------------------------------------------------------------------------------
>
>                 Key: CAMEL-1844
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1844
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.0-M2
>         Environment: Java: 1.6.0.14
> OS: Linux, Kubuntu 9.04
> Intel Core Duo (2x2,5GHz), 4GB ram 
>            Reporter: Rafal Janik
>            Assignee: Claus Ibsen
>         Attachments: camel-core-2.0-SNAPSHOT.jar, camelTest.tar.gz
>
>
> I've got very simply camel route:
> CamelContext context = new DefaultCamelContext();
> context.addRoutes(new RouteBuilder() {
>   public void configure() {
>     from("file://" + INBOX_DIR + "?noop=false").to("file://" + OUTBOX_DIR);
>   }
> });
> context.start();
> All this route does, is to copy a file from INBOX_DIR to OUTBOX_DIR.
> And everything goes fine for smaller files, but when I put something bigger into INBOX_DIR (on my machine problem starts with files bigger than ~100MB) things go wrong.
> The file in OUTBOX_DIR has different size than the original one. In general it is smaller than the original (its size varies - can be 3/4 of the original, can be 1/2 etc).
> With Camel 1.6.1 with noop set to "true" the file in OUTBOX was bigger than the original one (even 1,5-2 times larger !). With Camel 2.0-M2 setting noop to true or false didn't matter - the file in OUTBOX was smaller than the original one.
> It is possible to avoid this bug, by setting delay but this is no good. To handle large files, I'd have to set a very high value which would slow down the whole application.
> I've tried all possible configurations noop=true/false, readLock, readLockTimeout but without success.
> Tested on both Apache Camel 1.6.1 and 2.0-M2 with similar results.
> My environment:
> Java: 1.6.0.14
> OS: Linux, Kubuntu 9.04
> Attached you will find a Maven project which exposes the bug.
> Unpack it, run
> mvn assembly:assembly
> next run
> run.sh
> and copy big file to inbox dir and observe resulting file in outbox dir.
> To kill the application hit CTRL+C 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-1844) Files size after simply route from file to file is smaller then the original size.

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1844?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-1844:
-------------------------------

    Fix Version/s: 2.0.0

> Files size after simply route from file to file is smaller then the original size.
> ----------------------------------------------------------------------------------
>
>                 Key: CAMEL-1844
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1844
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.0-M2
>         Environment: Java: 1.6.0.14
> OS: Linux, Kubuntu 9.04
> Intel Core Duo (2x2,5GHz), 4GB ram 
>            Reporter: Rafal Janik
>            Assignee: Claus Ibsen
>             Fix For: 2.0.0
>
>         Attachments: camel-core-2.0-SNAPSHOT.jar, camelTest.tar.gz
>
>
> I've got very simply camel route:
> CamelContext context = new DefaultCamelContext();
> context.addRoutes(new RouteBuilder() {
>   public void configure() {
>     from("file://" + INBOX_DIR + "?noop=false").to("file://" + OUTBOX_DIR);
>   }
> });
> context.start();
> All this route does, is to copy a file from INBOX_DIR to OUTBOX_DIR.
> And everything goes fine for smaller files, but when I put something bigger into INBOX_DIR (on my machine problem starts with files bigger than ~100MB) things go wrong.
> The file in OUTBOX_DIR has different size than the original one. In general it is smaller than the original (its size varies - can be 3/4 of the original, can be 1/2 etc).
> With Camel 1.6.1 with noop set to "true" the file in OUTBOX was bigger than the original one (even 1,5-2 times larger !). With Camel 2.0-M2 setting noop to true or false didn't matter - the file in OUTBOX was smaller than the original one.
> It is possible to avoid this bug, by setting delay but this is no good. To handle large files, I'd have to set a very high value which would slow down the whole application.
> I've tried all possible configurations noop=true/false, readLock, readLockTimeout but without success.
> Tested on both Apache Camel 1.6.1 and 2.0-M2 with similar results.
> My environment:
> Java: 1.6.0.14
> OS: Linux, Kubuntu 9.04
> Attached you will find a Maven project which exposes the bug.
> Unpack it, run
> mvn assembly:assembly
> next run
> run.sh
> and copy big file to inbox dir and observe resulting file in outbox dir.
> To kill the application hit CTRL+C 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1844) Files size after simply route from file to file is smaller then the original size.

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52920#action_52920 ] 

Claus Ibsen commented on CAMEL-1844:
------------------------------------

Damn the Java IO File API sucks big time.

All its fancy locking does not detect if you use a regular {{cp}} to copy a big file that its in progress.

I am adding a new strategy: {{changed}} that you can use that will detect whether the file size/modified timestamp have changed.
However it requires that it uses at least 1 sec to detect whether the file is currently being copied or not.

{code}
                from("file:target/changed/in?readLock=changed").to("file:target/changed/out", "mock:result");
{code}



> Files size after simply route from file to file is smaller then the original size.
> ----------------------------------------------------------------------------------
>
>                 Key: CAMEL-1844
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1844
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.0-M2
>         Environment: Java: 1.6.0.14
> OS: Linux, Kubuntu 9.04
> Intel Core Duo (2x2,5GHz), 4GB ram 
>            Reporter: Rafal Janik
>            Assignee: Claus Ibsen
>         Attachments: camelTest.tar.gz
>
>
> I've got very simply camel route:
> CamelContext context = new DefaultCamelContext();
> context.addRoutes(new RouteBuilder() {
>   public void configure() {
>     from("file://" + INBOX_DIR + "?noop=false").to("file://" + OUTBOX_DIR);
>   }
> });
> context.start();
> All this route does, is to copy a file from INBOX_DIR to OUTBOX_DIR.
> And everything goes fine for smaller files, but when I put something bigger into INBOX_DIR (on my machine problem starts with files bigger than ~100MB) things go wrong.
> The file in OUTBOX_DIR has different size than the original one. In general it is smaller than the original (its size varies - can be 3/4 of the original, can be 1/2 etc).
> With Camel 1.6.1 with noop set to "true" the file in OUTBOX was bigger than the original one (even 1,5-2 times larger !). With Camel 2.0-M2 setting noop to true or false didn't matter - the file in OUTBOX was smaller than the original one.
> It is possible to avoid this bug, by setting delay but this is no good. To handle large files, I'd have to set a very high value which would slow down the whole application.
> I've tried all possible configurations noop=true/false, readLock, readLockTimeout but without success.
> Tested on both Apache Camel 1.6.1 and 2.0-M2 with similar results.
> My environment:
> Java: 1.6.0.14
> OS: Linux, Kubuntu 9.04
> Attached you will find a Maven project which exposes the bug.
> Unpack it, run
> mvn assembly:assembly
> next run
> run.sh
> and copy big file to inbox dir and observe resulting file in outbox dir.
> To kill the application hit CTRL+C 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CAMEL-1844) Files size after simply route from file to file is smaller then the original size.

Posted by "Rafal Janik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1844?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rafal Janik resolved CAMEL-1844.
--------------------------------

    Resolution: Fixed

Thank You very much.  Now it works fine :)

> Files size after simply route from file to file is smaller then the original size.
> ----------------------------------------------------------------------------------
>
>                 Key: CAMEL-1844
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1844
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.0-M2
>         Environment: Java: 1.6.0.14
> OS: Linux, Kubuntu 9.04
> Intel Core Duo (2x2,5GHz), 4GB ram 
>            Reporter: Rafal Janik
>            Assignee: Claus Ibsen
>             Fix For: 2.0.0
>
>         Attachments: camel-core-2.0-SNAPSHOT.jar, camelTest.tar.gz
>
>
> I've got very simply camel route:
> CamelContext context = new DefaultCamelContext();
> context.addRoutes(new RouteBuilder() {
>   public void configure() {
>     from("file://" + INBOX_DIR + "?noop=false").to("file://" + OUTBOX_DIR);
>   }
> });
> context.start();
> All this route does, is to copy a file from INBOX_DIR to OUTBOX_DIR.
> And everything goes fine for smaller files, but when I put something bigger into INBOX_DIR (on my machine problem starts with files bigger than ~100MB) things go wrong.
> The file in OUTBOX_DIR has different size than the original one. In general it is smaller than the original (its size varies - can be 3/4 of the original, can be 1/2 etc).
> With Camel 1.6.1 with noop set to "true" the file in OUTBOX was bigger than the original one (even 1,5-2 times larger !). With Camel 2.0-M2 setting noop to true or false didn't matter - the file in OUTBOX was smaller than the original one.
> It is possible to avoid this bug, by setting delay but this is no good. To handle large files, I'd have to set a very high value which would slow down the whole application.
> I've tried all possible configurations noop=true/false, readLock, readLockTimeout but without success.
> Tested on both Apache Camel 1.6.1 and 2.0-M2 with similar results.
> My environment:
> Java: 1.6.0.14
> OS: Linux, Kubuntu 9.04
> Attached you will find a Maven project which exposes the bug.
> Unpack it, run
> mvn assembly:assembly
> next run
> run.sh
> and copy big file to inbox dir and observe resulting file in outbox dir.
> To kill the application hit CTRL+C 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (CAMEL-1844) Files size after simply route from file to file is smaller then the original size.

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1844?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reassigned CAMEL-1844:
----------------------------------

    Assignee: Claus Ibsen

> Files size after simply route from file to file is smaller then the original size.
> ----------------------------------------------------------------------------------
>
>                 Key: CAMEL-1844
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1844
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.0-M2
>         Environment: Java: 1.6.0.14
> OS: Linux, Kubuntu 9.04
> Intel Core Duo (2x2,5GHz), 4GB ram 
>            Reporter: Rafal Janik
>            Assignee: Claus Ibsen
>         Attachments: camelTest.tar.gz
>
>
> I've got very simply camel route:
> CamelContext context = new DefaultCamelContext();
> context.addRoutes(new RouteBuilder() {
>   public void configure() {
>     from("file://" + INBOX_DIR + "?noop=false").to("file://" + OUTBOX_DIR);
>   }
> });
> context.start();
> All this route does, is to copy a file from INBOX_DIR to OUTBOX_DIR.
> And everything goes fine for smaller files, but when I put something bigger into INBOX_DIR (on my machine problem starts with files bigger than ~100MB) things go wrong.
> The file in OUTBOX_DIR has different size than the original one. In general it is smaller than the original (its size varies - can be 3/4 of the original, can be 1/2 etc).
> With Camel 1.6.1 with noop set to "true" the file in OUTBOX was bigger than the original one (even 1,5-2 times larger !). With Camel 2.0-M2 setting noop to true or false didn't matter - the file in OUTBOX was smaller than the original one.
> It is possible to avoid this bug, by setting delay but this is no good. To handle large files, I'd have to set a very high value which would slow down the whole application.
> I've tried all possible configurations noop=true/false, readLock, readLockTimeout but without success.
> Tested on both Apache Camel 1.6.1 and 2.0-M2 with similar results.
> My environment:
> Java: 1.6.0.14
> OS: Linux, Kubuntu 9.04
> Attached you will find a Maven project which exposes the bug.
> Unpack it, run
> mvn assembly:assembly
> next run
> run.sh
> and copy big file to inbox dir and observe resulting file in outbox dir.
> To kill the application hit CTRL+C 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.