From user-return-39584-apmail-hbase-user-archive=hbase.apache.org@hbase.apache.org Mon Oct 21 23:04:03 2013 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 29AD410A50 for ; Mon, 21 Oct 2013 23:04:03 +0000 (UTC) Received: (qmail 28427 invoked by uid 500); 21 Oct 2013 23:03:59 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 28211 invoked by uid 500); 21 Oct 2013 23:03:57 -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 28154 invoked by uid 99); 21 Oct 2013 23:03:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Oct 2013 23:03:57 +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 (nike.apache.org: domain of yuzhihong@gmail.com designates 209.85.217.180 as permitted sender) Received: from [209.85.217.180] (HELO mail-lb0-f180.google.com) (209.85.217.180) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Oct 2013 23:03:49 +0000 Received: by mail-lb0-f180.google.com with SMTP id q8so6239206lbi.11 for ; Mon, 21 Oct 2013 16:03:29 -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; bh=TgwyMj5K4URTWIpLQ3/icdKCjI+2Pd129qhmX8KCjRg=; b=vV7mv+pR5/euiJ2Xo+3aJx5eEExvtH/MfvxZrHJzAxeIOU34Qfp2Vt6nu9Gxg22lOG 4JNZ6fsdHXVcPPb8KevBFqokqznWPlDF5LGerc78dwOtR5GNUYT1D4T8X8jyu66DYLYM qcdTVDzg/mPOCsJMMerVoshFqmbqKU7PRC9TT1JsInfGcTRwJylj/gJ0bl+t68VEw/By 0+AXvrQMglLaz0Rhm7zGLvB1okJIyDihS/CGWzNWZ9EssvcZ+XRTMR5vDEg6BUb5uZTd Ii6stDMuH6xVSdZqylgmPWnsWOKn2pbRcupyuRZFR0/raOHh5/YjYBQjvgoJEmPMjXgU iy8Q== MIME-Version: 1.0 X-Received: by 10.152.29.103 with SMTP id j7mr15146586lah.7.1382396525238; Mon, 21 Oct 2013 16:02:05 -0700 (PDT) Received: by 10.112.129.40 with HTTP; Mon, 21 Oct 2013 16:02:05 -0700 (PDT) In-Reply-To: References: Date: Mon, 21 Oct 2013 16:02:05 -0700 Message-ID: Subject: Re: coprocessor status query From: Ted Yu To: "user@hbase.apache.org" Content-Type: multipart/alternative; boundary=089e0160b828d35f1b04e9484598 X-Virus-Checked: Checked by ClamAV on apache.org --089e0160b828d35f1b04e9484598 Content-Type: text/plain; charset=ISO-8859-1 For #1, the coprocessors reported are live ones. See CoprocessorHost#getCoprocessors() For #2, I don't know such API (without parsing ServerLoad) exists. Cheers On Mon, Oct 21, 2013 at 2:50 PM, Ted Yu wrote: > w.r.t. #3, there is a config parameter: "hbase.coprocessor.abortonerror" > which determines whether the hosting server should abort. > > See the following tests for examples: > > hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestMasterCoprocessorExceptionWithAbort.java > > hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestMasterCoprocessorExceptionWithRemove.java > > hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionServerCoprocessorExceptionWithAbort.java > > hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionServerCoprocessorExceptionWithRemove.java > > Cheers > > > On Mon, Oct 21, 2013 at 2:41 PM, Wei Tan wrote: > >> Hello, I want to check the status of each coprocessor, in a given table. >> Let's say I have 3 CPs and one of them is removed due to some unhandled >> exception, so I want to see this status (3 deployed, 2 currently alive). >> >> I found this from >> http://blogs.apache.org/hbase/entry/coprocessor_introduction so my >> question is: >> >> 1. is the coprocessor shown in shell the actually live one, i.e., >> excluding those loaded but removed later? >> 2. is there a way to get it from Java API? >> 3. as far as I understand, during an un-handled exception, the >> coprocessorhost will remove this cp from ALL region servers, not only the >> server where the exception occurs? Is it correct? >> >> Thanks, >> Wei >> >> HBase Shell Coprocessor Status >> After a coprocessor has been configured, you also need to check the >> coprocessor status using the shell or master and region server web UIs to >> determine if the coprocessor has been loaded successfully. >> Shell command: >> hbase(main):018:0> alter 't1', METHOD => 'table_att', >> >> >> 'coprocessor'=>'|org.apache.hadoop.hbase.coprocessor.AggregateImplementation|1001|arg1=1,arg2=2' >> Updating all regions with the new schema... >> 1/1 regions updated. >> Done. >> 0 row(s) in 1.1060 seconds >> >> hbase(main):019:0> enable 't1' >> 0 row(s) in 2.0620 seconds >> >> hbase(main):020:0> status 'detailed' >> version 0.92-tm-6 >> 0 regionsInTransition >> master coprocessors: [] >> 1 live servers >> localhost:52761 1328082515520 >> requestsPerSecond=3, numberOfOnlineRegions=3, usedHeapMB=32, >> maxHeapMB=995 >> -ROOT-,,0 >> numberOfStores=1, numberOfStorefiles=1, >> storefileUncompressedSizeMB=0, storefileSizeMB=0, memstoreSizeMB=0, >> storefileIndexSizeMB=0, readRequestsCount=54, writeRequestsCount=1, >> rootIndexSizeKB=0, totalStaticIndexSizeKB=0, >> totalStaticBloomSizeKB=0, totalCompactingKVs=0, currentCompactedKVs=0, >> compactionProgressPct=NaN, coprocessors=[] >> .META.,,1 >> numberOfStores=1, numberOfStorefiles=0, >> storefileUncompressedSizeMB=0, storefileSizeMB=0, memstoreSizeMB=0, >> storefileIndexSizeMB=0, readRequestsCount=97, writeRequestsCount=4, >> rootIndexSizeKB=0, totalStaticIndexSizeKB=0, >> totalStaticBloomSizeKB=0, totalCompactingKVs=0, currentCompactedKVs=0, >> compactionProgressPct=NaN, coprocessors=[] >> t1,,1328082575190.c0491168a27620ffe653ec6c04c9b4d1. >> numberOfStores=2, numberOfStorefiles=1, >> storefileUncompressedSizeMB=0, storefileSizeMB=0, memstoreSizeMB=0, >> storefileIndexSizeMB=0, readRequestsCount=0, writeRequestsCount=0, >> rootIndexSizeKB=0, totalStaticIndexSizeKB=0, >> totalStaticBloomSizeKB=0, totalCompactingKVs=0, currentCompactedKVs=0, >> compactionProgressPct=NaN, >> coprocessors=[AggregateImplementation] >> 0 dead servers >> >> If you cannot find the coprocessor loaded, you need to check the server >> log files to discover the reason for its failure to load. > > > --089e0160b828d35f1b04e9484598--