Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-4855

DFSOutputStream reference should be cleared from DFSClient#filesBeingWritten if the file closure fails.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 2.0.4-alpha
    • None
    • hdfs-client
    • None

    Description

      If the file closure fails due to some exception, then DFSOutputStream reference should be removed from the DFSClient#filesBeingWritten.

      Which is useless to keep and also memory consuming.

      If the same client is being used for long time,, then there is a chance of client getting OOM due to this.

      fix would be simple.

      Just cover complete DFSOutputStream#close() under try-finally and move dfsClient.endFileLease(src); to finally block.

      Any thoughts..?

      Attachments

        Issue Links

          Activity

            People

              vinayakumarb Vinayakumar B
              vinayakumarb Vinayakumar B
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: