You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by Mike Lewis <mi...@gmail.com> on 2013/01/27 20:15:05 UTC

Catalog Tables for Coprocessors

Hi,

I am attempting to prototype some schema management functionality with
coprocessors.  One thing I would like to do is persist the schema.

I'm assuming I'll probably want to create a catalog table for it.  Is this
correct?  Is there a specific way I should initialize this table?

I'm also assuming if I want to notify RegionObservers of change to this
catalog, I probably want to use ZK.

Thanks,
Mike

--
Michael Lewis
lolrus.org
mikelikespie@gmail.com

Re: Catalog Tables for Coprocessors

Posted by ramkrishna vasudevan <ra...@gmail.com>.
Inline

On Mon, Jan 28, 2013 at 12:45 AM, Mike Lewis <mi...@gmail.com> wrote:

> Hi,
>
> I am attempting to prototype some schema management functionality with
> coprocessors.  One thing I would like to do is persist the schema.
>
> I'm assuming I'll probably want to create a catalog table for it.  Is this
> correct?  Is there a specific way I should initialize this table?
>
> I'm also assuming if I want to notify RegionObservers of change to this
> catalog, I probably want to use ZK.
>
 RegionObservers are configured as part of RegionServers.  There are no of
hooks provided in the RegionObservers each one called before pre/post of a
particular operation.  So no ZK needs to be used.
Suppose if you are planning to create a new catalog table for your schema
management and you have some writes or reads to be done on this table, then
you have the hooks which automatically gets called during the flow of
read/write respecitively.  Just ensure that you have a Region Observer
configured and ensure that the hook works only for the new catalog table if
that is what you want.

If am wrong in understanding what you meant kindly revert back.

>
> Thanks,
> Mike
>
> --
> Michael Lewis
> lolrus.org
> mikelikespie@gmail.com
>

Re: Catalog Tables for Coprocessors

Posted by Andrew Purtell <ap...@apache.org>.
The AccessController could be an example of what you are looking to
accomplish. It introduces a new system table ("_acl_") and uses a
RegionObserver on the system table regions and ZK watches to notify all
RegionServers of changes to the table. Look in this package:


http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/



On Sun, Jan 27, 2013 at 11:15 AM, Mike Lewis <mi...@gmail.com> wrote:

> Hi,
>
> I am attempting to prototype some schema management functionality with
> coprocessors.  One thing I would like to do is persist the schema.
>
> I'm assuming I'll probably want to create a catalog table for it.  Is this
> correct?  Is there a specific way I should initialize this table?
>
> I'm also assuming if I want to notify RegionObservers of change to this
> catalog, I probably want to use ZK.
>
> Thanks,
> Mike
>
> --
> Michael Lewis
> lolrus.org
> mikelikespie@gmail.com
>



-- 
Best regards,

   - Andy

Problems worthy of attack prove their worth by hitting back. - Piet Hein
(via Tom White)