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

FSDataOutputStream should not flush() inside close().

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.17.0
    • fs
    • None

    Description

      Why does FSDataOutputStream.close() call flush()? This stream itself does not store any data that it needs to flush. It is a wrapper and it should just invoke its outputstream's close().

      For. e.g one bad side effect is that, in the case of DFSOutputStream which extends FSOutputSummer, flush() inside close sends the current data even though FSOutputSummer might have some data.. this left over data will be sent in side close() (so it sends data in two different packets instead of one). Other filesystems might have similar side effects.

      I will submit a patch.

      Attachments

        1. HADOOP-2863.patch
          0.4 kB
          Raghu Angadi
        2. HADOOP-2863.patch
          0.8 kB
          Raghu Angadi

        Activity

          People

            rangadi Raghu Angadi
            rangadi Raghu Angadi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: