hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 20seco...@web.de
Subject Re: Coprocessor not executing (current Snapshot)
Date Wed, 20 Apr 2011 18:30:56 GMT

Thanks a lot, case sensitivity was the issue...

Jörg
P.S. Should I open a Jira for that?


-----Urspr√ľngliche Nachricht-----
Von: "Gary Helmling" <ghelmling@gmail.com>
Gesendet: 20.04.2011 19:49:21
An: user@hbase.apache.org
Betreff: Re: Coprocessor not executing (current Snapshot)

Hi Joerg,

Try changing the table attribute name to "COPROCESSOR$1" -- it is currently
case sensitive (we should probably change that).

After doing that, look for lines like the following in the region server
log:

"Load coprocessor ... from HTD of <tablename> successfully."

or

"attribute '...' has invalid coprocessor spec"


--gh


On Wed, Apr 20, 2011 at 8:58 AM, Joerg Schad <20seconds@web.de> wrote:

> Hi,
> I would like to test the new Coprocessor feature and overwrite the prePut
> function of the the RegionOberserver.
> Unfortunately the function is never executed... I am using the current
> snapshot from the repository.
> Can anyone point me into the right direction? Or is there any way to check
> whether it loaded correctly?
>
> Thanks for any support
> Joerg
>
>
> //register the Coprocessor
> HTableDescriptor desc = new HTableDescriptor(tName);
> Path path = new Path("/Users/hbase/conf/CP.jar");
> desc.setValue("Coprocessor$1",
> path.toString() + ":" + "Coprocessor.PrePut" +
> ":" + Coprocessor.Priority.USER);
> admin.createTable(desc);
> //test the whether it works
>
>
>
>
> //actual class
> public class PrePut extends BaseRegionObserverCoprocessor {
> @Override
> public void prePut( final ObserverContext<RegionCoprocessorEnvironment>
> e, final Map<byte[],
> List<KeyValue>> familyMap, final boolean writeToWAL) throws
> IOException {
>
> //some more Code
>
> //bypass normal system call
> e.bypass();
>
> }
> }
>

Mime
View raw message