Hi Gary,
Thanks for your help.
Using HBaseTestingUtility, then calling:
conf.set(CoprocessorHost.REGION_COPROCESSOR_CONF_KEY,
LuceneCoprocessor.class.getName());
Which is following the code in TestRegionObserverInterface.
Then:
HTable table = util.createTable(tableName, families);
for (int x=0; x < 20; x++) {
byte[] row = Bytes.toBytes(x);
Put put = new Put(row);
String s = "test hbase lucene";
put.add(headersFam, to, Bytes.toBytes(s));
table.put(put);
}
> How are you loading your coprocessor? Are you setting a HTableDescriptor
> value to load the cp on a specific table, or using the
> "hbase.coprocessor.region.classes" system-wide config?
Maybe I need to set the Coprocessor on the table then.
Jason
On Mon, Mar 14, 2011 at 1:58 PM, Gary Helmling <[email protected]> wrote:
> Hi Jason,
>
> How are you loading your coprocessor? Are you setting a HTableDescriptor
> value to load the cp on a specific table, or using the
> "hbase.coprocessor.region.classes" system-wide config?
>
> If the latter, I'm wondering if you're seeing puts to the .META. table. Have
> you checked the table name with
> RegionCoprocessorEnvironment.getRegion().getRegionInfo().getTableDesc().getName()?
>
>
>> Info seems to be a family that's given to the Coprocessor, at least
>> when the test case uses HBaseTestingUtility.
>>
>>
> Your cp should just be getting the contents of Put.getFamilyMap(). Can you
> share more info about your table schema, operations you're performing and
> testing, or even sample code?
>
> Thanks,
> Gary
>