You should see the explaination on the HBase´s book
hbase.coprocessor.region.classes
A comma-separated list of Coprocessors that are loaded by default on all
tables. For any override coprocessor method, these classes will be
called in order. After implementing your own Coprocessor, just put it in
HBase's classpath and add the fully qualified class name here. A
coprocessor can also be loaded on demand by setting HTableDescriptor.
Default:
hbase.coprocessor.master.classes
A comma-separated list of
org.apache.hadoop.hbase.coprocessor.MasterObserver coprocessors that are
loaded by default on the active HMaster process. For any implemented
coprocessor methods, the listed classes will be called in order. After
implementing your own MasterObserver, just put it in HBase's classpath
and add the fully qualified class name here.
Default:
Like the first parameter say, you should use the
HTableDescriptor.setValue() method to load Coprocessors classes on demand:
Syntax: <path-to-jar>|<classname>|<priority>
Example of the Lars George's book:
'COPROCESSOR$1' => \
'hdfs://localhost:8020/users/leon/test.jar|coprocessor.Test|SYSTEM'
'COPROCESSOR$2' => \
'/Users/laura/test2.jar|coprocessor.AnotherTest|USER'
I hope that you solve.
Regards
On 06/07/2012 09:12 AM, Amit Sela wrote:
Hi all,
I can't seem to understand if there is a way to dynamically load
coprocessors ?
The best way I found so far is using the shell:
*alter 'URLS', METHOD => 'table_att',
'coprocessor'=>'|com.infolinks.hbase.coprocessors.HBaseTestRegionObserver||'
*
I leave the path empty because I put the jar in my file path and I don't
use priority or arguments.
After re-enabling I don't see the coprocessor in the webapp. I also tried
re-starting hbase which didn't help as well...
Is there a need to add to the configuration as well ? if so, does it mean
that re-starting HBase is mandatory when adding/removing coprocessors ?
Is there a dynamic load method ? without disable/enable to the table ?
Thanks.
10mo. ANIVERSARIO DE LA CREACION DE LA UNIVERSIDAD DE LAS CIENCIAS
INFORMATICAS...
CONECTADOS AL FUTURO, CONECTADOS A LA REVOLUCION
http://www.uci.cu
http://www.facebook.com/universidad.uci
http://www.flickr.com/photos/universidad_uci
--
Marcos Luis Ortíz Valmaseda
Data Engineer&& Sr. System Administrator at UCI
http://marcosluis2186.posterous.com
http://www.linkedin.com/in/marcosluis2186
Twitter: @marcosluis2186
10mo. ANIVERSARIO DE LA CREACION DE LA UNIVERSIDAD DE LAS CIENCIAS
INFORMATICAS...
CONECTADOS AL FUTURO, CONECTADOS A LA REVOLUCION
http://www.uci.cu
http://www.facebook.com/universidad.uci
http://www.flickr.com/photos/universidad_uci