hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean-Daniel Cryans (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HBASE-626) Use Visitor pattern in MetaRegion to reduce code clones in HTable and HConnectionManager
Date Wed, 14 May 2008 17:26:56 GMT

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

Jean-Daniel Cryans commented on HBASE-626:

Well in fact I checked this and this is already uses a form of visitor. The listener (usually
called observer) reacts to events, which is not the case in this piece of code. But this is
the good place I think to do the modification. What I plan is :

- Refactor the scanMetaRegion method so it uses RowResult.
- Modify the listener (renamed visitor) so it accepts a RowResult and a HRegionInfo.
- Add a method to scan all the meta regions which will take a visitor in argument and optionally
a row start key.
- Modify all impacted code.

Question : In the TODO it says that it has to "Allow multiple Visitors". Since the ScannerListener
already has to be implemented, I don't see the purpose of that comment. Am I missing something

> 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
> 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.

View raw message