camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chirag Dewan <chirag.dewa...@yahoo.in>
Subject Re: Uncaught CamelRuntimeException in HDFS
Date Mon, 01 Sep 2014 09:13:32 GMT
Hi Claus,

I am using camel-hdfs.

I added this to my route : onException( RuntimeCamelException.class ).markRollbackOnly().handled(
true ).stop();

Now my process does not die but the file is deleted from the source anyhow.

Thanks!

Chirag



________________________________
 From: Claus Ibsen <claus.ibsen@gmail.com>
To: "users@camel.apache.org" <users@camel.apache.org> 
Sent: Monday, 1 September 2014 10:57 AM
Subject: Re: Uncaught CamelRuntimeException in HDFS
 

Hi

During Camel routing an unhandled exception will mean the exchange is
failed, and the file is not deleted.
Since you use storm then I guess it has an influence somehow.

Can you reproduce the issue without storm?

And how do you store in hdfs, do you use camel-hdfs or something else?



On Sun, Aug 31, 2014 at 10:25 AM, Chirag Dewan <chirag.dewan22@yahoo.in> wrote:
>
>
> Hi All,
>
>
>
> I have a route which polls the files from FTP server and stores them in HDFS. Now when
I shut down my datanodes in HDFS and try to poll a file,I get an uncaught RuntimeException
and my process dies(storm worker).
>
> Is there any way I can catch the CamelRuntimeException,maybe log the exception and make
sure that the file on FTP server is not deleted(route completion is not invoked).
>
> I think I can catch the exception by onException(CamelRuntimeException) in my route.
But what should I do afterwards that the worker doesnt die?
>
> Thanks!
>
> Chirag



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message