Help Center/ AI DataLake/ FAQs/ Compute Engines/ What Should I Do If the Parquet Brotli Compression Format Cannot Be Used in Spark?
Updated on 2026-11-06 GMT+08:00

What Should I Do If the Parquet Brotli Compression Format Cannot Be Used in Spark?

Symptom

The code indicates that the Brotli compression format is supported, but Spark SQL tasks using the Brotli compression format fail with an unsupported format error during execution.

Possible Causes

The Parquet dependency declaration references org.apache.hadoop.io.compress.BrotliCodec, but this class is missing from Hadoop releases.

Solutions

  • Solution 1: Use the ORC format, which supports BrotliCodec.
  • Solution 2: Use Spark jobs and introduce a third-party package that includes the org.apache.hadoop.io.compress.BrotliCodec implementation.