hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Teng <tenglinx...@outlook.com>
Subject is there a way to verify whether deployed coprocessor is loaded.
Date Thu, 16 Jul 2015 13:18:34 GMT
hi all,Today when i tried to use hbase coprocessor, i encountered some issues there, and below
is detailed problem:i have defined one pretty simple region observer:public class ClientGetRegionObserver
extends BaseRegionObserver {
    public void preGet(ObserverContext<RegionCoprocessorEnvironment> e, Get get, List<KeyValue>
results) throws IOException {
        if (Bytes.equals(get.getRow(), Bytes.toBytes(0))) {
            KeyValue kv = new KeyValue(Bytes.toBytes(0), Bytes.toBytes("d"), Bytes.toBytes("test"),
Bytes.toBytes("xxx"));
            results.add(kv);
            e.bypass();
        }
    }
}and here is the config in hbase-site.xml <property>                <name>hbase.coprocessor.region.classes</name>
               <value>com.dianping.hbase.ClientGetRegionObserver</value>     
  </property>
if the coprocessor works as expected, then i should get a column with value 'xxx' when i issues
a get request with row key 0. but it doesn't.could anyone give me some tips on this?
thanks!
james. 		 	   		  
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message