You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Ming Ma (Created) (JIRA)" <ji...@apache.org> on 2011/12/30 08:21:30 UTC

[jira] [Created] (HBASE-5109) Fix TestAvroServer so that it waits properly for the modifyTable operation to complete

Fix TestAvroServer so that it waits properly for the modifyTable operation to complete
--------------------------------------------------------------------------------------

                 Key: HBASE-5109
                 URL: https://issues.apache.org/jira/browse/HBASE-5109
             Project: HBase
          Issue Type: Bug
          Components: test
            Reporter: Ming Ma
            Assignee: Ming Ma


TestAvroServer has the following issue
 
    impl.modifyTable(tableAname, tableA);
    // It can take a while for the change to take effect. Wait here a while.
    while(impl.describeTable(tableAname) == null ) {
      Threads.sleep(100);
    }
    assertTrue(impl.describeTable(tableAname).maxFileSize == 123456L);
 
impl.describeTable(tableAname) returns the default maxSize 256M right away as modifyTable is async. Before HBASE-4328 is fixed, we can fix the test code to wait for say max of 5 seconds to check if impl.describeTable(tableAname).maxFileSize is uploaded to 123456L. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-5109) Fix TestAvroServer so that it waits properly for the modifyTable operation to complete

Posted by "Ming Ma (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-5109?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ming Ma updated HBASE-5109:
---------------------------

    Attachment: HBASE-5109-0.92.patch

Here is the fix.
                
> Fix TestAvroServer so that it waits properly for the modifyTable operation to complete
> --------------------------------------------------------------------------------------
>
>                 Key: HBASE-5109
>                 URL: https://issues.apache.org/jira/browse/HBASE-5109
>             Project: HBase
>          Issue Type: Bug
>          Components: test
>            Reporter: Ming Ma
>            Assignee: Ming Ma
>         Attachments: HBASE-5109-0.92.patch
>
>
> TestAvroServer has the following issue
>  
>     impl.modifyTable(tableAname, tableA);
>     // It can take a while for the change to take effect. Wait here a while.
>     while(impl.describeTable(tableAname) == null ) {
>       Threads.sleep(100);
>     }
>     assertTrue(impl.describeTable(tableAname).maxFileSize == 123456L);
>  
> impl.describeTable(tableAname) returns the default maxSize 256M right away as modifyTable is async. Before HBASE-4328 is fixed, we can fix the test code to wait for say max of 5 seconds to check if impl.describeTable(tableAname).maxFileSize is uploaded to 123456L. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-5109) Fix TestAvroServer so that it waits properly for the modifyTable operation to complete

Posted by "Zhihong Yu (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13177695#comment-13177695 ] 

Zhihong Yu commented on HBASE-5109:
-----------------------------------

@Ming:
A loop was introduced by the following checkin:

r1186531 | stack | 2011-10-19 15:05:37 -0700 (Wed, 19 Oct 2011) | 1 line

HBASE-4621 TestAvroServer fails quite often intermittently

Is your patch still needed ?
TestAvroServer hasn't failed for quite a while.
                
> Fix TestAvroServer so that it waits properly for the modifyTable operation to complete
> --------------------------------------------------------------------------------------
>
>                 Key: HBASE-5109
>                 URL: https://issues.apache.org/jira/browse/HBASE-5109
>             Project: HBase
>          Issue Type: Bug
>          Components: test
>            Reporter: Ming Ma
>            Assignee: Ming Ma
>         Attachments: HBASE-5109-0.92.patch
>
>
> TestAvroServer has the following issue
>  
>     impl.modifyTable(tableAname, tableA);
>     // It can take a while for the change to take effect. Wait here a while.
>     while(impl.describeTable(tableAname) == null ) {
>       Threads.sleep(100);
>     }
>     assertTrue(impl.describeTable(tableAname).maxFileSize == 123456L);
>  
> impl.describeTable(tableAname) returns the default maxSize 256M right away as modifyTable is async. Before HBASE-4328 is fixed, we can fix the test code to wait for say max of 5 seconds to check if impl.describeTable(tableAname).maxFileSize is uploaded to 123456L. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-5109) Fix TestAvroServer so that it waits properly for the modifyTable operation to complete

Posted by "stack (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13179805#comment-13179805 ] 

stack commented on HBASE-5109:
------------------------------

+1 on committing the patch.  Its some nice, if small, cleanup.
                
> Fix TestAvroServer so that it waits properly for the modifyTable operation to complete
> --------------------------------------------------------------------------------------
>
>                 Key: HBASE-5109
>                 URL: https://issues.apache.org/jira/browse/HBASE-5109
>             Project: HBase
>          Issue Type: Bug
>          Components: test
>            Reporter: Ming Ma
>            Assignee: Ming Ma
>         Attachments: HBASE-5109-0.92.patch
>
>
> TestAvroServer has the following issue
>  
>     impl.modifyTable(tableAname, tableA);
>     // It can take a while for the change to take effect. Wait here a while.
>     while(impl.describeTable(tableAname) == null ) {
>       Threads.sleep(100);
>     }
>     assertTrue(impl.describeTable(tableAname).maxFileSize == 123456L);
>  
> impl.describeTable(tableAname) returns the default maxSize 256M right away as modifyTable is async. Before HBASE-4328 is fixed, we can fix the test code to wait for say max of 5 seconds to check if impl.describeTable(tableAname).maxFileSize is uploaded to 123456L. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-5109) Fix TestAvroServer so that it waits properly for the modifyTable operation to complete

Posted by "Ming Ma (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13179794#comment-13179794 ] 

Ming Ma commented on HBASE-5109:
--------------------------------

Thanks, Ted. Then, it is mostly taken cared of. Just want to point out two small issues in the fix for HBase-4621:

1. The loop won't stop if there is a bug in modifyTable call. In that case, the unit test will just hang instead of fail. Adding a timeout might be helpful.
2. The two asserts statement after the while statement are redundant. So we can take one out.
                
> Fix TestAvroServer so that it waits properly for the modifyTable operation to complete
> --------------------------------------------------------------------------------------
>
>                 Key: HBASE-5109
>                 URL: https://issues.apache.org/jira/browse/HBASE-5109
>             Project: HBase
>          Issue Type: Bug
>          Components: test
>            Reporter: Ming Ma
>            Assignee: Ming Ma
>         Attachments: HBASE-5109-0.92.patch
>
>
> TestAvroServer has the following issue
>  
>     impl.modifyTable(tableAname, tableA);
>     // It can take a while for the change to take effect. Wait here a while.
>     while(impl.describeTable(tableAname) == null ) {
>       Threads.sleep(100);
>     }
>     assertTrue(impl.describeTable(tableAname).maxFileSize == 123456L);
>  
> impl.describeTable(tableAname) returns the default maxSize 256M right away as modifyTable is async. Before HBASE-4328 is fixed, we can fix the test code to wait for say max of 5 seconds to check if impl.describeTable(tableAname).maxFileSize is uploaded to 123456L. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira