[
https://issues.apache.org/jira/browse/HBASE-8896?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
stack updated HBASE-8896:
-------------------------
Attachment: 8896.txt
Rename RetryCounter as RetryAccountant. Add an Interface of this name. The
interface is more bare than original RetryCounter; removed methods that expose
implementation and that are redundant. Move original implementation to
BasicRetryAccontant. Add new implemenation that
makes use of the RETRY_BACKOFF over in HConstants and that has a maximum amount
of time to try. Add tests.
M
hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java
Add the retrycounterfactory in here rather than have as standalone class. The
standalone class is not a true factory and would be hard to adapt given we
want
retriers to take different args. Use BasicRetryAccountant instead of
RetryCounter.
Remove calls to up counter since done when we call sleep.
A
hbase-common/src/main/java/org/apache/hadoop/hbase/util/BasicRetryAccountant.java
This does what RetryCounter used to caveat it now implements RetryAccountant
interface.
A
hbase-common/src/main/java/org/apache/hadoop/hbase/util/MaxTimeRetryAccountant.java
Implemenation that uses our RETRY_BACKOFF and has maximum bounding time.
A hbase-common/src/main/java/org/apache/hadoop/hbase/util/RetryAccountant.java
Interface
D hbase-common/src/main/java/org/apache/hadoop/hbase/util/RetryCounter.java
Removed
D
hbase-common/src/main/java/org/apache/hadoop/hbase/util/RetryCounterFactory.java
Moved into RecoverableZooKeeper, the only class that needs it.
A
hbase-common/src/test/java/org/apache/hadoop/hbase/util/TestMaxTimeRetryAccountant.java
Tests
> Refactor RetryCounter so it is generally useful
> -----------------------------------------------
>
> Key: HBASE-8896
> URL: https://issues.apache.org/jira/browse/HBASE-8896
> Project: HBase
> Issue Type: Improvement
> Reporter: stack
> Assignee: stack
> Fix For: 0.95.2
>
> Attachments: 8896.txt
>
>
> RetryCounter is a useful looking endeavor that is half done. Notion is a
> class to manage retry and the sleep between retries. We retry everywhere so
> this could save code. There is a half-done factory too that is used
> currently just by RecoverableZooKeeper. The factory only produces one
> RetryCounter type. It's purpose seems to be just save on having to have
> configs available everywhere we want to do retrying.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira