Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-15368

TestBalancerWithHANameNodes#testBalancerWithObserver failed occasionally

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.4.0, 3.3.6
    • 3.4.0, 3.3.6
    • balancer, test

    Description

      When I am working on HDFS-13183, I found that TestBalancerWithHANameNodes#testBalancerWithObserver failed occasionally, because the following code segment. Consider there are 1 ANN + 1 SBN + 2ONN, when invoke getBlocks with opening Observer Read feature, it could request any one of two ObserverNN based on my observation. So only verify the first ObserverNN and check times of invoke #getBlocks is not expected.

            for (int i = 0; i < cluster.getNumNameNodes(); i++) {
              // First observer node is at idx 2, or 3 if 2 has been shut down
              // It should get both getBlocks calls, all other NNs should see 0 calls
              int expectedObserverIdx = withObserverFailure ? 3 : 2;
              int expectedCount = (i == expectedObserverIdx) ? 2 : 0;
              verify(namesystemSpies.get(i), times(expectedCount))
                  .getBlocks(any(), anyLong(), anyLong());
            }
      

      cc Erik Krogen,Wei-Chiu Chuang. I am not very familiar for Observer Read feature, would you like give some suggestions?

      Attachments

        1. HDFS-15368.001.patch
          2 kB
          Xiaoqiao He
        2. HDFS-15368.002.patch
          0.9 kB
          Xiaoqiao He
        3. TestBalancerWithHANameNodes.testBalancerObserver.log
          748 kB
          Ayush Saxena
        4. TestBalancerWithHANameNodes.testBalancerObserver.log
          752 kB
          Xiaoqiao He

        Issue Links

        Activity

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

          People

            hexiaoqiao Xiaoqiao He
            hexiaoqiao Xiaoqiao He
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment