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 BE04E10768 for ; Mon, 21 Oct 2013 21:59:51 +0000 (UTC) Received: (qmail 63416 invoked by uid 500); 21 Oct 2013 21:54:22 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 62073 invoked by uid 500); 21 Oct 2013 21:53:04 -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 60765 invoked by uid 99); 21 Oct 2013 21:50:54 -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 21:50: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 (nike.apache.org: domain of yuzhihong@gmail.com designates 209.85.217.175 as permitted sender) Received: from [209.85.217.175] (HELO mail-lb0-f175.google.com) (209.85.217.175) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Oct 2013 21:50:46 +0000 Received: by mail-lb0-f175.google.com with SMTP id z5so1243704lbh.34 for ; Mon, 21 Oct 2013 14:50: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; bh=I7yFuFLAVZ0MsXG3z2GViGMjnYQ5UX+yrEF/9FK8ptg=; b=FTYgLEypct+JGKQmmzZB3ASj+NY1w1MsdTdqZWxuE41s+4mrkWFvq/jWt+1t4yAAXq O2bQ+Q5TJf0nFDVuAdhDm1yYQce+pgo+2fRyjkniI9eZCs0BJUhy0CNa09c/R9tebSp6 NUZCkSrmMR+YEiHs2Ufw5zFV4a3YLN1M26yJ2bbRQp8uCRJq8LwEb0mKm8rdxRgtCHdm RBw62S33WDdr3lWTbYqhOl8l8wNIgNvCdjE0IqEBRh0zIxTZAXq/yeLkfyw3JuQM28ZT /bryiONMTlbIg3bVOiADkZKOui36MTOW0RhWHKyhVUOkqe9tVMmPCzjHSyoYHnTn+WMX aUMw== MIME-Version: 1.0 X-Received: by 10.152.120.228 with SMTP id lf4mr160975lab.44.1382392226406; Mon, 21 Oct 2013 14:50:26 -0700 (PDT) Received: by 10.112.129.40 with HTTP; Mon, 21 Oct 2013 14:50:26 -0700 (PDT) In-Reply-To: References: Date: Mon, 21 Oct 2013 14:50:26 -0700 Message-ID: Subject: Re: coprocessor status query From: Ted Yu To: "user@hbase.apache.org" Content-Type: multipart/alternative; boundary=089e0117691598655b04e947453d X-Virus-Checked: Checked by ClamAV on apache.org --089e0117691598655b04e947453d Content-Type: text/plain; charset=ISO-8859-1 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. --089e0117691598655b04e947453d--