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

Sleep in TestLazyPersistFiles should be put into a loop

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate 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

        Activity

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

          People

            adam.antal Adam Antal Assign to me
            adam.antal Adam Antal
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment