[
https://issues.apache.org/jira/browse/HBASE-626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12597252#action_12597252
]
stack commented on HBASE-626:
-----------------------------
On src/java/org/apache/hadoop/hbase/client/MetaScanner.java
+ The class comment could be clearer. Be explicit it scans the .META. table
only (in hbase-speak, up to this, both -ROOT- and .META., are 'meta' tables).
+ FYI, in hadoop, lines are <= 80 characters
+ Why pass in scannerRow and startRow? When would they ever differ? Should
the opening of the scanner be done with startRow rather than scannerRow since
startRow is being updated as we move over regions?
On src/java/org/apache/hadoop/hbase/client/HConnectionManager.java
+ No biggie, but do you think the MetaScanner should return something richer
than RowResult? Nearly every Visitor will be doing what your Visitor in this
class is doing constructing an HRegionInfo, checking its null. Should the
MetaScanner parse and check for null HRegionInfos returning this plus server
and startcodes?
This is patch for all the duplicated code it removes.
> Use Visitor pattern in MetaRegion to reduce code clones in HTable and
> HConnectionManager
> ----------------------------------------------------------------------------------------
>
> Key: HBASE-626
> URL: https://issues.apache.org/jira/browse/HBASE-626
> Project: Hadoop HBase
> Issue Type: Improvement
> Components: master
> Reporter: Jean-Daniel Cryans
> Priority: Minor
> Fix For: 0.2.0
>
> Attachments: hbase-626-v1.patch
>
>
> HTable and HConnectionManager.TableServers both scan the meta region in the
> same way (but the later also retry one time if it fails). A Visitor pattern
> should be used in a new scanning method in MetaRegion to accept visitors that
> gather information such as region names for a table or the list of all tables.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.