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 72D84D67D for ; Sun, 29 Jul 2012 21:55:04 +0000 (UTC) Received: (qmail 29421 invoked by uid 500); 29 Jul 2012 21:55:02 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 29283 invoked by uid 500); 29 Jul 2012 21:55:02 -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 29275 invoked by uid 99); 29 Jul 2012 21:55:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 29 Jul 2012 21:55:01 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FSL_RCVD_USER,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of yuzhihong@gmail.com designates 209.85.160.41 as permitted sender) Received: from [209.85.160.41] (HELO mail-pb0-f41.google.com) (209.85.160.41) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 29 Jul 2012 21:54:54 +0000 Received: by pbbrp2 with SMTP id rp2so9910424pbb.14 for ; Sun, 29 Jul 2012 14:54:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:in-reply-to:mime-version:content-transfer-encoding :content-type:message-id:cc:x-mailer:from:subject:date:to; bh=sIB4c5QbDwb9JsQuCpGNSnKtZ1lEN4AQuxsssax6ux8=; b=qg1HU6pK44eLgI1LKw0Kga3K/+dUBamDymAkbrNgKY3kDOA0ct33agGglQk5nsfdLf NLgKcP9mvIEpJ42tFUhFPh9za57p1iF6RcWlp+MQXSOFQa2g51fGsrrWX+J/z8e5R6kP EvcZkwI0mRYuRniBRo6EpeTjcEm3lNCANj48gRvGkiFH8lOEpUT/Hb0Rju2RByCooooh LPNelaMQB+ZmvTrA5q9rlg+/5CcNF7h9KssE8P9SqsNL6xWMXPVIQJ14RYIYNXfYNq5E /G9B9cXpGxDjIGlgCyDxZBM1qU6tynrJTqs349HP5FIZf46yf4VykoNyeY3LlT6MjIGD ammw== Received: by 10.66.78.9 with SMTP id x9mr20039233paw.84.1343598873673; Sun, 29 Jul 2012 14:54:33 -0700 (PDT) Received: from [192.168.0.15] (c-24-130-233-55.hsd1.ca.comcast.net. [24.130.233.55]) by mx.google.com with ESMTPS id pi7sm6481152pbb.56.2012.07.29.14.54.31 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 29 Jul 2012 14:54:32 -0700 (PDT) References: <1B2099D3-E07B-40EC-BB9D-C4B4D15E9EF2@free.fr> In-Reply-To: <1B2099D3-E07B-40EC-BB9D-C4B4D15E9EF2@free.fr> Mime-Version: 1.0 (1.0) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Message-Id: <9D846EB6-3E22-4137-9F5C-1DF63B749502@gmail.com> Cc: "user@hbase.apache.org" X-Mailer: iPhone Mail (9A405) From: yuzhihong@gmail.com Subject: Re: Coprocessor POC Date: Sun, 29 Jul 2012 14:54:28 -0700 To: "user@hbase.apache.org" X-Virus-Checked: Checked by ClamAV on apache.org Can you use 0.94 for your client jar ? Please show us the NullPointerException stack.=20 Thanks On Jul 29, 2012, at 2:49 PM, Cyril Scetbon wrote: > Hi, >=20 > I'm testing AggregationClient functions to check if we could use coprocess= ors 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(TABL= E_NAME, null, scan)); > System.out.println("avg is " + aggregationClient.avg(TABLE_NAME, nul= l, scan)); > System.out.println("sum is " + aggregationClient.sum(TABLE_NAME, nul= l, scan)); > } > } >=20 > The only one working is the rowCount function. For others I get a NPE erro= r ! > I've checked that my table use only Long values for the column on which I w= ork, and I've only one row in my table : >=20 > ROW COLUMN+CELL = = =20 > id-cyr1 column=3Dcore:value, t= imestamp=3D1343596419845, value=3D\x00\x00\x00\x00\x00\x00\x00\x0A = =20 >=20 > The only thing I can add is that my hbase server's version is 0.94.0 and t= hat I use version 0.92.0 of the hbase jar >=20 > any idea why it doesn't work ? >=20 > thanks=20 > Cyril SCETBON >=20