Hi Sometimes it can also be a good idea to peek into the unit test of a given component you use and want to understand better.
For example to check out some of its unit tests https://svn.apache.org/repos/asf/camel/trunk/components/camel-hdfs/ And for testing with Camel we do have documentation at http://camel.apache.org/testing And you may also want to read the javadoc of the ProducerTemplate that you use for sending message. And read a bit about it here: http://camel.apache.org/producertemplate.html 2011/8/5 Magnus Palmér <[email protected]>: > 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 >> > -- Claus Ibsen ----------------- FuseSource Email: [email protected] Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
