Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase >> mail # user >> coprocessor status query


Copy link to this message
-
coprocessor status query
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.