camel SCP tempPrefix option won't work

2016-10-07 Thread sungkwon.eom
Hello, 


This is my camel scp test code.

I'd like to send a file to remote server with prefix "temp_".

After finishing scp file copy, the "temp_" prefix is supposed to be gone.

BUT the file name with tempPrefix never work.   While writing, the file is
same with original file.

Did I miss something?


Camel version is 2.17.3 and I'm testing on jdk 1.8.

Thanks.
  

from("file:" + raw_dir + "?delete=true")
.to("scp:xxx.xxx.xxx.xxx/data/scptest?tempPrefix=temp_=user=passwd=/Users/skeom21/.ssh/known_hosts=no")
.log("${headers.CamelFileName}")
.end();



--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-SCP-tempPrefix-option-won-t-work-tp5788465.html
Sent from the Camel - Users mailing list archive at Nabble.com.


CamelSqlUpdateCount is negative value??

2016-05-12 Thread sungkwon.eom
Hello,

Below is my route code for oracle update.

I want to get the number of updated records.

===
from("seda:db_upadte?size=10=4=true").startupOrder(30)
.to("sql:update tr_vdis_trace set V_ETAS = # WHERE 
P_TRIPSEQ =# and
P_FST_TIME = #?batch=true=myDataSource")
.log("=${header.CamelSqlUpdateCount}  records 
updated-!!")
.log("=${header.CamelSqlQuery}")
.log("${body}")
   .end();

=

I checked that the DB data was updated successfully.
BUT CamelSqlUpdateCount is negative value (-60).
What is wrong? Should I do something more to get right value?


thanks.

header values===
seda://db_upadte |
={breadcrumbId=ID-eomseong-gwon-ui-MacBook-Pro-local-57167-1463041216709-0-3,
CamelFileAbsolute=true,
CamelFileAbsolutePath=/var/folders/60/gz5nf__d5r11htj9q2zxk9qwgn/T/camel1662256863897921216.tar,
CamelFileLastModified=1463041218000, CamelFileLength=2334720,
CamelFileName=Real.20160512172019037_3.tar.gz,
CamelFileNameConsumed=camel1662256863897921216.tar,
CamelFileNameOnly=camel1662256863897921216.tar,
CamelFileNameProduced=temp/Real.20160512172019037_3.tar.gz,
CamelFileParent=/var/folders/60/gz5nf__d5r11htj9q2zxk9qwgn/T,
CamelFilePath=/var/folders/60/gz5nf__d5r11htj9q2zxk9qwgn/T/camel1662256863897921216.tar,
CamelFileRelativePath=camel1662256863897921216.tar, CamelFtpReplyCode=226,
CamelFtpReplyString=226 Transfer complete.
, *CamelSqlUpdateCount=-60*, COMPRESS_ID=COMPRESS,
REAL_AGGREGATION_ID=REAL_AGGREGATION}



--
View this message in context: 
http://camel.465427.n5.nabble.com/CamelSqlUpdateCount-is-negative-value-tp5782476.html
Sent from the Camel - Users mailing list archive at Nabble.com.


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> 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.


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?

 

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.


Re: how to hold temporary data to use later.....

2016-04-19 Thread sungkwon.eom
Thanks  Quinn 

I didn't know camel support repository.

I'll try it.








--
View this message in context: 
http://camel.465427.n5.nabble.com/how-to-hold-temporary-data-to-use-later-tp5781121p5781301.html
Sent from the Camel - Users mailing list archive at Nabble.com.


how to hold temporary data to use later.....

2016-04-15 Thread sungkwon.eom
Hello, this is the scenario what I want to handle..


1) load files from a directory
2)collect first line from each files  (Using this data DB will be
updated later)
3)compress files to a single tar.gz file.
4)upload the compressed file to FTP site.
5)update DB table over the compressed and FTP uploded files using temporary
data from (2).


In here, how can I hold the first line of each files and how to pass the
line data to DB route?
Of course if compress & FTP uploading is fail,  DB update should not occur.

Thanks, in advance.



--
View this message in context: 
http://camel.465427.n5.nabble.com/how-to-hold-temporary-data-to-use-later-tp5781121.html
Sent from the Camel - Users mailing list archive at Nabble.com.