Hadoop Common
  1. Hadoop Common
  2. HADOOP-6593

TextRecordInputStream doesn't close SequenceFile.Reader

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.20.1
    • Fix Version/s: 0.21.0
    • Component/s: fs
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Using hadoop fs -text on a glob with many sequence files can fail with too many open file handles.

      The cause seems to be that TextRecordInputStream doesn't override close(), so printToStdout's call to close doesn't release the SequenceFile.Reader.

      1. HADOOP-6593.patch
        0.5 kB
        Chase Bradford

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Patch Available Patch Available
        3d 20h 21m 1 Chase Bradford 27/Feb/10 14:31
        Patch Available Patch Available Resolved Resolved
        20d 9h 22m 1 Tom White 19/Mar/10 23:54
        Resolved Resolved Closed Closed
        157d 20h 47m 1 Tom White 24/Aug/10 21:42
        Tom White made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Tom White made changes -
        Fix Version/s 0.21.0 [ 12313563 ]
        Fix Version/s 0.22.0 [ 12314296 ]
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk #282 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk/282/)
        . TextRecordInputStream doesn't close SequenceFile.Reader. Contributed by Chase Bradford.

        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk #282 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk/282/ ) . TextRecordInputStream doesn't close SequenceFile.Reader. Contributed by Chase Bradford.
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk-Commit #204 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk-Commit/204/)
        . TextRecordInputStream doesn't close SequenceFile.Reader. Contributed by Chase Bradford.

        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #204 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk-Commit/204/ ) . TextRecordInputStream doesn't close SequenceFile.Reader. Contributed by Chase Bradford.
        Tom White made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags [Reviewed]
        Assignee Chase Bradford [ cbradford ]
        Fix Version/s 0.22.0 [ 12314296 ]
        Resolution Fixed [ 1 ]
        Hide
        Tom White added a comment -

        +1 I've just committed this. Thanks Chase!

        Show
        Tom White added a comment - +1 I've just committed this. Thanks Chase!
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12437342/HADOOP-6593.patch
        against trunk revision 916915.

        +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 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 release audit. The applied patch does not increase the total number of release audit warnings.

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

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

        Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/399/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/399/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/399/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/399/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/12437342/HADOOP-6593.patch against trunk revision 916915. +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 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 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/399/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/399/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/399/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/399/console This message is automatically generated.
        Chase Bradford made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Chase Bradford made changes -
        Field Original Value New Value
        Attachment HADOOP-6593.patch [ 12437342 ]
        Hide
        Chase Bradford added a comment -

        Added an override for close() in FsShell.TextRecordInputStream that closes the SequenceFile.Reader instance. I didn't create new tests because I don't know the best way to force too many open file handles on the test machine. However, with this patch I can set ulimit -n 100 and still use the -text option on a path glob with 1000+ files. Without the patch, files fail to open at the 95th part.

        Show
        Chase Bradford added a comment - Added an override for close() in FsShell.TextRecordInputStream that closes the SequenceFile.Reader instance. I didn't create new tests because I don't know the best way to force too many open file handles on the test machine. However, with this patch I can set ulimit -n 100 and still use the -text option on a path glob with 1000+ files. Without the patch, files fail to open at the 95th part.
        Chase Bradford created issue -

          People

          • Assignee:
            Chase Bradford
            Reporter:
            Chase Bradford
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development