Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
HBase >> mail # user >> Table coprocessor loaded twice when region is initialized?


+
Terry Siu 2011-06-30, 21:32
Copy link to this message
-
Re: Table coprocessor loaded twice when region is initialized?
Sounds like a bug. File a JIRA.

-Joey
On Jun 30, 2011 2:32 PM, "Terry Siu" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm debugging a prePut hook which I've implemented as part of the
coprocessor work being developed. This hook is loaded via a table
COPROCESSOR attribute and I've noticed that the prePut method is being
called twice for a single Put. After setting up the region server to run in
a debugger, I'm noticing the call to loadTableCoprocessors() being invoked
twice during region initialization, specifically:
>
>
> 1. HRegion.init => RegionCoprocessorHost.init =>
RegionCoprocessorHost.loadTableCoprocessors
>
> 2. ... => RegionCoprocessorHost.preOpen =>
RegionCoprocessorHost.loadTableCoprocessors
>
> This results in two RegionEnvironment instances, each containing a new
instance of my coprocessor, being added to the RegionCoprocessorHost. When I
issue a put, the list of RegionEnvironments is iterated over and each calls
the prePut method in my coprocessor. Reason why this is posing a problem for
me is that I modify the family map passed in to my prePut method. Since this
family map is the same instance used in both prePut calls, the second prePut
call operates on the modified family map, which leads to an unexpected
result.
>
> Is the double loading of the same coprocessor class intentional, is this a
bug? Or perhaps, I'm not using the coprocessors correctly? Help?
>
> Thanks,
> -Terry
+
Terry Siu 2011-06-30, 23:04
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB