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 A0D2E10B10 for ; Mon, 14 Apr 2014 03:49:02 +0000 (UTC) Received: (qmail 22814 invoked by uid 500); 14 Apr 2014 03:48:58 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 22303 invoked by uid 500); 14 Apr 2014 03:48:56 -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 22264 invoked by uid 99); 14 Apr 2014 03:48:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Apr 2014 03:48:54 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [209.85.216.179] (HELO mail-qc0-f179.google.com) (209.85.216.179) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Apr 2014 03:48:50 +0000 Received: by mail-qc0-f179.google.com with SMTP id m20so8435756qcx.10 for ; Sun, 13 Apr 2014 20:48:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=d7sVbThpy6K1FnA3zmQBbvICORcCZ/Rb/8TYjeWfMGE=; b=j/3sgdscjZQsQysmBDwT9jbtQttBcJwWVs5k965pQABDYc+/s7XSwNJz5Zz0h84I3G I0Cu+Bmk5ytxJxeZhQm/OJQuyWxNWeAascM21pcLj0omdho6SSIXgs3Ha8Kks5MD5D76 ZNxA6y8GApvjF/2lVnaqBAbKazbkK011xNkuBM1dkiVnVALon61gF7ks7tPqvZdxQmHN e4FVAzCHNzmldq7QZ7Y6qYK/hNWak2zOkwGVapv3MuqJPX4+/i50G6nwAjdUujNQNsQd oZwSgF8WiSz6bbkgyjfyGAJGcvHZJyhCGG0CP9tWtDIXjgHRGOa1MMJ8uOUcE8GgyBD2 6K2g== X-Gm-Message-State: ALoCoQlB3QDJT0OljktbyvlAg6/pVYwkUjqljQdjg3b7NanIj04nxAVU2T2dfgMWUlQ/NaV7PXCA MIME-Version: 1.0 X-Received: by 10.140.96.182 with SMTP id k51mr45294244qge.60.1397447309079; Sun, 13 Apr 2014 20:48:29 -0700 (PDT) Received: by 10.229.92.78 with HTTP; Sun, 13 Apr 2014 20:48:29 -0700 (PDT) In-Reply-To: References: <0A88212BF9DDF54FBEE61A2C1965291D032B587CB2@GSCMBLP12EX.firmwide.corp.gs.com> <0A88212BF9DDF54FBEE61A2C1965291D032B587D2D@GSCMBLP12EX.firmwide.corp.gs.com> <0A88212BF9DDF54FBEE61A2C1965291D032B587D3B@GSCMBLP12EX.firmwide.corp.gs.com> Date: Mon, 14 Apr 2014 11:48:29 +0800 Message-ID: Subject: Re: endpoint coprocessor From: "Rabbit's Foot" To: user@hbase.apache.org Content-Type: multipart/alternative; boundary=001a11391b167346cd04f6f88eaa X-Virus-Checked: Checked by ClamAV on apache.org --001a11391b167346cd04f6f88eaa Content-Type: text/plain; charset=ISO-8859-1 You can think of Endpoint Coprocessor as stored procedures in SQL DBs. In order to use an Endpoint Coprocessor you need to build and install it on the server side and then it invoke through HBase RPC. You can make use of https://blogs.apache.org/hbase/entry/coprocessor_introduction. 2014-04-14 5:56 GMT+08:00 Ted Yu : > For 0.96+, you can refer > to > hbase-client/src/main/java/org/apache/hadoop/hbase/client/coprocessor/AggregationClient.java > as the java client example. > > Cheers > > > > On Fri, Apr 11, 2014 at 6:20 PM, Bogala, Chandra Reddy < > Chandra.Bogala@gs.com> wrote: > > > Thanks Yu. My understanding is, this coprocessor is available as part of > > Hbase server components. So I should be able to attach this coprocessor > to > > any of my tables by using alter table command. > > > > > > > > alter 'demo-table','COPROCESSOR' =>'|class|priority|args' > > > > > > > > Then from hbase shell, I should be able to call this coprocessor with > > command. Same like how we do scan and filter. Is there any command like > > below(filter command) calling a coprocessor. So that it will run in > region > > server and return back results?. > > > > > > > > scan 'demo-table', {FILTER => > > > org.apache.hadoop.hbase.filter.RowFilter.new(CompareFilter::CompareOp.valueOf('EQUAL'),SubstringComparator.new("10001|1395309600"))} > > > > > > > > I am trying to figure out a simple call mechanism(client) of coprocessor. > > If by default those classes and calling mechanism not available from > hbase > > shell. Then planning to use java client code to invoke coprocessor. > > > > Any pointers to java client to invoke aggregation< > > > http://search-hadoop.com/c/HBase:hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/AggregateImplementation.java||Hbase+aggregation+endpoint > > > > coprocessor will be helpful. > > > > > > > > Thanks, > > > > Chandra > > > > > > > > -----Original Message----- > > From: Ted Yu [mailto:yuzhihong@gmail.com] > > Sent: Friday, April 11, 2014 10:42 PM > > To: user@hbase.apache.org > > Subject: Re: endpoint coprocessor > > > > > > > > Please take a look at : > > > > hbase-shell/src/main/ruby/hbase/security.rb > > > > > > > > for example on how coprocessor is activated from shell. > > > > > > > > Cheers > > > > > > > > > > > > On Fri, Apr 11, 2014 at 11:06 AM, Bogala, Chandra Reddy < > > Chandra.Bogala@gs.com> wrote: > > > > > > > > > Thank you. I am aware of this challenge. How to call below coprocessor > > > > > from client. Can I call this coprocessor from hbase shell?. I am new > > > > > to Hbase. So may be asking very dumb questions. > > > > > > > > > > Thanks, > > > > > Chandra > > > > > > > > > > -----Original Message----- > > > > > From: Asaf Mesika [mailto:asaf.mesika@gmail.com] > > > > > Sent: Friday, April 11, 2014 12:10 PM > > > > > To: user@hbase.apache.org > > > > > Subject: Re: endpoint coprocessor > > > > > > > > > > Bear in mind each region will return its top n, then you will have to > > > > > run another top n in your client code. This introduce a numerical > > > > > error : top on top. > > > > > > > > > > On Thursday, April 10, 2014, Bogala, Chandra Reddy > > > > > > > > > > > wrote: > > > > > > > > > > > Hi, > > > > > > I am planning to write endpoint coprocessor to calculate TOP N > > > > > > results for my usecase. I got confused with old apis and new apis. > > > > > > I followed below links and try to implement. But looks like api's > > > > > > changed a lot. I don't see many of these classes in hbase jars. We > > > > > > are using Hbase 0.96. > > > > > > Can anyone point to the latest document/apis?. And if possible > > > > > > sample code to calculate top N. > > > > > > > > > > > > https://blogs.apache.org/hbase/entry/coprocessor_introduction > > > > > > HBase Coprocessors - Deploy shared functionality directly on the > > > > > > cluster > > > > > > > > > > > > Thanks, > > > > > > Chandra > > > > > > > > > > > > > > > > > > > > > > > > > > --001a11391b167346cd04f6f88eaa--