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 D5EEBD82D for ; Mon, 10 Dec 2012 16:04:26 +0000 (UTC) Received: (qmail 78997 invoked by uid 500); 10 Dec 2012 16:04:24 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 78943 invoked by uid 500); 10 Dec 2012 16:04:24 -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 78926 invoked by uid 99); 10 Dec 2012 16:04:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Dec 2012 16:04:24 +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: domain of yuzhihong@gmail.com designates 74.125.82.169 as permitted sender) Received: from [74.125.82.169] (HELO mail-we0-f169.google.com) (74.125.82.169) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Dec 2012 16:04:17 +0000 Received: by mail-we0-f169.google.com with SMTP id t49so1566127wey.14 for ; Mon, 10 Dec 2012 08:03:56 -0800 (PST) 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; bh=+XtgIkvlPdQewO3WWFSsgYAoglDkOcBJz7A3Ihkurqw=; b=LkQZqh/BPwLIpy/uLgtS3e3v1P5+mQT+NeZDKV5SOM/3DKOCdF26NtUmRbu7HNxobQ 8houeHT9rkcXGoC7rJIatiGWALhJ8N3Gl/otxA5rxtT5eknQ4RlRGrQz+XQdCg7T9vHq dGiQcCcS5vE2KHrFoWEXY6l9mkwukPyeg/Ul+MBFQppd8awAxDDmLq4JX45JPRtoeETA SCZOFwYMsQmjIy/s2RWxVHcD0+ESMEc23rFIcRgq76m1qo4MhHCTvugEsKkDt1p46blU 0QETsZ/14ua8uP1We90aqpM3q1sf8jUKZHVw6boq8qOE0/NcochQSW2s2jZewxNb60pK M+2w== MIME-Version: 1.0 Received: by 10.180.75.208 with SMTP id e16mr11668700wiw.3.1355155436085; Mon, 10 Dec 2012 08:03:56 -0800 (PST) Received: by 10.216.73.194 with HTTP; Mon, 10 Dec 2012 08:03:55 -0800 (PST) In-Reply-To: References: <34BAE961-718E-426F-8B8A-E66F6D0E272C@gmail.com> Date: Mon, 10 Dec 2012 08:03:55 -0800 Message-ID: Subject: Re: Checking if a coprocessor was loaded successfully from client From: Ted Yu To: user@hbase.apache.org Content-Type: multipart/alternative; boundary=f46d0438904d621ff104d081b6d9 X-Virus-Checked: Checked by ClamAV on apache.org --f46d0438904d621ff104d081b6d9 Content-Type: text/plain; charset=ISO-8859-1 Asaf: Your coprocessor was successfully running prior to the schema change ? See HBASE-6873 Clean up Coprocessor load failure handling. Cheers On Mon, Dec 10, 2012 at 5:11 AM, Mesika, Asaf wrote: > I guess I'm missing something in the sequence of actions here: > > 1. I'm disabling the table. This action is synchronous. > 2. I'm running the method hBaseAdmin.modifyTable(), which is *asynchronous* > 3. I'm supposed to use hBaseAdmin.getAlterStatus() to check every x > seconds whether all regions have been modified. > 4. Once that has passed, I can finally enable the table, which is a > synchronous action. This should signify that the table's region are online, > thus have loaded the region observer class and instantiated it - meaning, > it has found the JAR file specified in its HDFS location. > > hasCoprocessor just checks whether the metadata object has the coprocessor > attribute and it if has the className you supplied to it. > How can I know that if a classname is present on a HTableDescriptor, then > al the tables's regions successfully instantiated the region observer? > > > > On Dec 10, 2012, at 10:01 AM, anil gupta wrote: > > > Hi Asaf, > > > > Have a look at the > > *hasCoprocessor< > http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/HTableDescriptor.html#hasCoprocessor%28java.lang.String%29 > > > > * method of HTD: > > > http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/HTableDescriptor.html#hasCoprocessor(java.lang.String) > > > > It might be helpful for you. I have used it in past to check whether a > > coprocessors is successfully added or not. > > > > HTH, > > Anil > > > > On Sun, Dec 9, 2012 at 2:25 PM, Ted Yu wrote: > > > >> On region server web UI, you should see the list of coprocessors loaded. > >> > >> But I guess you're looking for a programmatic way of detecting > coprocessor > >> deployment. > >> > >> Cheers > >> > >> On Sun, Dec 9, 2012 at 12:29 PM, Mesika, Asaf > >> wrote: > >> > >>> 0.94.0 > >>> On Dec 9, 2012, at 3:03 PM, yuzhihong@gmail.com wrote: > >>> > >>>> Which hbase version are you targeting ? > >>>> > >>>> Thanks > >>>> > >>>> > >>>> > >>>> On Dec 9, 2012, at 2:55 AM, "Mesika, Asaf" > >>> wrote: > >>>> > >>>>> Hi, > >>>>> > >>>>> I wrote a custom Region Observer. > >>>>> I'm currently writing an Installer class for it. > >>>>> In this installer I'm adding the region observer by adding a > >>> coprocessor to the HTableDescriptor, and then calling modifyTable by > >>> HBaseAdmin. > >>>>> > >>>>> My question is: How can I check whether region observer was loaded > >>> successfully for this table? > >>>>> > >>>>> I tried searching for a way to get the Coprocessor.State somehow for > >> my > >>> region observer so I'll know it's ACTIVE, but couldn't find a way. > >>>>> > >>>>> > >>>>> Thank you, > >>>>> > >>>>> Asaf > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > >>> > >>> > >> > > > > > > > > -- > > Thanks & Regards, > > Anil Gupta > > --f46d0438904d621ff104d081b6d9--