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

Sleep in TestLazyPersistFiles should be put into a loop

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

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • None
    • 3.0.4, 3.1.2, 3.3.0, 3.2.1
    • hdfs
    • Reviewed

    Description

      TestLazyPersistFiles#testFileShouldNotDiscardedIfNNRestarted test should be improved.

      The test sleeps for 6000 at once, it could at least sleep in a loop checking for the corrupt block to be reported.

          cluster.shutdownDataNodes();
      
          cluster.restartNameNodes();
      
          // wait for the redundancy monitor to mark the file as corrupt.
          Thread.sleep(2 * DFS_NAMENODE_REDUNDANCY_INTERVAL_SECONDS_DEFAULT * 1000);
      
          Long corruptBlkCount = (long) Iterators.size(cluster.getNameNode()
              .getNamesystem().getBlockManager().getCorruptReplicaBlockIterator());
      

      Thanks Kitti Nanasi for the suggestion.

      Attachments

        1. HDFS-14029.branch-2.001.patch
          2 kB
          Adam Antal
        2. HDFS-14029.001.patch
          2 kB
          Adam Antal

        Activity

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

          People

            adam.antal Adam Antal
            adam.antal Adam Antal
            Votes:
            0 Vote for this issue
            Watchers:
            4 Stop watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment