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

Ted Yu commented on HBASE-13004:
--------------------------------

lgtm
minor comments:
{code}
109          * @return the boolean result of the evaluation.
110          */
111         String explainFailure() throws E;
{code}
Please update @return description.
{code}
2928        List<Pair<HRegionInfo, ServerName>> metaLocations =
2929            MetaTableAccessor.getTableRegionsAndLocations(connection, 
tableName);
2930        if (getHBaseCluster().getMaster().isAlive()) {
{code}
metaLocations can be assigned inside the if block where it is used.

> Make possible to explain why HTU.waitFor fails
> ----------------------------------------------
>
>                 Key: HBASE-13004
>                 URL: https://issues.apache.org/jira/browse/HBASE-13004
>             Project: HBase
>          Issue Type: Bug
>          Components: test
>    Affects Versions: 2.0.0
>            Reporter: Andrey Stepachev
>            Assignee: Andrey Stepachev
>            Priority: Minor
>         Attachments: HBASE-13004.patch
>
>
> HBaseTestingUtility has good methods for waiting conditions, but with one 
> drawback, when waitfor fails, there is no way to explain what happened 
> (fail() called from internals and that is not very easy to intercept and 
> explain state of failure).
> That would be great to have enhanced Predicate which can explain state after 
> it failed to wait for.
> That can looks like
> {code}
> HUT.waitFor(10000, new ExplainingPredicate() {
>    boolean evaluate() {
>      ... some evaluation code
>    }
>    String explain() {
>     ... generate brief explanation of what to be expected, but not happened
>    }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to