hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shashwat shriparv <dwivedishash...@gmail.com>
Subject Re: Problems Loading RegionObserver Coprocessor
Date Fri, 25 May 2012 14:00:48 GMT
Check this if it solves your problem :

http://helpmetocode.blogspot.in/2012/05/issueif-you-master-machines-region.html



On Fri, May 25, 2012 at 7:25 PM, Kevin <kevin.macksamie@gmail.com> wrote:

> Hi,
>
> I'm starting to give coprocessors a try, but I'm having trouble getting the
> HBase cluster to start up properly after deploying the new configuration.
> My coprocessor is trivial, but it is only to get my feet wet. I override
> the prePut method to add the row being put into a table into another table
> as well.
>
> public class MyCustomRegionObserver extends BaseRegionObserver {
>
>    public void prePut(final ObserverContext<RegionCoprocessorEnvironment>
> e,
>            final Put put, final WALEdit edit, boolean writeToWAL)
>            throws IOException {
>        HTableInterface hti =
> e.getEnvironment().getTable(Bytes.toBytes("accesses"));
>        try {
>            hti.put(new Put(put.getRow()).add(Bytes.toBytes("num"),
>                    Bytes.toBytes("value"), Bytes.toBytes(0)));
>        } finally {
>            hti.close();
>        }
>    }
>
> }
>
> I updated hbase-site.xml to reflect this coprocessor.
>
>  <property>
>    <name>hbase.coprocessor.region.classes</name>
>
> <value>com.hbase.example.region.coprocessors.MyCustomRegionObserver</value>
>  </property>
>
> I update all the machines with the new configuration and I added the
> coprocessor jar to /usr/lib/hbase/lib on each machine (I don't change the
> default HBase classpath in hbase-env.sh)
>
> When I restart my HBase cluster the cluster does not ever finish assigning
> META region. In the master's log there are a lot of
> NotServingRegionExceptions: Region is not online: .META.,,1. Other than
> that I can't see any log messages that indicate any specific about loading
> the coprocessor. If I then comment out the coprocessor property in
> hbase-site.xml and restart the cluster, then HBase starts up fine.
>
> I am new to coprocessors so any help is great.
>
> Thanks.
>



-- 


∞
Shashwat Shriparv

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message