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

Sleep in TestLazyPersistFiles should be put into a loop

    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 knanasi 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

          People

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

            Dates

              Created:
              Updated:
              Resolved: