Re: TarAggregationStrategy - /tmp directory is full !!

2016-04-22 Thread Claus Ibsen
Hi

I found room for improvement and trying to address this
https://issues.apache.org/jira/browse/CAMEL-9905

You can build from the source with this fix and test it on your system.


On Fri, Apr 22, 2016 at 8:40 PM, Claus Ibsen <claus.ib...@gmail.com> wrote:
> Make a shorter and simpler example and see what happens.
>
> Also are you running on windows? Then mind that it has such file
> problems with not able to delete/move files if not all streams has
> been carefully closed, even if they are from the same process that
> created it. All that works nicely on linux boxes.
>
> You can also debug and see if that DeleteTarFileOnCompletion is not
> called, that is the guy that deletes the temp file.
>
>
> On Fri, Apr 22, 2016 at 6:29 AM, sungkwon.eom <skeo...@gmail.com> wrote:
>> I'm using camel ver 2.17 and I added route code.
>>
>> thk
>>
>>
>>
>> from(src_uri).convertBodyTo(String.class)
>> .setHeader("REAL_AGGREGATION_ID",
>> constant("REAL_AGGREGATION"))
>> .log("Aggregation ${file:onlyname} ")
>> .aggregate(header("REAL_AGGREGATION_ID"), new
>> FileAggregationStrategy())
>> .completionSize(30).completionTimeout(100)
>> .setHeader(Exchange.FILE_NAME,
>> method(Camel_RouteBuilder.class, "setFileName_real"))
>> .setHeader("COMPRESS_ID", constant("COMPRESS"))
>> .log("Compress ${header.CamelFileName} ")
>> .aggregate(header("COMPRESS_ID"), new
>> TarAggregationStrategy(false,true)).completionSize(30)
>> .completionTimeout(100).log("Compressing
>> ${header.CamelFileName}").marshal()
>> .gzip().setHeader(Exchange.FILE_NAME,
>> method(Camel_RouteBuilder.class, "setFileName_gz"))
>> .log("Compresssed file name :
>> ${header.CamelFileName}")
>> .to(ftp_server_uri)
>> .process(new Processor(){
>> @Override
>> public void process(Exchange exchange)
>> throws Exception {
>> List<ListString>> db_data  =
>> exchange.getProperty("db_data", List.class);
>> exchange.getIn().setBody(db_data);
>>         }})
>> .to("sql:update tr_trace set V_DESC = # WHERE P_TRIPSEQ =#
>> and P_FST_TIME = #?batch=true=myDataSource")
>> .log("${headers.CamelSqlUpdateCount}  records
>> updated!!").log("${body}")
>> .end();
>>
>>
>>
>>
>> --
>> View this message in context: 
>> http://camel.465427.n5.nabble.com/TarAggregationStrategy-tmp-directory-is-full-tp5781302p5781524.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


Re: TarAggregationStrategy - /tmp directory is full !!

2016-04-22 Thread Claus Ibsen
Make a shorter and simpler example and see what happens.

Also are you running on windows? Then mind that it has such file
problems with not able to delete/move files if not all streams has
been carefully closed, even if they are from the same process that
created it. All that works nicely on linux boxes.

You can also debug and see if that DeleteTarFileOnCompletion is not
called, that is the guy that deletes the temp file.


On Fri, Apr 22, 2016 at 6:29 AM, sungkwon.eom <skeo...@gmail.com> wrote:
> I'm using camel ver 2.17 and I added route code.
>
> thk
>
>
>
> from(src_uri).convertBodyTo(String.class)
> .setHeader("REAL_AGGREGATION_ID",
> constant("REAL_AGGREGATION"))
> .log("Aggregation ${file:onlyname} ")
> .aggregate(header("REAL_AGGREGATION_ID"), new
> FileAggregationStrategy())
> .completionSize(30).completionTimeout(100)
> .setHeader(Exchange.FILE_NAME,
> method(Camel_RouteBuilder.class, "setFileName_real"))
> .setHeader("COMPRESS_ID", constant("COMPRESS"))
> .log("Compress ${header.CamelFileName} ")
> .aggregate(header("COMPRESS_ID"), new
> TarAggregationStrategy(false,true)).completionSize(30)
> .completionTimeout(100).log("Compressing
> ${header.CamelFileName}").marshal()
> .gzip().setHeader(Exchange.FILE_NAME,
> method(Camel_RouteBuilder.class, "setFileName_gz"))
> .log("Compresssed file name :
> ${header.CamelFileName}")
> .to(ftp_server_uri)
> .process(new Processor(){
> @Override
> public void process(Exchange exchange)
> throws Exception {
> List<ListString>> db_data  =
> exchange.getProperty("db_data", List.class);
> exchange.getIn().setBody(db_data);
> }})
> .to("sql:update tr_trace set V_DESC = # WHERE P_TRIPSEQ =#
> and P_FST_TIME = #?batch=true=myDataSource")
> .log("${headers.CamelSqlUpdateCount}  records
> updated!!").log("${body}")
> .end();
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/TarAggregationStrategy-tmp-directory-is-full-tp5781302p5781524.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


Re: TarAggregationStrategy - /tmp directory is full !!

2016-04-21 Thread sungkwon.eom
I'm using camel ver 2.17 and I added route code.

thk 



from(src_uri).convertBodyTo(String.class) 
.setHeader("REAL_AGGREGATION_ID",
constant("REAL_AGGREGATION")) 
.log("Aggregation ${file:onlyname} ") 
.aggregate(header("REAL_AGGREGATION_ID"), new
FileAggregationStrategy()) 
.completionSize(30).completionTimeout(100) 
.setHeader(Exchange.FILE_NAME,
method(Camel_RouteBuilder.class, "setFileName_real")) 
.setHeader("COMPRESS_ID", constant("COMPRESS")) 
.log("Compress ${header.CamelFileName} ") 
.aggregate(header("COMPRESS_ID"), new
TarAggregationStrategy(false,true)).completionSize(30) 
.completionTimeout(100).log("Compressing
${header.CamelFileName}").marshal() 
.gzip().setHeader(Exchange.FILE_NAME,
method(Camel_RouteBuilder.class, "setFileName_gz")) 
.log("Compresssed file name :
${header.CamelFileName}") 
.to(ftp_server_uri) 
.process(new Processor(){ 
@Override 
public void process(Exchange exchange)
throws Exception { 
List<ListString>> db_data  =
exchange.getProperty("db_data", List.class); 
exchange.getIn().setBody(db_data); 
}}) 
.to("sql:update tr_trace set V_DESC = # WHERE P_TRIPSEQ =#
and P_FST_TIME = #?batch=true=myDataSource") 
.log("${headers.CamelSqlUpdateCount}  records
updated!!").log("${body}") 
.end(); 




--
View this message in context: 
http://camel.465427.n5.nabble.com/TarAggregationStrategy-tmp-directory-is-full-tp5781302p5781524.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: TarAggregationStrategy - /tmp directory is full !!

2016-04-21 Thread Claus Ibsen
What version of Camel do you use, and can you show the route code you
have with that TAR strategy.

On Tue, Apr 19, 2016 at 8:27 AM, sungkwon.eom <skeo...@gmail.com> wrote:
> Hello,
>
> I'm using TarAggregationStrategy  for create tar.gz file.
>
> BUT, I found  TarAggregationStrategy don't delete /tmp directory files.
>
> Is there any way to make sure TarAggregationStrategy delete temp file ??
>
> Or other way to create tar.gz file?
>
> <http://camel.465427.n5.nabble.com/file/n5781302/Untitled.png>
>
> thanks
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/TarAggregationStrategy-tmp-directory-is-full-tp5781302.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


TarAggregationStrategy - /tmp directory is full !!

2016-04-19 Thread sungkwon.eom
Hello,

I'm using TarAggregationStrategy  for create tar.gz file.

BUT, I found  TarAggregationStrategy don't delete /tmp directory files.

Is there any way to make sure TarAggregationStrategy delete temp file ??

Or other way to create tar.gz file?

<http://camel.465427.n5.nabble.com/file/n5781302/Untitled.png> 

thanks




--
View this message in context: 
http://camel.465427.n5.nabble.com/TarAggregationStrategy-tmp-directory-is-full-tp5781302.html
Sent from the Camel - Users mailing list archive at Nabble.com.