|
|
Dalia Sobhy 2012-10-14, 19:44
Could anyone provide me with an example on hbase 0.92 on getSum() function, bec i am unable to implement it.
Thanks
anil gupta 2012-10-14, 20:04
Hi Dalia,
Which getSum() method are you talking about? Please be specific.
Thanks, Anil Gupta
On Sun, Oct 14, 2012 at 2:44 PM, Dalia Sobhy <[EMAIL PROTECTED]>wrote:
> Could anyone provide me with an example on hbase 0.92 on getSum() > function, bec i am unable to implement it. > > Thanks > > > -- Thanks & Regards, Anil Gupta
Dalia Sobhy 2012-10-14, 20:10
Method in AggregateImplementation class.
On 2012-10-14, at 10:05 PM, "anil gupta" <[EMAIL PROTECTED]> wrote:
> Hi Dalia, > > Which getSum() method are you talking about? Please be specific. > > Thanks, > Anil Gupta > > On Sun, Oct 14, 2012 at 2:44 PM, Dalia Sobhy <[EMAIL PROTECTED]>wrote: > >> Could anyone provide me with an example on hbase 0.92 on getSum() >> function, bec i am unable to implement it. >> >> Thanks > > > -- > Thanks & Regards, > Anil Gupta
anil gupta 2012-10-14, 20:23
Hi Dalia, On the client-side you dont need to use that method directly. Instead, use the following method : org.apache.hadoop.hbase.client.coprocessor.AggregationClient.sum(byte[] tableName, ColumnInterpreter< http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/coprocessor/ColumnInterpreter.html><R,S>ci, Scan< http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/Scan.html> scan) Here is the documention for that class: http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/coprocessor/AggregationClient.htmlHave a look at the JUnit for this co-processor for better understanding. HTH, Anil On Sun, Oct 14, 2012 at 3:10 PM, Dalia Sobhy <[EMAIL PROTECTED]>wrote: > Method in AggregateImplementation class. > > > > On 2012-10-14, at 10:05 PM, "anil gupta" <[EMAIL PROTECTED]> wrote: > > > Hi Dalia, > > > > Which getSum() method are you talking about? Please be specific. > > > > Thanks, > > Anil Gupta > > > > On Sun, Oct 14, 2012 at 2:44 PM, Dalia Sobhy <[EMAIL PROTECTED] > >wrote: > > > >> Could anyone provide me with an example on hbase 0.92 on getSum() > >> function, bec i am unable to implement it. > >> > >> Thanks > > > > > > -- > > Thanks & Regards, > > Anil Gupta > -- Thanks & Regards, Anil Gupta
Dalia Sobhy 2012-10-14, 20:39
Hi anil, Whats <R,S> ? Sent from my iPhone On 2012-10-14, at 10:24 PM, "anil gupta" <[EMAIL PROTECTED]> wrote: > Hi Dalia, > > On the client-side you dont need to use that method directly. Instead, use > the following method : > org.apache.hadoop.hbase.client.coprocessor.AggregationClient.sum(byte[] > tableName, > ColumnInterpreter< http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/coprocessor/ColumnInterpreter.html><R,S>> ci, > Scan< http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/Scan.html>> scan) > > Here is the documention for that class: > http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/coprocessor/AggregationClient.html> > Have a look at the JUnit for this co-processor for better understanding. > > HTH, > Anil > > On Sun, Oct 14, 2012 at 3:10 PM, Dalia Sobhy <[EMAIL PROTECTED]>wrote: > >> Method in AggregateImplementation class. >> >> >> >> On 2012-10-14, at 10:05 PM, "anil gupta" <[EMAIL PROTECTED]> wrote: >> >>> Hi Dalia, >>> >>> Which getSum() method are you talking about? Please be specific. >>> >>> Thanks, >>> Anil Gupta >>> >>> On Sun, Oct 14, 2012 at 2:44 PM, Dalia Sobhy <[EMAIL PROTECTED] >>> wrote: >>> >>>> Could anyone provide me with an example on hbase 0.92 on getSum() >>>> function, bec i am unable to implement it. >>>> >>>> Thanks >>> >>> >>> -- >>> Thanks & Regards, >>> Anil Gupta > > > > -- > Thanks & Regards, > Anil Gupta
anil gupta 2012-10-14, 22:02
R- Cell value data type S- Promoted data type On Sun, Oct 14, 2012 at 3:39 PM, Dalia Sobhy <[EMAIL PROTECTED]>wrote: > Hi anil, > > Whats <R,S> ? > Sent from my iPhone > > On 2012-10-14, at 10:24 PM, "anil gupta" <[EMAIL PROTECTED]> wrote: > > > Hi Dalia, > > > > On the client-side you dont need to use that method directly. Instead, > use > > the following method : > > org.apache.hadoop.hbase.client.coprocessor.AggregationClient.sum(byte[] > > tableName, > > ColumnInterpreter< > http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/coprocessor/ColumnInterpreter.html> ><R,S> > > ci, > > Scan< > http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/Scan.html>> > scan) > > > > Here is the documention for that class: > > > http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/coprocessor/AggregationClient.html> > > > Have a look at the JUnit for this co-processor for better understanding. > > > > HTH, > > Anil > > > > On Sun, Oct 14, 2012 at 3:10 PM, Dalia Sobhy <[EMAIL PROTECTED] > >wrote: > > > >> Method in AggregateImplementation class. > >> > >> > >> > >> On 2012-10-14, at 10:05 PM, "anil gupta" <[EMAIL PROTECTED]> wrote: > >> > >>> Hi Dalia, > >>> > >>> Which getSum() method are you talking about? Please be specific. > >>> > >>> Thanks, > >>> Anil Gupta > >>> > >>> On Sun, Oct 14, 2012 at 2:44 PM, Dalia Sobhy < > [EMAIL PROTECTED] > >>> wrote: > >>> > >>>> Could anyone provide me with an example on hbase 0.92 on getSum() > >>>> function, bec i am unable to implement it. > >>>> > >>>> Thanks > >>> > >>> > >>> -- > >>> Thanks & Regards, > >>> Anil Gupta > > > > > > > > -- > > Thanks & Regards, > > Anil Gupta > -- Thanks & Regards, Anil Gupta
Dalia Sobhy 2012-10-15, 09:11
Hello anil, What do u mean by promoted data type? Sent from my iPhone On 2012-10-15, at 12:03 AM, "anil gupta" <[EMAIL PROTECTED]> wrote: > R- Cell value data type > S- Promoted data type > > > On Sun, Oct 14, 2012 at 3:39 PM, Dalia Sobhy <[EMAIL PROTECTED]>wrote: > >> Hi anil, >> >> Whats <R,S> ? >> Sent from my iPhone >> >> On 2012-10-14, at 10:24 PM, "anil gupta" <[EMAIL PROTECTED]> wrote: >> >>> Hi Dalia, >>> >>> On the client-side you dont need to use that method directly. Instead, >> use >>> the following method : >>> org.apache.hadoop.hbase.client.coprocessor.AggregationClient.sum(byte[] >>> tableName, >>> ColumnInterpreter< >> http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/coprocessor/ColumnInterpreter.html>>> <R,S> >>> ci, >>> Scan< >> http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/Scan.html>>>> scan) >>> >>> Here is the documention for that class: >> http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/coprocessor/AggregationClient.html>>> >>> Have a look at the JUnit for this co-processor for better understanding. >>> >>> HTH, >>> Anil >>> >>> On Sun, Oct 14, 2012 at 3:10 PM, Dalia Sobhy <[EMAIL PROTECTED] >>> wrote: >>> >>>> Method in AggregateImplementation class. >>>> >>>> >>>> >>>> On 2012-10-14, at 10:05 PM, "anil gupta" <[EMAIL PROTECTED]> wrote: >>>> >>>>> Hi Dalia, >>>>> >>>>> Which getSum() method are you talking about? Please be specific. >>>>> >>>>> Thanks, >>>>> Anil Gupta >>>>> >>>>> On Sun, Oct 14, 2012 at 2:44 PM, Dalia Sobhy < >> [EMAIL PROTECTED] >>>>> wrote: >>>>> >>>>>> Could anyone provide me with an example on hbase 0.92 on getSum() >>>>>> function, bec i am unable to implement it. >>>>>> >>>>>> Thanks >>>>> >>>>> >>>>> -- >>>>> Thanks & Regards, >>>>> Anil Gupta >>> >>> >>> >>> -- >>> Thanks & Regards, >>> Anil Gupta > > > > -- > Thanks & Regards, > Anil Gupta
anil gupta 2012-10-15, 15:48
Hi Dalia, I would highly encourage you to go through the JUnit test cases and documentation of Co-processors to get better understanding. Here is the link for code-base of HBase: http://svn.apache.org/repos/asf/hbase/trunkR = The data type which was stored in HBase as Value S = The data type which you would like to use for calculating aggregation in Co-processor. For example, if you store the "price of a product" as String in HBase but you would like to use that Value as Double or BigDecimal for aggregation, you can do it through the column interpreter. For this you will have to write your custom CI. There is already a LongColumnInterpreter in HBase, if you would like to do aggregations on Long values. For BigDecimal, you can use the java class attached in this Jira: https://issues.apache.org/jira/browse/HBASE-6669Hope this helps, Anil Gupta On Mon, Oct 15, 2012 at 2:11 AM, Dalia Sobhy <[EMAIL PROTECTED]>wrote: > Hello anil, > What do u mean by promoted data type? > > Sent from my iPhone > > On 2012-10-15, at 12:03 AM, "anil gupta" <[EMAIL PROTECTED]> wrote: > > > R- Cell value data type > > S- Promoted data type > > > > > > On Sun, Oct 14, 2012 at 3:39 PM, Dalia Sobhy <[EMAIL PROTECTED] > >wrote: > > > >> Hi anil, > >> > >> Whats <R,S> ? > >> Sent from my iPhone > >> > >> On 2012-10-14, at 10:24 PM, "anil gupta" <[EMAIL PROTECTED]> wrote: > >> > >>> Hi Dalia, > >>> > >>> On the client-side you dont need to use that method directly. Instead, > >> use > >>> the following method : > >>> org.apache.hadoop.hbase.client.coprocessor.AggregationClient.sum(byte[] > >>> tableName, > >>> ColumnInterpreter< > >> > http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/coprocessor/ColumnInterpreter.html> >>> <R,S> > >>> ci, > >>> Scan< > >> > http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/Scan.html>> >>> scan) > >>> > >>> Here is the documention for that class: > >> > http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/coprocessor/AggregationClient.html> >>> > >>> Have a look at the JUnit for this co-processor for better > understanding. > >>> > >>> HTH, > >>> Anil > >>> > >>> On Sun, Oct 14, 2012 at 3:10 PM, Dalia Sobhy < > [EMAIL PROTECTED] > >>> wrote: > >>> > >>>> Method in AggregateImplementation class. > >>>> > >>>> > >>>> > >>>> On 2012-10-14, at 10:05 PM, "anil gupta" <[EMAIL PROTECTED]> > wrote: > >>>> > >>>>> Hi Dalia, > >>>>> > >>>>> Which getSum() method are you talking about? Please be specific. > >>>>> > >>>>> Thanks, > >>>>> Anil Gupta > >>>>> > >>>>> On Sun, Oct 14, 2012 at 2:44 PM, Dalia Sobhy < > >> [EMAIL PROTECTED] > >>>>> wrote: > >>>>> > >>>>>> Could anyone provide me with an example on hbase 0.92 on getSum() > >>>>>> function, bec i am unable to implement it. > >>>>>> > >>>>>> Thanks > >>>>> > >>>>> > >>>>> -- > >>>>> Thanks & Regards, > >>>>> Anil Gupta > >>> > >>> > >>> > >>> -- > >>> Thanks & Regards, > >>> Anil Gupta > > > > > > > > -- > > Thanks & Regards, > > Anil Gupta > -- Thanks & Regards, Anil Gupta
|
|