You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by Stack <st...@duboce.net> on 2011/03/24 04:44:22 UTC

hbase-2001 added getZooKeeperWatcher and getCatalogTracker to RegionServerServices but these two methods are in Server

It looks like hbase-2001 added some overlap between the Server and
RegionServerServices Interfaces.  Here's the commit that added it:

commit c1dd72441d376e62615a0ec92f09515521ccb99b
Author: Andrew Kyle Purtell <ap...@apache.org>
Date:   Sat Nov 20 01:23:39 2010 +0000

    HBASE-2001 Coprocessors: Colocate user code with regions

    git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1037102
13f79535-47bb-0310-9956-ffa450edef68

Is the overlap really necessary?  At a minimum it looks untidy.
Beyond that, it makes mocking a little bit more painful.

What ye reckon?

St.Ack

Re: hbase-2001 added getZooKeeperWatcher and getCatalogTracker to RegionServerServices but these two methods are in Server

Posted by Gary Helmling <gh...@gmail.com>.
>
> Seems odd that a CP, a region-scoped thing, would want to make use of
> the catalogtracker and/or zk?
>
>
With AccessController we found a need to coordinate some state (ACL
permissions) across all region CP instances.  Seems pretty likely that other
implementors will run into a similar need.


I won't remove them, no worries.  Maybe the RSS should implement
> Server Interface then?  At least, we should fix the fact that Server
> does getZooKeeper to get ZooKeeperWatcher while RSS does
> getZooKeeperWatcher (the 'right' name for the method).


Having RSS extend Server would make sense, since Server provides access to
Configuration, CatalogTracker and ZooKeeperWatcher.  Though it looks like
RSS already extends OnlineRegions?  Anyway, seems like the 3 could stand to
be normalized a bit.

Re: hbase-2001 added getZooKeeperWatcher and getCatalogTracker to RegionServerServices but these two methods are in Server

Posted by Stack <st...@duboce.net>.
On Wed, Mar 23, 2011 at 9:26 PM, Gary Helmling <gh...@gmail.com> wrote:
> RegionServerServices is made available to RegionObserver coprocessors via
> RegionCoprocessorEnvironment.  The intent was to allow coprocessors to have
> limited access to the region server in context.  The same is true for
> MasterServices, which is made available to MasterObserver cps.
>

Seems odd that a CP, a region-scoped thing, would want to make use of
the catalogtracker and/or zk?

> The AccessController coprocessor makes use of both.  Do you think
> coprocessors should access ZK and the .META. table in a different way?
>  Let's discuss, otherwise, please do not remove them.
>

I won't remove them, no worries.  Maybe the RSS should implement
Server Interface then?  At least, we should fix the fact that Server
does getZooKeeper to get ZooKeeperWatcher while RSS does
getZooKeeperWatcher (the 'right' name for the method).

St.Ack

Re: hbase-2001 added getZooKeeperWatcher and getCatalogTracker to RegionServerServices but these two methods are in Server

Posted by Gary Helmling <gh...@gmail.com>.
RegionServerServices is made available to RegionObserver coprocessors via
RegionCoprocessorEnvironment.  The intent was to allow coprocessors to have
limited access to the region server in context.  The same is true for
MasterServices, which is made available to MasterObserver cps.

The AccessController coprocessor makes use of both.  Do you think
coprocessors should access ZK and the .META. table in a different way?
 Let's discuss, otherwise, please do not remove them.


On Wed, Mar 23, 2011 at 9:07 PM, Stack <st...@duboce.net> wrote:

> It doesn't look like these additions are actually used so I made
> https://issues.apache.org/jira/browse/HBASE-3698.  If I get a +1, I'll
> commit.
>
> Thanks,
> St.Ack
>
> On Wed, Mar 23, 2011 at 8:44 PM, Stack <st...@duboce.net> wrote:
> > It looks like hbase-2001 added some overlap between the Server and
> > RegionServerServices Interfaces.  Here's the commit that added it:
> >
> > commit c1dd72441d376e62615a0ec92f09515521ccb99b
> > Author: Andrew Kyle Purtell <ap...@apache.org>
> > Date:   Sat Nov 20 01:23:39 2010 +0000
> >
> >    HBASE-2001 Coprocessors: Colocate user code with regions
> >
> >    git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1037102
> > 13f79535-47bb-0310-9956-ffa450edef68
> >
> > Is the overlap really necessary?  At a minimum it looks untidy.
> > Beyond that, it makes mocking a little bit more painful.
> >
> > What ye reckon?
> >
> > St.Ack
> >
>

Re: hbase-2001 added getZooKeeperWatcher and getCatalogTracker to RegionServerServices but these two methods are in Server

Posted by Andrew Purtell <ap...@apache.org>.
-1 

We need these for the AccessController coprocessor to work.

May see more of this going forward.

If wrong place need for some other way for the coprocessor to get it from HRegion.

--- On Wed, 3/23/11, Stack <st...@duboce.net> wrote:

> From: Stack <st...@duboce.net>
> Subject: Re: hbase-2001 added getZooKeeperWatcher and getCatalogTracker to RegionServerServices but these two methods are in Server
> To: "HBase Dev List" <de...@hbase.apache.org>
> Date: Wednesday, March 23, 2011, 9:07 PM
> It doesn't look like these additions
> are actually used so I made
> https://issues.apache.org/jira/browse/HBASE-3698. 
> If I get a +1, I'll
> commit.
> 
> Thanks,
> St.Ack
> 
> On Wed, Mar 23, 2011 at 8:44 PM, Stack <st...@duboce.net>
> wrote:
> > It looks like hbase-2001 added some overlap between
> the Server and
> > RegionServerServices Interfaces.  Here's the commit
> that added it:
> >
> > commit c1dd72441d376e62615a0ec92f09515521ccb99b
> > Author: Andrew Kyle Purtell <ap...@apache.org>
> > Date:   Sat Nov 20 01:23:39 2010 +0000
> >
> >    HBASE-2001 Coprocessors: Colocate user code with
> regions
> >
> >    git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1037102
> > 13f79535-47bb-0310-9956-ffa450edef68
> >
> > Is the overlap really necessary?  At a minimum it
> looks untidy.
> > Beyond that, it makes mocking a little bit more
> painful.
> >
> > What ye reckon?
> >
> > St.Ack
> >
> 


      

Re: hbase-2001 added getZooKeeperWatcher and getCatalogTracker to RegionServerServices but these two methods are in Server

Posted by Stack <st...@duboce.net>.
It doesn't look like these additions are actually used so I made
https://issues.apache.org/jira/browse/HBASE-3698.  If I get a +1, I'll
commit.

Thanks,
St.Ack

On Wed, Mar 23, 2011 at 8:44 PM, Stack <st...@duboce.net> wrote:
> It looks like hbase-2001 added some overlap between the Server and
> RegionServerServices Interfaces.  Here's the commit that added it:
>
> commit c1dd72441d376e62615a0ec92f09515521ccb99b
> Author: Andrew Kyle Purtell <ap...@apache.org>
> Date:   Sat Nov 20 01:23:39 2010 +0000
>
>    HBASE-2001 Coprocessors: Colocate user code with regions
>
>    git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1037102
> 13f79535-47bb-0310-9956-ffa450edef68
>
> Is the overlap really necessary?  At a minimum it looks untidy.
> Beyond that, it makes mocking a little bit more painful.
>
> What ye reckon?
>
> St.Ack
>