apache/flink · error · RuntimeException
Unsupported page type: {}
Error message
Unsupported page type: {} What it means
RuntimeException from the read loop in AbstractColumnReader.readToVector: after finishing a page, pageReader.readPage() returned an object that is neither DataPageV1 nor DataPageV2. parquet-mr's page model has only these two concrete data page formats, so this branch indicates an unexpected page implementation - practically only seen with version-skewed parquet-mr jars on the classpath or corrupt page headers.
Source
Thrown at flink-formats/flink-parquet/src/main/java/org/apache/flink/formats/parquet/vector/reader/AbstractColumnReader.java:160
/** Reads `total` values from this columnReader into column. */
@Override
public final void readToVector(int readNumber, VECTOR vector) throws IOException {
int rowId = 0;
WritableIntVector dictionaryIds = null;
if (dictionary != null) {
dictionaryIds = vector.reserveDictionaryIds(readNumber);
}
while (readNumber > 0) {
// Compute the number of values we want to read in this page.
int leftInPage = (int) (endOfPageValueCount - valuesRead);
if (leftInPage == 0) {
DataPage page = pageReader.readPage();
if (page instanceof DataPageV1) {
readPageV1((DataPageV1) page);
} else if (page instanceof DataPageV2) {
readPageV2((DataPageV2) page);
} else {
throw new RuntimeException("Unsupported page type: " + page.getClass());
}
leftInPage = (int) (endOfPageValueCount - valuesRead);
}
int num = Math.min(readNumber, leftInPage);
if (isCurrentPageDictionaryEncoded) {
// Read and decode dictionary ids.
runLenDecoder.readDictionaryIds(
num, dictionaryIds, vector, rowId, maxDefLevel, this.dictionaryIdsDecoder);
if (vector.hasDictionary() || (rowId == 0 && supportLazyDecode())) {
// Column vector supports lazy decoding of dictionary values so just set the
// dictionary.
// We can't do this if rowId != 0 AND the column doesn't have a dictionary (i.e.
// some
// non-dictionary encoded values have already been added).
vector.setDictionary(new ParquetDictionary(dictionary, descriptor));
} else {
readBatchFromDictionaryIds(rowId, num, vector, dictionaryIds);View on GitHub (pinned to 2f3c205e92)
Solutions
- Check for parquet-mr version conflicts: mvn dependency:tree / classpath scan; exclude extra parquet-mr from user jars so flink-parquet's version wins
- Verify the file with an independent reader to rule out corruption; regenerate if broken
- Align writer, reader, and bundled parquet-mr versions
Defensive patterns
Strategy: try-catch
Validate before calling
// detect parquet-mr version conflicts before job submission
ClassLoader cl = Thread.currentThread().getContextClassLoader();
Enumeration<URL> urls = cl.getResources("org/apache/parquet/column/page/DataPageV1.class");
if (Collections.list(urls).size() > 1) throw new IllegalStateException("Multiple parquet-mr jars on classpath"); Try / catch
catch (RuntimeException e) { if (e.getMessage() != null && e.getMessage().startsWith("Unsupported page type")) { /* fix parquet-mr version conflict in user jars */ } else throw e; } Prevention
- Shade or exclude parquet-mr from connector/user jars
- Keep one parquet-mr version across writer, reader, and Flink
When it happens
Trigger: readToVector hitting endOfPageValueCount == valuesRead and readPage() yielding an unknown DataPage subclass - e.g. a newer parquet-mr version mixed into the user classpath supplying pages the Flink reader does not recognize.
Common situations: User jars bundling a different parquet-mr version than flink-parquet depends on; shaded-dependency leaks in connectors; rarely, corrupted page data parsed into a bogus page object.
Related errors
- could not read page {} in col {}
- CRT transport requested (s3.crt.enabled=true) but the aws-cr
- Only support seek at first.
- A stream against this file was already created.
- Please use AvroParquetReaders.forSpecificRecord(Class<T>) fo
AI-assisted analysis of apache/flink@2f3c205e92 (2026-08-14).
Data as JSON: /api/errors/0f49e2d3a5a3d26e.
Report an issue: GitHub.