Return-Path: X-Original-To: apmail-hbase-user-archive@www.apache.org Delivered-To: apmail-hbase-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E763298FB for ; Mon, 30 Jul 2012 16:54:56 +0000 (UTC) Received: (qmail 99738 invoked by uid 500); 30 Jul 2012 16:54:55 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 99697 invoked by uid 500); 30 Jul 2012 16:54:55 -0000 Mailing-List: contact user-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hbase.apache.org Delivered-To: mailing list user@hbase.apache.org Received: (qmail 99684 invoked by uid 99); 30 Jul 2012 16:54:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jul 2012 16:54:55 +0000 X-ASF-Spam-Status: No, hits=2.9 required=5.0 tests=FSL_RCVD_USER,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [188.165.41.191] (HELO mo3.mail-out.ovh.net) (188.165.41.191) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jul 2012 16:54:47 +0000 Received: from mail622.ha.ovh.net (b7.ovh.net [213.186.33.57]) by mo3.mail-out.ovh.net (Postfix) with SMTP id 1F771FF8889 for ; Mon, 30 Jul 2012 18:49:46 +0200 (CEST) Received: from b0.ovh.net (HELO queueout) (213.186.33.50) by b0.ovh.net with SMTP; 30 Jul 2012 18:43:13 +0200 Received: from unknown (HELO ?IPv6:::1?) (cscetbon@atid.fr@83.206.216.177) by ns0.ovh.net with SMTP; 30 Jul 2012 18:43:11 +0200 From: Cyril Scetbon Content-Type: multipart/alternative; boundary="Apple-Mail=_1A552B51-32F8-4C1F-9AD4-3F2E121C0FF2" Message-Id: Mime-Version: 1.0 (Mac OS X Mail 6.0 \(1485\)) X-Ovh-Mailout: 178.32.228.3 (mo3.mail-out.ovh.net) Subject: Re: Coprocessor POC Date: Mon, 30 Jul 2012 18:43:41 +0200 References: <1B2099D3-E07B-40EC-BB9D-C4B4D15E9EF2@free.fr> <9D846EB6-3E22-4137-9F5C-1DF63B749502@gmail.com> <5A9B4802-8316-40A8-A1AD-85AFE023FB18@free.fr> To: user@hbase.apache.org In-Reply-To: X-Mailer: Apple Mail (2.1485) X-Ovh-Tracer-Id: 13375409418678814506 X-Ovh-Remote: 83.206.216.177 () X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-OVH-SPAMSTATE: OK X-OVH-SPAMSCORE: 0 X-OVH-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeegkedrleehucetufdoteggodetrfdofgetucfrrhhofhhilhgvmecuqfggjfenuceurghilhhouhhtmecufedttdenucenucfhrhhomhepveihrhhilhcuufgtvghtsghonhcuoegthihrihhlrdhstggvthgsohhnsehfrhgvvgdrfhhrqeenucfjughrpefhtgfkggfuffhfvfgjofesrgdtreerhhdtud X-Spam-Check: DONE|U 0.5/N X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeegkedrleehucetufdoteggodetrfdofgetucfrrhhofhhilhgvmecuqfggjfenuceurghilhhouhhtmecufedttdenucenucfhrhhomhepveihrhhilhcuufgtvghtsghonhcuoegthihrihhlrdhstggvthgsohhnsehfrhgvvgdrfhhrqeenucfjughrpefhtgfkggfuffhfvfgjofesrgdtreerhhdtud X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_1A552B51-32F8-4C1F-9AD4-3F2E121C0FF2 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 Thanks, it's really better !=20 I've read that by default it supports only Long values, that's why I was = using a null ColumnInterpreter. Regards. Cyril SCETBON On Jul 30, 2012, at 5:56 PM, Himanshu Vashishtha = wrote: > On Mon, Jul 30, 2012 at 6:55 AM, Cyril Scetbon = wrote: >=20 >> I've given the values returned by scan 'table' command in hbase shell = in my first email. > Somehow I missed the scan result in your first email. So, can you pass > a LongColumnInterpreter instance instead of null? > See TestAggregateProtocol methods for usage. >=20 > Thanks > Himanshu >=20 >>=20 >> Regards >> Cyril SCETBON >>=20 >> On Jul 30, 2012, at 12:50 AM, Himanshu Vashishtha = wrote: >>=20 >>> And also, what are your cell values look like? >>>=20 >>> Himanshu >>>=20 >>> On Sun, Jul 29, 2012 at 3:54 PM, wrote: >>>> Can you use 0.94 for your client jar ? >>>>=20 >>>> Please show us the NullPointerException stack. >>>>=20 >>>> Thanks >>>>=20 >>>>=20 >>>>=20 >>>> On Jul 29, 2012, at 2:49 PM, Cyril Scetbon = wrote: >>>>=20 >>>>> Hi, >>>>>=20 >>>>> I'm testing AggregationClient functions to check if we could use = coprocessors for mathematical functions. >>>>>=20 >>>>> The code I use is the following : >>>>>=20 >>>>> package coreprocessor; >>>>>=20 >>>>> import org.apache.hadoop.conf.Configuration; >>>>> import org.apache.hadoop.hbase.HBaseConfiguration; >>>>> import org.apache.hadoop.hbase.client.Scan; >>>>> import = org.apache.hadoop.hbase.client.coprocessor.AggregationClient; >>>>> import org.apache.hadoop.hbase.util.Bytes; >>>>>=20 >>>>> public class AggregationClientTest { >>>>>=20 >>>>> private static final byte[] TABLE_NAME =3D Bytes.toBytes("ise"); >>>>> private static final byte[] CF =3D Bytes.toBytes("core"); >>>>>=20 >>>>> public static void main(String[] args) throws Throwable { >>>>>=20 >>>>> Configuration configuration =3D HBaseConfiguration.create(); >>>>>=20 >>>>> configuration.setLong("hbase.client.scanner.caching", 1000); >>>>> AggregationClient aggregationClient =3D new AggregationClient( >>>>> configuration); >>>>> Scan scan =3D new Scan(); >>>>> scan.addColumn(CF, Bytes.toBytes("value")); >>>>> System.out.println("row count is " + = aggregationClient.rowCount(TABLE_NAME, null, scan)); >>>>> System.out.println("avg is " + = aggregationClient.avg(TABLE_NAME, null, scan)); >>>>> System.out.println("sum is " + = aggregationClient.sum(TABLE_NAME, null, scan)); >>>>> } >>>>> } >>>>>=20 >>>>> The only one working is the rowCount function. For others I get a = NPE error ! >>>>> I've checked that my table use only Long values for the column on = which I work, and I've only one row in my table : >>>>>=20 >>>>> ROW COLUMN+CELL >>>>> id-cyr1 = column=3Dcore:value, timestamp=3D1343596419845, = value=3D\x00\x00\x00\x00\x00\x00\x00\x0A >>>>>=20 >>>>> The only thing I can add is that my hbase server's version is = 0.94.0 and that I use version 0.92.0 of the hbase jar >>>>>=20 >>>>> any idea why it doesn't work ? >>>>>=20 >>>>> thanks >>>>> Cyril SCETBON >>>>>=20 >>=20 --Apple-Mail=_1A552B51-32F8-4C1F-9AD4-3F2E121C0FF2--