Hadoop Common
  1. Hadoop Common
  2. HADOOP-5483

Directory/file cleanup thread throws IllegalStateException

    Details

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

      Description

      TestMiniMRWithDFS prints the following error message on screen:
      [junit] Exception in thread "Directory/File cleanup thread" java.lang.IllegalStateException: Shutdown in progress
      [junit] at java.lang.ApplicationShutdownHooks.add(ApplicationShutdownHooks.java:39)
      [junit] at java.lang.Runtime.addShutdownHook(Runtime.java:192)
      [junit] at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:1361)
      [junit] at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:185)
      [junit] at org.apache.hadoop.fs.Path.getFileSystem(Path.java:175)
      [junit] at org.apache.hadoop.mapred.CleanupQueue$PathCleanupThread.run(CleanupQueue.java

      1. 5483.1.patch
        0.7 kB
        Devaraj Das

        Issue Links

          Activity

          Hide
          Tsz Wo Nicholas Sze added a comment -

          The error message is caused by CleanupQueue.PathCleanupThread:

              public void run() {
                LOG.debug(getName() + " started.");
                PathAndConf pathAndConf = null;
                while (true) {
                  try {
                    pathAndConf = queue.take();
                    // delete the path.
                    FileSystem fs = pathAndConf.path.getFileSystem(pathAndConf.conf);
                    fs.delete(pathAndConf.path, true);
                    LOG.debug("DELETED " + pathAndConf.path);
                  } catch (IOException e) {
                    LOG.warn("Error deleting path" + pathAndConf.path);
                  } catch (InterruptedException t) {
                  }
                }
              }
          

          The infinite loop above does not care the status of the system. It keeps running even if the system is being shutdown.

          Show
          Tsz Wo Nicholas Sze added a comment - The error message is caused by CleanupQueue.PathCleanupThread: public void run() { LOG.debug(getName() + " started." ); PathAndConf pathAndConf = null ; while ( true ) { try { pathAndConf = queue.take(); // delete the path. FileSystem fs = pathAndConf.path.getFileSystem(pathAndConf.conf); fs.delete(pathAndConf.path, true ); LOG.debug( "DELETED " + pathAndConf.path); } catch (IOException e) { LOG.warn( "Error deleting path" + pathAndConf.path); } catch (InterruptedException t) { } } } The infinite loop above does not care the status of the system. It keeps running even if the system is being shutdown.
          Hide
          Tsz Wo Nicholas Sze added a comment -

          HADOOP-5285 was committed to 0.19. Not sure whether this should be a blocker.

          Show
          Tsz Wo Nicholas Sze added a comment - HADOOP-5285 was committed to 0.19. Not sure whether this should be a blocker.
          Hide
          Devaraj Das added a comment -

          Here is a straightforward patch, where the cleanup thread catches Exception and ignores it.

          Show
          Devaraj Das added a comment - Here is a straightforward patch, where the cleanup thread catches Exception and ignores it.
          Hide
          Hadoop QA added a comment -

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

          +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 tests are needed for this patch.

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

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

          +1 findbugs. The patch does not introduce any new Findbugs warnings.

          +1 Eclipse classpath. The patch retains Eclipse classpath integrity.

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

          -1 core tests. The patch failed core unit tests.

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

          Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/89/testReport/
          Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/89/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/89/artifact/trunk/build/test/checkstyle-errors.html
          Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/89/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/12402217/5483.1.patch against trunk revision 754645. +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 tests are needed for this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 Eclipse classpath. The patch retains Eclipse classpath integrity. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/89/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/89/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/89/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/89/console This message is automatically generated.
          Hide
          Amareshwari Sriramadasu added a comment -

          Patch looks fine

          Show
          Amareshwari Sriramadasu added a comment - Patch looks fine
          Hide
          Devaraj Das added a comment -

          I just committed this.

          Show
          Devaraj Das added a comment - I just committed this.
          Hide
          Hudson added a comment -
          Show
          Hudson added a comment - Integrated in Hadoop-trunk #783 (See http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/783/ )

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development