Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-13285

Fix flaky getRegions() in TestAccessController.setUp()

VotersStop watchingWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0.0, 1.1.0, 0.98.12, 2.0.0
    • 1.0.1, 1.1.0, 0.98.12, 2.0.0
    • test
    • None

    Description

      TestAccessController is waiting on table to be enabled and after that tries to lookup the region. but if the machine is slow, that region may not be assigned yet.

      TEST_UTIL.waitTableEnabled(TEST_TABLE.getTableName());
      HRegion region = TEST_UTIL.getHBaseCluster().getRegions(TEST_TABLE.getTableName()).get(0);
      
      java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
      	at java.util.ArrayList.rangeCheck(ArrayList.java:635)
      	at java.util.ArrayList.get(ArrayList.java:411)
      	at org.apache.hadoop.hbase.security.access.TestAccessController.setUp(TestAccessController.java:235)
      

      Attachments

        1. HBASE-13285-v0.patch
          3 kB
          Matteo Bertozzi

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            mbertozzi Matteo Bertozzi
            mbertozzi Matteo Bertozzi
            Votes:
            0 Vote for this issue
            Watchers:
            5 Stop watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment