Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-17876

Write StructuredStreaming WAL to a stream instead of materializing all at once

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0, 2.0.1
    • 2.0.2, 2.1.0
    • Structured Streaming
    • None

    Description

      The CompactibleFileStreamLog materializes the whole metadata log in memory as a String. This can cause issues when there are lots of files that are being committed, especially during a compaction batch.

      You may come across stacktraces that look like:

      java.lang.OutOfMemoryError: Requested array size exceeds VM limit
      at java.lang.StringCoding.encode(StringCoding.java:350)
      at java.lang.String.getBytes(String.java:941)
      at org.apache.spark.sql.execution.streaming.FileStreamSinkLog.serialize(FileStreamSinkLog.scala:127)
      at 
      

      The safer way is to write to an output stream so that we don't have to materialize a huge string.

      Attachments

        Activity

          People

            brkyvz Burak Yavuz
            brkyvz Burak Yavuz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: