I'm using CDH4, but I'd imagine that the steps would be similar for upstream 
HBase.  I've already got the tests JAR file loaded as part of my classpath.  I 
also have the following in my hbase-site.xml:
<property>
  <name>hbase.coprocessor.region.classes</name>
  <value>org.apache.hadoop.hbase.coprocessor.SampleRegionWALObserver</value>
</property>

When I start HBase, the following shows up in my logs:
# grep Sample /var/log/hbase/hbase-hbase-regionserver-hbase01.log 
2012-10-24 13:06:13,126 INFO 
org.apache.hadoop.hbase.coprocessor.CoprocessorHost: System coprocessor 
org.apache.hadoop.hbase.coprocessor.SampleRegionWALObserver was loaded 
successfully with priority (536870911).

However, when I 'PUT' new rows in my table, I see no log entries show up for 
SampleRegionWALObserver.  After looking at the SampleRegionWALObserver code, it 
seems that I need to call setTestValues() in order to get preWALWrite() to 
execute the rest of the code.  I think this is something that I might be able 
to accomplish via the 'hbase shell', but I can't figure out how. Can anyone 
help point me in the right direction?

For reference, this is the code I'm looking at:
http://svn.apache.org/repos/asf/hbase/tags/0.92.1/src/test/java/org/apache/hadoop/hbase/coprocessor/SampleRegionWALObserver.java

Regards,
Michael Spiegle

Reply via email to