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

Switch to Plain View
HBase >> mail # user >> How do I test SampleRegionWALObserver?


+
Michael Spiegle 2012-10-25, 11:56
Copy link to this message
-
RE: How do I test SampleRegionWALObserver?
The WALObserver should be configured under
Hbase.coprocessor.wal.classes.  I can see that you have done the config
under region.classes.

Change this and it should work :)

Regards
Ram

> -----Original Message-----
> From: Michael Spiegle [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 25, 2012 5:26 PM
> To: [EMAIL PROTECTED]
> Subject: How do I test SampleRegionWALObserver?
>
> 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</val
> ue>
> </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/apa
> che/hadoop/hbase/coprocessor/SampleRegionWALObserver.java
>
> Regards,
> Michael Spiegle