Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-3505

DirectoryScanner does not join all threads in shutdown

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-alpha
    • Fix Version/s: 2.0.2-alpha
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      DirectoryScanner does not join all the threads it spawned during DirectoryScanner#shutdown.

      This can lead to rare failures in TestDirectoryScanner when some threads linger past their designated expiration date and cause interference between different test runs.

      The fix is to call ExecutorService#awaitTermination.

      1. HDFS-3505.001.patch
        1 kB
        Colin Patrick McCabe

        Activity

        Colin Patrick McCabe created issue -
        Colin Patrick McCabe made changes -
        Field Original Value New Value
        Affects Version/s 2.0.0-alpha [ 12320353 ]
        Target Version/s 2.0.0-alpha [ 12320353 ]
        Hide
        Colin Patrick McCabe added a comment -

        remember to call ExecutorService#awaitTermination (otherwise, the worker threads are told to stop, but not joined.)

        Show
        Colin Patrick McCabe added a comment - remember to call ExecutorService#awaitTermination (otherwise, the worker threads are told to stop, but not joined.)
        Colin Patrick McCabe made changes -
        Attachment HDFS-3505.001.patch [ 12530879 ]
        Colin Patrick McCabe made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12530879/HDFS-3505.001.patch
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 eclipse:eclipse. The patch built with eclipse:eclipse.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed unit tests in hadoop-hdfs-project/hadoop-hdfs.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/2601//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/2601//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12530879/HDFS-3505.001.patch against trunk revision . +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 javadoc. The javadoc tool did not generate any warning messages. +1 eclipse:eclipse. The patch built with eclipse:eclipse. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed unit tests in hadoop-hdfs-project/hadoop-hdfs. +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/2601//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/2601//console This message is automatically generated.
        Hide
        Eli Collins added a comment -

        +1 looks good

        Show
        Eli Collins added a comment - +1 looks good
        Hide
        Eli Collins added a comment -

        Forgot to mention the existing tests should be sufficient.

        I've committed this to trunk and merged to branch-2. Thanks Colin.

        Show
        Eli Collins added a comment - Forgot to mention the existing tests should be sufficient. I've committed this to trunk and merged to branch-2. Thanks Colin.
        Eli Collins made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags Reviewed [ 10343 ]
        Target Version/s 2.0.0-alpha [ 12320353 ]
        Fix Version/s 2.0.1-alpha [ 12321440 ]
        Resolution Fixed [ 1 ]
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk-Commit #2400 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2400/)
        HDFS-3505. DirectoryScanner does not join all threads in shutdown. Contributed by Colin Patrick McCabe (Revision 1347117)

        Result = SUCCESS
        eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1347117
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DirectoryScanner.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #2400 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2400/ ) HDFS-3505 . DirectoryScanner does not join all threads in shutdown. Contributed by Colin Patrick McCabe (Revision 1347117) Result = SUCCESS eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1347117 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DirectoryScanner.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk-Commit #2327 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/2327/)
        HDFS-3505. DirectoryScanner does not join all threads in shutdown. Contributed by Colin Patrick McCabe (Revision 1347117)

        Result = SUCCESS
        eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1347117
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DirectoryScanner.java
        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #2327 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/2327/ ) HDFS-3505 . DirectoryScanner does not join all threads in shutdown. Contributed by Colin Patrick McCabe (Revision 1347117) Result = SUCCESS eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1347117 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DirectoryScanner.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk-Commit #2346 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/2346/)
        HDFS-3505. DirectoryScanner does not join all threads in shutdown. Contributed by Colin Patrick McCabe (Revision 1347117)

        Result = SUCCESS
        eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1347117
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DirectoryScanner.java
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #2346 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/2346/ ) HDFS-3505 . DirectoryScanner does not join all threads in shutdown. Contributed by Colin Patrick McCabe (Revision 1347117) Result = SUCCESS eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1347117 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DirectoryScanner.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #1070 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1070/)
        HDFS-3505. DirectoryScanner does not join all threads in shutdown. Contributed by Colin Patrick McCabe (Revision 1347117)

        Result = FAILURE
        eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1347117
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DirectoryScanner.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #1070 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1070/ ) HDFS-3505 . DirectoryScanner does not join all threads in shutdown. Contributed by Colin Patrick McCabe (Revision 1347117) Result = FAILURE eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1347117 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DirectoryScanner.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk #1103 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1103/)
        HDFS-3505. DirectoryScanner does not join all threads in shutdown. Contributed by Colin Patrick McCabe (Revision 1347117)

        Result = FAILURE
        eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1347117
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DirectoryScanner.java
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #1103 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1103/ ) HDFS-3505 . DirectoryScanner does not join all threads in shutdown. Contributed by Colin Patrick McCabe (Revision 1347117) Result = FAILURE eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1347117 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DirectoryScanner.java
        Arun C Murthy made changes -
        Fix Version/s 2.0.2-alpha [ 12322472 ]
        Fix Version/s 2.1.0-alpha [ 12321440 ]
        Arun C Murthy made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Patch Available Patch Available
        23h 33m 1 Colin Patrick McCabe 05/Jun/12 23:52
        Patch Available Patch Available Resolved Resolved
        21h 9m 1 Eli Collins 06/Jun/12 21:02
        Resolved Resolved Closed Closed
        126d 20h 43m 1 Arun C Murthy 11/Oct/12 17:46

          People

          • Assignee:
            Colin Patrick McCabe
            Reporter:
            Colin Patrick McCabe
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development