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

        Hairong Kuang created issue -
        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.
        Hairong Kuang made changes -
        Field Original Value New Value
        Attachment blockScannerFd.patch [ 12397579 ]
        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.
        Hairong Kuang made changes -
        Attachment blockScannerFd1.patch [ 12398341 ]
        Hairong Kuang made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        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.
        Tsz Wo Nicholas Sze made changes -
        Hadoop Flags [Reviewed]
        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.
        Hairong Kuang made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Nigel Daley made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Owen O'Malley made changes -
        Component/s dfs [ 12310710 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Patch Available Patch Available
        11d 26m 1 Hairong Kuang 21/Jan/09 00:23
        Patch Available Patch Available Resolved Resolved
        21h 36m 1 Hairong Kuang 21/Jan/09 21:59
        Resolved Resolved Closed Closed
        34d 1h 37m 1 Nigel Daley 24/Feb/09 23:37

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development