Problems of camel-hbase component

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems of camel-hbase component

liugang594 Liu
Hi All:

I'm tring camel-hbase component, and I did follow the guide page
http://camel.apache.org/hbase.html . I have some questions here:

1. Header Mapping Options
for example, the 'rowId' options, the name should be 'CamelHBaseRowId'
,right (same for others)?

2. Examples
it says we can specify multiple headers to put multiple values at once, the
sample as below:
<route>
    <from uri="direct:in"/>
    <!-- Set the HBase Row 1st column -->
    <setHeader headerName="CamelHBaseRowId">
        <el>${in.body.id}</el>
    </setHeader>
    <!-- Set the HBase Row 2nd column -->
    <setHeader headerName="CamelHBaseRowId">
        <el>${in.body.id}</el>
    </setHeader>
    <!-- Set the HBase Value for 1st column -->
    <setHeader headerName="CamelHBaseValue">
        <el>${in.body.value}</el>
    </setHeader>
    <!-- Set the HBase Value for 2nd column -->
    <setHeader headerName="CamelHBaseValue2">
        <el>${in.body.othervalue}</el>
    </setHeader>
    <to uri="hbase:mytable?opertaion=CamelHBasePut&amp;family=myfamily&amp;
qualifier=myqualifier&amp;family2=myfamily&amp;qualifier2=myqualifier2"/>
</route>

I don't understand how we can do that in camel, because the previous value
will be overwrote if same header name comes. right?

3. Remove option
I tried camel-hbase on consumer side, all scanned rows will be removed if
we didn't specify option remove=false, however this option doesn't describe
on the page

4. Family and Qualifier options
On consumer part, it is said we can also use uri option and header option
(I'm not sure how to use header option in this case). I tried to specify
family and qualifier options, however, the returned value will always be
null. I'm not sure they are forbidden or it's a bug. I created a bug and
add details for it: https://issues.apache.org/jira/browse/CAMEL-7296

I appreciate to get some answers about these questions. Thanks.

--
Best Regards
GangLiu
Mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Problems of camel-hbase component

Claus Ibsen-2
Hi

Ad 2)
Yeah that is a mistake on the example. You should have 2 as prefix on
the header name, for the 2nd header, and 3 for the 3rd, and 4 for the
4th and so on.

On Fri, Mar 14, 2014 at 9:51 AM, liugang594 Liu <[hidden email]> wrote:

> Hi All:
>
> I'm tring camel-hbase component, and I did follow the guide page
> http://camel.apache.org/hbase.html . I have some questions here:
>
> 1. Header Mapping Options
> for example, the 'rowId' options, the name should be 'CamelHBaseRowId'
> ,right (same for others)?
>
> 2. Examples
> it says we can specify multiple headers to put multiple values at once, the
> sample as below:
> <route>
>     <from uri="direct:in"/>
>     <!-- Set the HBase Row 1st column -->
>     <setHeader headerName="CamelHBaseRowId">
>         <el>${in.body.id}</el>
>     </setHeader>
>     <!-- Set the HBase Row 2nd column -->
>     <setHeader headerName="CamelHBaseRowId">
>         <el>${in.body.id}</el>
>     </setHeader>
>     <!-- Set the HBase Value for 1st column -->
>     <setHeader headerName="CamelHBaseValue">
>         <el>${in.body.value}</el>
>     </setHeader>
>     <!-- Set the HBase Value for 2nd column -->
>     <setHeader headerName="CamelHBaseValue2">
>         <el>${in.body.othervalue}</el>
>     </setHeader>
>     <to uri="hbase:mytable?opertaion=CamelHBasePut&amp;family=myfamily&amp;
> qualifier=myqualifier&amp;family2=myfamily&amp;qualifier2=myqualifier2"/>
> </route>
>
> I don't understand how we can do that in camel, because the previous value
> will be overwrote if same header name comes. right?
>
> 3. Remove option
> I tried camel-hbase on consumer side, all scanned rows will be removed if
> we didn't specify option remove=false, however this option doesn't describe
> on the page
>
> 4. Family and Qualifier options
> On consumer part, it is said we can also use uri option and header option
> (I'm not sure how to use header option in this case). I tried to specify
> family and qualifier options, however, the returned value will always be
> null. I'm not sure they are forbidden or it's a bug. I created a bug and
> add details for it: https://issues.apache.org/jira/browse/CAMEL-7296
>
> I appreciate to get some answers about these questions. Thanks.
>
> --
> Best Regards
> GangLiu
> Mail: [hidden email]



--
Claus Ibsen
-----------------
Red Hat, Inc.
Email: [hidden email]
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io
Reply | Threaded
Open this post in threaded view
|

Re: Problems of camel-hbase component

Claus Ibsen-2
In reply to this post by liugang594 Liu
Ad 1)
You can see the names in these classes

https://github.com/apache/camel/blob/master/components/camel-hbase/src/main/java/org/apache/camel/component/hbase/HBaseConstants.java
https://github.com/apache/camel/blob/master/components/camel-hbase/src/main/java/org/apache/camel/component/hbase/HbaseAttribute.java

On Fri, Mar 14, 2014 at 9:51 AM, liugang594 Liu <[hidden email]> wrote:

> Hi All:
>
> I'm tring camel-hbase component, and I did follow the guide page
> http://camel.apache.org/hbase.html . I have some questions here:
>
> 1. Header Mapping Options
> for example, the 'rowId' options, the name should be 'CamelHBaseRowId'
> ,right (same for others)?
>
> 2. Examples
> it says we can specify multiple headers to put multiple values at once, the
> sample as below:
> <route>
>     <from uri="direct:in"/>
>     <!-- Set the HBase Row 1st column -->
>     <setHeader headerName="CamelHBaseRowId">
>         <el>${in.body.id}</el>
>     </setHeader>
>     <!-- Set the HBase Row 2nd column -->
>     <setHeader headerName="CamelHBaseRowId">
>         <el>${in.body.id}</el>
>     </setHeader>
>     <!-- Set the HBase Value for 1st column -->
>     <setHeader headerName="CamelHBaseValue">
>         <el>${in.body.value}</el>
>     </setHeader>
>     <!-- Set the HBase Value for 2nd column -->
>     <setHeader headerName="CamelHBaseValue2">
>         <el>${in.body.othervalue}</el>
>     </setHeader>
>     <to uri="hbase:mytable?opertaion=CamelHBasePut&amp;family=myfamily&amp;
> qualifier=myqualifier&amp;family2=myfamily&amp;qualifier2=myqualifier2"/>
> </route>
>
> I don't understand how we can do that in camel, because the previous value
> will be overwrote if same header name comes. right?
>
> 3. Remove option
> I tried camel-hbase on consumer side, all scanned rows will be removed if
> we didn't specify option remove=false, however this option doesn't describe
> on the page
>
> 4. Family and Qualifier options
> On consumer part, it is said we can also use uri option and header option
> (I'm not sure how to use header option in this case). I tried to specify
> family and qualifier options, however, the returned value will always be
> null. I'm not sure they are forbidden or it's a bug. I created a bug and
> add details for it: https://issues.apache.org/jira/browse/CAMEL-7296
>
> I appreciate to get some answers about these questions. Thanks.
>
> --
> Best Regards
> GangLiu
> Mail: [hidden email]



--
Claus Ibsen
-----------------
Red Hat, Inc.
Email: [hidden email]
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io
Reply | Threaded
Open this post in threaded view
|

Re: Problems of camel-hbase component

liugang594 Liu
OK, thank you.

BTW, how about Point 3 and Point 4? do you think they are problems or not?

Thanks


2014-03-14 22:54 GMT+08:00 Claus Ibsen <[hidden email]>:

> Ad 1)
> You can see the names in these classes
>
>
> https://github.com/apache/camel/blob/master/components/camel-hbase/src/main/java/org/apache/camel/component/hbase/HBaseConstants.java
>
> https://github.com/apache/camel/blob/master/components/camel-hbase/src/main/java/org/apache/camel/component/hbase/HbaseAttribute.java
>
> On Fri, Mar 14, 2014 at 9:51 AM, liugang594 Liu <[hidden email]>
> wrote:
> > Hi All:
> >
> > I'm tring camel-hbase component, and I did follow the guide page
> > http://camel.apache.org/hbase.html . I have some questions here:
> >
> > 1. Header Mapping Options
> > for example, the 'rowId' options, the name should be 'CamelHBaseRowId'
> > ,right (same for others)?
> >
> > 2. Examples
> > it says we can specify multiple headers to put multiple values at once,
> the
> > sample as below:
> > <route>
> >     <from uri="direct:in"/>
> >     <!-- Set the HBase Row 1st column -->
> >     <setHeader headerName="CamelHBaseRowId">
> >         <el>${in.body.id}</el>
> >     </setHeader>
> >     <!-- Set the HBase Row 2nd column -->
> >     <setHeader headerName="CamelHBaseRowId">
> >         <el>${in.body.id}</el>
> >     </setHeader>
> >     <!-- Set the HBase Value for 1st column -->
> >     <setHeader headerName="CamelHBaseValue">
> >         <el>${in.body.value}</el>
> >     </setHeader>
> >     <!-- Set the HBase Value for 2nd column -->
> >     <setHeader headerName="CamelHBaseValue2">
> >         <el>${in.body.othervalue}</el>
> >     </setHeader>
> >     <to
> uri="hbase:mytable?opertaion=CamelHBasePut&amp;family=myfamily&amp;
> > qualifier=myqualifier&amp;family2=myfamily&amp;qualifier2=myqualifier2"/>
> > </route>
> >
> > I don't understand how we can do that in camel, because the previous
> value
> > will be overwrote if same header name comes. right?
> >
> > 3. Remove option
> > I tried camel-hbase on consumer side, all scanned rows will be removed if
> > we didn't specify option remove=false, however this option doesn't
> describe
> > on the page
> >
> > 4. Family and Qualifier options
> > On consumer part, it is said we can also use uri option and header option
> > (I'm not sure how to use header option in this case). I tried to specify
> > family and qualifier options, however, the returned value will always be
> > null. I'm not sure they are forbidden or it's a bug. I created a bug and
> > add details for it: https://issues.apache.org/jira/browse/CAMEL-7296
> >
> > I appreciate to get some answers about these questions. Thanks.
> >
> > --
> > Best Regards
> > GangLiu
> > Mail: [hidden email]
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: [hidden email]
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
> Make your Camel applications look hawt, try: http://hawt.io
>



--
Best Regards
GangLiu
Mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Problems of camel-hbase component

Claus Ibsen-2
Hi

Willem have added the docs for #3, and he is working on #4

On Mon, Mar 17, 2014 at 2:29 AM, liugang594 Liu <[hidden email]> wrote:

> OK, thank you.
>
> BTW, how about Point 3 and Point 4? do you think they are problems or not?
>
> Thanks
>
>
> 2014-03-14 22:54 GMT+08:00 Claus Ibsen <[hidden email]>:
>
>> Ad 1)
>> You can see the names in these classes
>>
>>
>> https://github.com/apache/camel/blob/master/components/camel-hbase/src/main/java/org/apache/camel/component/hbase/HBaseConstants.java
>>
>> https://github.com/apache/camel/blob/master/components/camel-hbase/src/main/java/org/apache/camel/component/hbase/HbaseAttribute.java
>>
>> On Fri, Mar 14, 2014 at 9:51 AM, liugang594 Liu <[hidden email]>
>> wrote:
>> > Hi All:
>> >
>> > I'm tring camel-hbase component, and I did follow the guide page
>> > http://camel.apache.org/hbase.html . I have some questions here:
>> >
>> > 1. Header Mapping Options
>> > for example, the 'rowId' options, the name should be 'CamelHBaseRowId'
>> > ,right (same for others)?
>> >
>> > 2. Examples
>> > it says we can specify multiple headers to put multiple values at once,
>> the
>> > sample as below:
>> > <route>
>> >     <from uri="direct:in"/>
>> >     <!-- Set the HBase Row 1st column -->
>> >     <setHeader headerName="CamelHBaseRowId">
>> >         <el>${in.body.id}</el>
>> >     </setHeader>
>> >     <!-- Set the HBase Row 2nd column -->
>> >     <setHeader headerName="CamelHBaseRowId">
>> >         <el>${in.body.id}</el>
>> >     </setHeader>
>> >     <!-- Set the HBase Value for 1st column -->
>> >     <setHeader headerName="CamelHBaseValue">
>> >         <el>${in.body.value}</el>
>> >     </setHeader>
>> >     <!-- Set the HBase Value for 2nd column -->
>> >     <setHeader headerName="CamelHBaseValue2">
>> >         <el>${in.body.othervalue}</el>
>> >     </setHeader>
>> >     <to
>> uri="hbase:mytable?opertaion=CamelHBasePut&amp;family=myfamily&amp;
>> > qualifier=myqualifier&amp;family2=myfamily&amp;qualifier2=myqualifier2"/>
>> > </route>
>> >
>> > I don't understand how we can do that in camel, because the previous
>> value
>> > will be overwrote if same header name comes. right?
>> >
>> > 3. Remove option
>> > I tried camel-hbase on consumer side, all scanned rows will be removed if
>> > we didn't specify option remove=false, however this option doesn't
>> describe
>> > on the page
>> >
>> > 4. Family and Qualifier options
>> > On consumer part, it is said we can also use uri option and header option
>> > (I'm not sure how to use header option in this case). I tried to specify
>> > family and qualifier options, however, the returned value will always be
>> > null. I'm not sure they are forbidden or it's a bug. I created a bug and
>> > add details for it: https://issues.apache.org/jira/browse/CAMEL-7296
>> >
>> > I appreciate to get some answers about these questions. Thanks.
>> >
>> > --
>> > Best Regards
>> > GangLiu
>> > Mail: [hidden email]
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> Red Hat, Inc.
>> Email: [hidden email]
>> Twitter: davsclaus
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen
>> Make your Camel applications look hawt, try: http://hawt.io
>>
>
>
>
> --
> Best Regards
> GangLiu
> Mail: [hidden email]



--
Claus Ibsen
-----------------
Red Hat, Inc.
Email: [hidden email]
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io
Reply | Threaded
Open this post in threaded view
|

Re: Problems of camel-hbase component

liugang594 Liu
Got it. Thanks.


2014-03-17 16:24 GMT+08:00 Claus Ibsen <[hidden email]>:

> Hi
>
> Willem have added the docs for #3, and he is working on #4
>
> On Mon, Mar 17, 2014 at 2:29 AM, liugang594 Liu <[hidden email]>
> wrote:
> > OK, thank you.
> >
> > BTW, how about Point 3 and Point 4? do you think they are problems or
> not?
> >
> > Thanks
> >
> >
> > 2014-03-14 22:54 GMT+08:00 Claus Ibsen <[hidden email]>:
> >
> >> Ad 1)
> >> You can see the names in these classes
> >>
> >>
> >>
> https://github.com/apache/camel/blob/master/components/camel-hbase/src/main/java/org/apache/camel/component/hbase/HBaseConstants.java
> >>
> >>
> https://github.com/apache/camel/blob/master/components/camel-hbase/src/main/java/org/apache/camel/component/hbase/HbaseAttribute.java
> >>
> >> On Fri, Mar 14, 2014 at 9:51 AM, liugang594 Liu <[hidden email]>
> >> wrote:
> >> > Hi All:
> >> >
> >> > I'm tring camel-hbase component, and I did follow the guide page
> >> > http://camel.apache.org/hbase.html . I have some questions here:
> >> >
> >> > 1. Header Mapping Options
> >> > for example, the 'rowId' options, the name should be 'CamelHBaseRowId'
> >> > ,right (same for others)?
> >> >
> >> > 2. Examples
> >> > it says we can specify multiple headers to put multiple values at
> once,
> >> the
> >> > sample as below:
> >> > <route>
> >> >     <from uri="direct:in"/>
> >> >     <!-- Set the HBase Row 1st column -->
> >> >     <setHeader headerName="CamelHBaseRowId">
> >> >         <el>${in.body.id}</el>
> >> >     </setHeader>
> >> >     <!-- Set the HBase Row 2nd column -->
> >> >     <setHeader headerName="CamelHBaseRowId">
> >> >         <el>${in.body.id}</el>
> >> >     </setHeader>
> >> >     <!-- Set the HBase Value for 1st column -->
> >> >     <setHeader headerName="CamelHBaseValue">
> >> >         <el>${in.body.value}</el>
> >> >     </setHeader>
> >> >     <!-- Set the HBase Value for 2nd column -->
> >> >     <setHeader headerName="CamelHBaseValue2">
> >> >         <el>${in.body.othervalue}</el>
> >> >     </setHeader>
> >> >     <to
> >> uri="hbase:mytable?opertaion=CamelHBasePut&amp;family=myfamily&amp;
> >> >
> qualifier=myqualifier&amp;family2=myfamily&amp;qualifier2=myqualifier2"/>
> >> > </route>
> >> >
> >> > I don't understand how we can do that in camel, because the previous
> >> value
> >> > will be overwrote if same header name comes. right?
> >> >
> >> > 3. Remove option
> >> > I tried camel-hbase on consumer side, all scanned rows will be
> removed if
> >> > we didn't specify option remove=false, however this option doesn't
> >> describe
> >> > on the page
> >> >
> >> > 4. Family and Qualifier options
> >> > On consumer part, it is said we can also use uri option and header
> option
> >> > (I'm not sure how to use header option in this case). I tried to
> specify
> >> > family and qualifier options, however, the returned value will always
> be
> >> > null. I'm not sure they are forbidden or it's a bug. I created a bug
> and
> >> > add details for it: https://issues.apache.org/jira/browse/CAMEL-7296
> >> >
> >> > I appreciate to get some answers about these questions. Thanks.
> >> >
> >> > --
> >> > Best Regards
> >> > GangLiu
> >> > Mail: [hidden email]
> >>
> >>
> >>
> >> --
> >> Claus Ibsen
> >> -----------------
> >> Red Hat, Inc.
> >> Email: [hidden email]
> >> Twitter: davsclaus
> >> Blog: http://davsclaus.com
> >> Author of Camel in Action: http://www.manning.com/ibsen
> >> Make your Camel applications look hawt, try: http://hawt.io
> >>
> >
> >
> >
> > --
> > Best Regards
> > GangLiu
> > Mail: [hidden email]
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: [hidden email]
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
> Make your Camel applications look hawt, try: http://hawt.io
>



--
Best Regards
GangLiu
Mail: [hidden email]