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

Correct the usage of BulkWriter#flush and BulkWriter#finish

    XMLWordPrintableJSON

Details

    Description

      From the comments, BulkWriter#finish method should flush all buffer before close.

      But some subclasses of it do not flush data. These classes are as follows:

      1.AvroBulkWriter#finish

      2.HadoopCompressionBulkWriter#finish

      3.NoCompressionBulkWriter#finish

      4.SequenceFileWriter#finish

      We should invoke BulkWriter#flush in this finish methods.

      On the other hand, We don't have to  invoke BulkWriter#flush in close method. For BulkWriter#finish will flush all data.

      1. HadoopPathBasedPartFileWriter#closeForCommit

      2. BulkPartWriter#closeForCommit

      3. FileSystemTableSink#OutputFormat#close

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            hailong wang hailong wang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: