hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vidhyashankar Venkataraman (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-3904) HConnection.isTableAvailable returns true even with not all regions available.
Date Fri, 20 May 2011 23:47:47 GMT

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

Vidhyashankar Venkataraman commented on HBASE-3904:
---------------------------------------------------

Ok, I tested your patch with the code attached below:

And I get the following output:
Caught Socket timeout.. Mostly caused by a slow region assignment by master!
11/05/20 23:26:00 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=b3110640.yst.yahoo.net:44481,b3110600.yst.yahoo.net:44481,b3110560.yst.yahoo.net:44481,b3110520.yst.yahoo.net:44481,b3110680.yst.yahoo.net:44481
sessionTimeout=180000 watcher=hconnection
11/05/20 23:26:00 INFO zookeeper.ClientCnxn: Opening socket connection to server b3110560.yst.yahoo.net/67.195.55.234:44481
11/05/20 23:26:00 INFO zookeeper.ClientCnxn: Socket connection established to b3110560.yst.yahoo.net/67.195.55.234:44481,
initiating session
11/05/20 23:26:00 INFO zookeeper.ClientCnxn: Session establishment complete on server b3110560.yst.yahoo.net/67.195.55.234:44481,
sessionid = 0x12ff6d3911179e8, negotiated timeout = 180000
Table test-v6 not yet available... Sleeping for 5 more minutes... Expected #regions = 17933
Table is probably available!! : test-v6 Available? true
Table test-v6 may not be available... Double checking: Sleeping for 5 minutes more...
Table test-v6: Expected # Regions = 17933 Actual number = 4744
Table test-v6 may not be available... Double checking: Sleeping for 5 minutes more...

And it is still trying to assign.


 1.  The good: Notice that tableAvailable got out of the loop because it was true and it also
printed true in the following print message. This has never happened without the patch.
 2.  The doubtful part:  isTableAvailable still doesn't return back when all regions are online
as we see in the subsequent output.

Can you let me know what your patch intended to do?

Thank you
Vidhya

THE CODE:


   try {
      hbAdmin.createTableAsync(htd, keysArray.toArray(new byte[0][0]));
    } catch (java.net.SocketTimeoutException e) {
      System.err.println("Caught Socket timeout.. " +
                            "Mostly caused by a slow region assignment by master!");
    }

    HTable table = new HTable(tableName);
    HConnection conn = table.getConnection();
    do {
      System.out.println("Table " + tableName + "not yet available... " +
                            "Sleeping for 5 more minutes... Expected #regions = " +
                            (keysArray.size()+1));
      Thread.sleep(300000);
    } while (!conn.isTableAvailable(table.getTableName()));

    System.err.println("Table is probably available!! : " +
                            tableName +
                            " Available? " +
                            conn.isTableAvailable(table.getTableName()));

    Map<HRegionInfo, HServerAddress> regionList = null;
    do {
      System.out.println("Table " + tableName + "may not be available... " +
                            "Double checking: Sleeping for 5 minutes more...");
      Thread.sleep(300000);
      regionList = table.getRegionsInfo();
      System.out.println("Table " + tableName + ": Expected # Regions = " +
                            (keysArray.size()+1) +
                            " Actual number = " +
                            ((regionList!=null)?regionList.size():0) );
    } while ((regionList==null) ||
                (regionList.size()!=(keysArray.size()+1)));



On 5/20/11 4:19 PM, "Ted Yu (JIRA)" <jira@apache.org> wrote:



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

Ted Yu commented on HBASE-3904:
-------------------------------

I have run tests related to table creation and availability checking.
Namely this code in LoadIncrementalHFiles:
{code}
    while (!conn.isTableAvailable(table.getTableName()) && (ctr<TABLE_CREATE_MAX_RETRIES))
{
{code}
TestHFileOutputFormat, TestLoadIncrementalHFiles and TestAdmin.

Please outline what more test(s) should be devised.


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



> HConnection.isTableAvailable returns true even with not all regions available.
> ------------------------------------------------------------------------------
>
>                 Key: HBASE-3904
>                 URL: https://issues.apache.org/jira/browse/HBASE-3904
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>            Reporter: Vidhyashankar Venkataraman
>            Priority: Minor
>         Attachments: 3904.txt
>
>
> This function as per the java doc is supposed to return true iff "all the regions in
the table are available". But if the table is still being created this function may return
inconsistent results (For example, when a table with a large number of split keys is created).


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message