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

Dima Spivak commented on HBASE-12229:
-------------------------------------

So createTable() in HBaseTestingUtility already has the 
waitUntilAllRegionsAssigned. In this case, I just added the call to the wait 
because HBTU didn't have a createTable method that takes splitKeys, but I can 
add one of those instead of adding the call. More fundamentally, should we 
consider whether HBA#createTable itself should be synchronous up through the 
region assignments being made?

On a separate note, [~mbertozzi], is the 
SnapshotTestingUtils#waitForTableToBeOnline right to be doing nothing with the 
boolean returned by isTableAvailable? It looks like you might have created the 
method and I wasn't sure whether to touch it with this JIRA.

> NullPointerException in SnapshotTestingUtils
> --------------------------------------------
>
>                 Key: HBASE-12229
>                 URL: https://issues.apache.org/jira/browse/HBASE-12229
>             Project: HBase
>          Issue Type: Bug
>          Components: test
>    Affects Versions: 1.0.0, 2.0.0, 0.98.7
>            Reporter: Dima Spivak
>            Assignee: Dima Spivak
>            Priority: Minor
>         Attachments: HBASE-12229.patch, HBASE-12229_v1.patch
>
>
> I tracked down occasional flakiness in TestRestoreSnapshotFromClient to a 
> potential NPE in SnapshotTestingUtils#waitForTableToBeOnline. In short, some 
> tests in TestRestoreSnapshot... create a table and then invoke 
> SnapshotTestingUtils#waitForTableToBeOnline, but this method assumes that 
> regions have been assigned by the time it's invoked (which is not always the 
> case).



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

Reply via email to