camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sander Mak <sander...@gmail.com>
Subject Re: Camel and Hadoop First Try
Date Fri, 05 Aug 2011 10:23:54 GMT
I know how to add the route Claus, thanks :) I was just pointing out
that the code from the OP seemed to omit this step...

On Fri, Aug 5, 2011 at 10:43 AM, Claus Ibsen <claus.ibsen@gmail.com> wrote:
> On Fri, Aug 5, 2011 at 10:21 AM, Sander Mak <sandermak@gmail.com> wrote:
>> May be I'm missing something, but where do you add your routebuilder
>> to the context?
>
> CamelContext ctx ..
> RoutesBuilder builder = ...
>
> ctx.addRoutes(builder);
> ctx.start();
>
> See this getting starting example
> http://camel.apache.org/walk-through-an-example.html
>
>>
>> On Thu, Aug 4, 2011 at 8:01 PM, Geoffry Roberts
>> <geoffry.roberts@gmail.com> wrote:
>>> All,
>>>
>>> This is my first attempt at using camel so I doing something simple.  I want
>>> to copy a file from hadoop's hdfs to the local file system.  I'm getting the
>>> following error even though I believe I'm following the examples correctly.
>>>
>>> java.lang.IllegalArgumentException: defaultEndpoint must be specified
>>>
>>> What am I doing wrong?
>>>
>>> Thanks
>>>
>>> My code:
>>>
>>> public class Copy2Local {
>>>
>>> // irrelevant code
>>>
>>> String in =
>>> "hdfs://qq000:54310/hdfs/sourcedata/consolidate/56/56crmax/epistate/part-r-00000";
>>> String out = "file://biomobility/camel/epistate.tsv";
>>>
>>> public void run() {
>>> CamelContext ctx = new DefaultCamelContext();
>>> EpiRouteBuilder erb = new EpiRouteBuilder();
>>> ctx.start();
>>> ProducerTemplate prod = ctx.createProducerTemplate();
>>> prod.sendBody(i);
>>> }
>>> class EpiRouteBuilder extends RouteBuilder {
>>>
>>> public void configure() {
>>> from(in).to(out);
>>> }
>>> }
>>> // more irrelevant code
>>> }
>>>
>>> --
>>> Geoffry Roberts
>>>
>>
>
>
>
> --
> Claus Ibsen
> -----------------
> FuseSource
> Email: cibsen@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/
>

Mime
View raw message