Hadoop Common
  1. Hadoop Common
  2. HADOOP-5009

DataNode#shutdown sometimes leaves data block scanner verification log unclosed

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.17.0
    • Fix Version/s: 0.19.1
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      When datanode gets shutdown by calling DataNode#shutdown, it occasionally leaves the data block scanner verification log unclosed. There are two possible causes:
      1. DataNode does not wait until block scanner thread to exit.
      2. DataBlockScanner does not guarantee that the verification log is closed if the scanner is interrupted.

      1. blockScannerFd1.patch
        2 kB
        Hairong Kuang
      2. blockScannerFd.patch
        2 kB
        Hairong Kuang

        Activity

        Hide
        Hairong Kuang added a comment -

        The attached patch attempts to fix the problem.

        Show
        Hairong Kuang added a comment - The attached patch attempts to fix the problem.
        Hide
        Tsz Wo Nicholas Sze added a comment -

        +1 Patch looks good. Two minor suggestions:

        • using blockScannerThread.join() may be dangerous if blockScannerThread does not terminate. How about replace join() with blockScannerThread.join(millis), so that it will time out?
        • I think it is better to use try-finally in closing the readers. See a comment in HADOOP-2926.
        Show
        Tsz Wo Nicholas Sze added a comment - +1 Patch looks good. Two minor suggestions: using blockScannerThread.join() may be dangerous if blockScannerThread does not terminate. How about replace join() with blockScannerThread.join(millis), so that it will time out? I think it is better to use try-finally in closing the readers. See a comment in HADOOP-2926 .
        Hide
        Hairong Kuang added a comment -

        This patch incorporates Nicholas' comment.

        Show
        Hairong Kuang added a comment - This patch incorporates Nicholas' comment.
        Hide
        Tsz Wo Nicholas Sze added a comment -

        +1 the new patch looks good.

        Show
        Tsz Wo Nicholas Sze added a comment - +1 the new patch looks good.
        Hide
        Hairong Kuang added a comment -

        [exec] -1 overall.
        [exec]
        [exec] +1 @author. The patch does not contain any @author tags.
        [exec]
        [exec] -1 tests included. The patch doesn't appear to include any new or modified tests.
        [exec] Please justify why no tests are needed for this patch.
        [exec]
        [exec] +1 javadoc. The javadoc tool did not generate any warning messages.
        [exec]
        [exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings.
        [exec]
        [exec] +1 findbugs. The patch does not introduce any new Findbugs warnings.
        [exec]
        [exec] +1 Eclipse classpath. The patch retains Eclipse classpath integrity.

        ant test-core fails only TestMapReduceLocal which is a known issue.

        Show
        Hairong Kuang added a comment - [exec] -1 overall. [exec] [exec] +1 @author. The patch does not contain any @author tags. [exec] [exec] -1 tests included. The patch doesn't appear to include any new or modified tests. [exec] Please justify why no tests are needed for this patch. [exec] [exec] +1 javadoc. The javadoc tool did not generate any warning messages. [exec] [exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings. [exec] [exec] +1 findbugs. The patch does not introduce any new Findbugs warnings. [exec] [exec] +1 Eclipse classpath. The patch retains Eclipse classpath integrity. ant test-core fails only TestMapReduceLocal which is a known issue.
        Hide
        Hairong Kuang added a comment -

        I've just resolved this.

        Show
        Hairong Kuang added a comment - I've just resolved this.

          People

          • Assignee:
            Hairong Kuang
            Reporter:
            Hairong Kuang
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development