[ 
https://issues.apache.org/jira/browse/HBASE-18298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16180150#comment-16180150
 ] 

Anoop Sam John commented on HBASE-18298:
----------------------------------------

Sorry [~Apache9]..  The RB is not having latest patch.  All ur concerns are 
addressed in the latest patch attached here.. Let me upload the latest to the 
RB also this time. Really sorry for missing that.
bq.The below cast is hackery for now because this class is deprecated and going 
away 
Ya this is going away and the type casting is fine IMO
{quote}
he below creates a new zk instance?
176     ZooKeeper zk = new ZooKeeper(ensemble, sessionTimeout, null);
177     re.getSharedData().putIfAbsent(zkkey, new ZKWatcher(zk));
It gets closed? You think we don't have to reuse because this an example?
{quote}
I think missed adding the close.. Let me address..  Ya it is just an eg: that 
we show..  If the CP user has to use the zk for some reason, we should not 
expose our zk instance objects to them..  The ZooKeeperWatcher will have 
methods even close() in it..  Any mistake in using this will result in our RS 
process of no use.  So if they want, let them have own ways of reading what is 
the quorum and ports to use and start own zk client.
bq.nit: s/getFromOnlineRegions/getOnlineRegion/ singular.
These all existing methods. Just moved to new interface.  All in OnlineRegions 
having this 's' at end. 
Region getFromOnlineRegions(String encodedRegionName); - Means get a region 
from all online regions
bq.And later, should we allow getting reference to zk? Though AccessController 
should be coming internal so wouldn't worry about it....
As said above, we should not expose our zk client at RS to the CP users.  Our 
AC and VC needs zk and there is no other way but to do this type casting..  
This also suggest that we should be having our AC and VC as core impl not as CP 
impl :-)

> RegionServerServices Interface cleanup for CP expose
> ----------------------------------------------------
>
>                 Key: HBASE-18298
>                 URL: https://issues.apache.org/jira/browse/HBASE-18298
>             Project: HBase
>          Issue Type: Sub-task
>          Components: Coprocessors
>            Reporter: Anoop Sam John
>            Assignee: Anoop Sam John
>            Priority: Critical
>             Fix For: 2.0.0-alpha-4
>
>         Attachments: HBASE-18298.patch, HBASE-18298_V2.patch, 
> HBASE-18298_V3.patch, HBASE-18298_V4.patch, HBASE-18298_V5.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to