Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-11136

FTPInputStream should close wrapped stream

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • fs
    • None

    Description

      This is reproducible in PASSIVE FTP mode, which is not supported by now(HADOOP-11135). However if we hack FTPFileSystem to enter into local passive mode, it will hang on client.completePendingCommand() in FTPInputStream line 114:

      ...
      public synchronized void close() throws IOException {
      ...
      boolean cmdCompleted = client.completePendingCommand();
      ...
      

      Going to completePendingCommand() docs I see that the stream should be closed before calling it. So seems like stream should be closed

      wrappedStream.close();
      

      right before

      boolean cmdCompleted = client.completePendingCommand();
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              SunSeaAndPalms Dzianis Sokal
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: