[
https://issues.apache.org/jira/browse/HBASE-11462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14132867#comment-14132867
]
stack commented on HBASE-11462:
-------------------------------
High-level, your undoing zk from HTA seems good to me. Nice cleanup.
Since we have this change....
+ * Gets all of the regions of the specified table. Do not use this method
+ * to get meta table regions, use methods in MetaTableLocator instead.
...should the class MetaTableAccessor be renamed... TableRegionLocator?... We
have RegionLocator already now? It was just added. It is region scoped. We
also have RegionLocations. This class should use these items? This class is a
'tool'. Is it public?
It is ok that pair can be null in below?
+ List<Pair<HRegionInfo, ServerName>> pairs = null;
+ if (TableName.META_TABLE_NAME.equals(tableName)) {
+ pairs = new MetaTableLocator().getMetaRegionsAndLocations(zookeeper);
+ } else {
+ MetaTableAccessor.getTableRegionsAndLocations(connection, tableName);
+ }
I skimmed the rest of the patch. Is there a repeating if/else code that could
put some where and do once only?
> MetaTableAccessor shouldn't use ZooKeeeper
> ------------------------------------------
>
> Key: HBASE-11462
> URL: https://issues.apache.org/jira/browse/HBASE-11462
> Project: HBase
> Issue Type: Improvement
> Components: Client, Zookeeper
> Affects Versions: 2.0.0
> Reporter: Mikhail Antonov
> Assignee: Mikhail Antonov
> Fix For: 2.0.0
>
> Attachments: HBASE-11462.v1.patch
>
>
> After committing patch for HBASE-4495, there's an further improvement which
> can be made (discussed originally on review board to that jira).
> We have MetaTableAccessor and MetaTableLocator classes. First one is used to
> access information stored in hbase:meta table. Second one is used to deal
> with ZooKeeper state to find out region server hosting hbase:meta, wait for
> it to become available and so on.
> MetaTableAccessor, in turn, should only operate on the meta table content, so
> shouldn't need ZK. The only reason why MetaTableAccessor is using ZK - when
> callers request assignment information, they can request location of meta
> table itself, which we can't read from meta, so in that case
> MetaTableAccessor relays the call to MetaTableLocator. May be the solution
> here is to declare that clients of MetaTableAccessor shall not use it to work
> with meta table itself (not it's content).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)