hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Yu <yuzhih...@gmail.com>
Subject Re: coprocessor status query
Date Mon, 21 Oct 2013 23:02:05 GMT
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 <yuzhihong@gmail.com> 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 <wtan@us.ibm.com> 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.
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message