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

Switch to Plain View
HBase >> mail # user >> How to get coprocessor list by client API


+
Kyle Lin 2013-01-23, 08:18
+
jack 2013-01-24, 01:44
+
Kyle Lin 2013-01-24, 03:53
+
Jean-Marc Spaggiari 2013-01-24, 12:12
+
Kyle Lin 2013-01-28, 09:05
+
Jean-Marc Spaggiari 2013-01-28, 12:32
+
Kyle Lin 2013-01-29, 06:39
+
Jean-Marc Spaggiari 2013-01-29, 20:25
Copy link to this message
-
Re: How to get coprocessor list by client API
Hi Kyle,

You might want to take a look at HTable.getTableDescriptor().getValues().

In the HTableDescriptor class, you have hasCoprocessor(className).
This method is looping over the values and is comparing the entries
with the CP_HTD_ATTR_KEY_PATTERN constant to figure if it's a
coprocessor or not. Simply do something similar in your code and you
might be able to get the list of coprocessors.

Also, I think this method should already be there in the
HTableInterface... Can you please open a JIRA and request for it?

Thanks,

JM

2013/1/23, Kyle Lin <[EMAIL PROTECTED]>:
> Hi, Everyone
>
>     I need to know What coprocessors registered in a HTable. But, in Class
> HTableDescriptor, I can only find
> *addCoprocessor<http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/HTableDescriptor.html#addCoprocessor(java.lang.String)>
> *,
> *hasCoprocessor<http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/HTableDescriptor.html#hasCoprocessor(java.lang.String)>
> * ..etc. How can I use Client API to get the coprocessor information just
> like Typing "describe table_name" in HBase Shell as follows?
>
>
> hbase(main):002:0> describe 'table21'
> DESCRIPTION
>                   ENABLED
>  {NAME => 'table21', *coprocessor$1 =>
> 'hdfs://host3:9000/sumCoprocessor.jar|idv.jack.endpoint true
>                                *
> * .SumDataEndpoint||'*, FAMILIES => [{NAME => 'cf', DATA_BLOCK_ENCODING =>
> 'NONE', BLOOMFILTER
>  => 'NONE', REPLICATION_SCOPE => '0', VERSIONS => '3', COMPRESSION =>
> 'NONE', MIN_VERSIONS =>
>   '0', TTL => '2147483647', KEEP_DELETED_CELLS => 'false', BLOCKSIZE =>
> '65536', IN_MEMORY =>
>   'false', ENCODE_ON_DISK => 'true', BLOCKCACHE => 'true'}]}
>
> 1 row(s) in 0.0210 seconds
>
> Kyle
>