You are sending the URI for as the payload message in your code.
So Christian is right, you should change sendBody(in, payload)
By doing this you send the payload to your HDFS file system.
Then your Camel route is polling that and will pick up the file.

If you already have files on that HDFS path you can just start Camel and the
files will be polled from the URI you set up in the route.

Also in your to() URI you seem to specify a filename, but if you check the
file component the path is the directory and then you add the file name
parameter: fileName=epistate.tsv
"file://biomobility/camel?fileName=epistate.tsv"

Also as Christian wrote, you need to add your RouteBuilder to the Camel
context.

Check out the getting started example perhaps?
http://camel.apache.org/getting-started.html

(Or even better, the excellent "Camel in Action"-book.)

/Magnus Palmér


2011/8/5 Geoffry Roberts <[email protected]>

> Christian,
>
> My mistake, the "i" should be "in".
>
> String in = "hdfs://qq000:5...";
>
> prod.sendBody(in);
>
> It doesn't work.
>
> On 4 August 2011 15:32, Christian Müller <[email protected]
> >wrote:
>
> > Hello Geoffry!
> >
> > What is "i" in your code? I assume it's your payload which you send to
> your
> > Hadoop file system...
> >
> > And in your code I miss something like:
> > ctx.addRoutes(erb);
> >
> > Instead of:
> > prod.sendBody(i);
> >
> > you should try:
> > prod.sendBody(in, i);
> >
> > Otherwise Camel doesn't know where to send the message...
> >
> > Best,
> > Christian
> >
>
>
>
> --
> Geoffry Roberts
>

Reply via email to