Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-10469

FileChannel may not write the whole buffer in a single call to FileChannel.write(Buffer buffer)

    Details

      Description

      Currently all the calls to FileChannel.write(ByteBuffer src) assumes that this method will not return before the whole buffer is written, like the one in AsynchronousFileIOChannel.write().

       

      However, this assumption may not be right for all the environments. We have encountered the case that only part of a buffer was written on a cluster with a high IO load, and the target file got messy. 

       

      To fix this issue, I think we should add a utility method in the org.apache.flink.util.IOUtils to ensure the whole buffer is written with a loop,and replace all the calls to FileChannel.write(ByteBuffer) with this new method. 

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                NicoK Nico Kruber
                Reporter:
                gaoyunhaii Yun Gao
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: