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 9A0FD9E1A for ; Tue, 10 Apr 2012 16:20:56 +0000 (UTC) Received: (qmail 71755 invoked by uid 500); 10 Apr 2012 16:20:54 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 71717 invoked by uid 500); 10 Apr 2012 16:20:54 -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 71709 invoked by uid 99); 10 Apr 2012 16:20:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Apr 2012 16:20:54 +0000 X-ASF-Spam-Status: No, hits=-0.5 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of yongyong313@gmail.com designates 209.85.210.53 as permitted sender) Received: from [209.85.210.53] (HELO mail-pz0-f53.google.com) (209.85.210.53) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Apr 2012 16:20:47 +0000 Received: by dajr28 with SMTP id r28so6635815daj.12 for ; Tue, 10 Apr 2012 09:20:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=WMWZnGDh/cW9F/rMTcR/aAMjvyM6omT4lrlt2kGKAuo=; b=WFpp3yy+dgGe/9RpPDcv6Pn50430np4WpDPO7/2Ip6KIXxsDJtXa2HG6wgvAW30CWL gI8qMjqNJx30XDh22qRsUkWXLElrfeG4kaPGeRs1Vj4Shr58aSQf7HaTB0yYFa+1JpqM C7IAu3l6HXEpd8brS6KnMQW+7JSQnu/KbNLtvDDh+XEpL7+yAw/2lqMQUTqsVkj+LdC9 NNk4rJOjOTlsCt+CvtFdXm0jpznZvQ9l8uXwgrr5hF+FXVSez88WioG0b86labtBkUAm KJOAPEarRYldczttKgWqYDuaaCVAIB0ghwn+q6TkGqbswrSKQOxWbwD9LEkmFO94Q9RI 3GOw== MIME-Version: 1.0 Received: by 10.68.225.104 with SMTP id rj8mr30098084pbc.135.1334074825945; Tue, 10 Apr 2012 09:20:25 -0700 (PDT) Received: by 10.68.20.42 with HTTP; Tue, 10 Apr 2012 09:20:25 -0700 (PDT) In-Reply-To: References: Date: Tue, 10 Apr 2012 18:20:25 +0200 Message-ID: Subject: Re: A confusion of RegionCoprocessorEnvironment.getReion() method From: yonghu To: user@hbase.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks for your explanation. Now it's clear for me. Regards! Yong On Tue, Apr 10, 2012 at 6:13 PM, Gary Helmling wrote: > Each and every HRegion on a given region server will have it's own > distinct instance of your configured RegionObserver class. > RegionCoprocessorEnvironment.getRegion() returns a reference to the > HRegion containing the current coprocessor instance. > > The hierarchy is essentially: > > HRegionServer > \_ =A0HRegion > =A0 =A0 =A0 =A0\_ RegionCoprocessorHost > =A0 =A0 =A0 =A0 =A0 =A0 \_ =A0 > > (repeated for each HRegion). > > This blog post by Mingjie may help explain things a bit more: > https://blogs.apache.org/hbase/entry/coprocessor_introduction > > > --gh > > > > On Tue, Apr 10, 2012 at 2:30 AM, yonghu wrote: >> Hello, >> >> The description of this method is " /** @return the region associated >> with this coprocessor */" and the return value is an HRegion instance. >> If I configure the region-coprocessor class in hbase-site.xml. =A0It >> means that this coprocessor will be applied to every HRegion which >> resides on this Region Server (if I understand right). =A0Why this >> method only return one HRgion instance not a list of HRgion >> instances?Suppose that a region server has two HRegions, one is for >> table 'test1', the other is for table 'test2'. =A0Which HRgion instance >> will be returned if I call RegionCoprocessorEnvironment.getReion()? >> >> Thanks! >> >> Yong