apache/flink · error · IOException

Interrupted

Error message

Interrupted

What it means

While getting a recycled reader batch from the pool, the calling thread was interrupted. The code restores the interrupt flag and wraps the InterruptedException in an IOException with the message 'Interrupted'. This surfaces during job cancellation or thread interruption while the reader waits for a pooled ParquetReaderBatch.

Source

Thrown at flink-formats/flink-parquet/src/main/java/org/apache/flink/formats/parquet/ParquetVectorizedInputFormat.java:475

                if (metaData.getRowCount() > rowCount) {
                    break;
                } else {
                    reader.skipNextRowGroup();
                    rowsReturned += metaData.getRowCount();
                    totalCountLoadedSoFar += metaData.getRowCount();
                    rowCount -= metaData.getRowCount();
                }
            }

            this.recordsToSkip = rowCount;
        }

        private ParquetReaderBatch<T> getCachedEntry() throws IOException {
            try {
                return pool.pollEntry();
            } catch (InterruptedException e) {
                Thread.currentThread().interrupt();
                throw new IOException("Interrupted");
            }
        }

        private void skipRecord(RecordIterator<T> records) {
            while (recordsToSkip > 0 && records.next() != null) {
                recordsToSkip--;
            }
        }

        @Override
        public void close() throws IOException {
            if (reader != null) {
                reader.close();
                reader = null;
            }
        }
    }

View on GitHub (pinned to 2f3c205e92)

Solutions

  1. Treat this as a cancellation signal: stop reading and let the operator shut down cleanly
  2. Check Thread.currentThread().isInterrupted() / cancellation flag in your read loop and exit instead of continuing
  3. If it happens outside cancellation, look for code calling Thread.interrupt() on task threads and fix that
Defensive patterns

Strategy: try-catch

Try / catch

try { batch = reader.getCachedEntry(); } catch (IOException e) { if (Thread.currentThread().isInterrupted()) { /* cancellation: stop cleanly */ return; } throw e; }

Prevention

When it happens

Trigger: getCachedEntry() -> pool.pollEntry() blocking on an ObjectPool of ParquetReaderBatch objects when the TaskManager thread is interrupted (job cancellation, timeout-driven cancellation, or custom thread management).

Common situations: Cancelling a Flink job while the parquet reader is blocked waiting for a free batch, or shutting down an embedded/mini-cluster that interrupts reader threads mid-read.

Related errors


AI-assisted analysis of apache/flink@2f3c205e92 (2026-08-14). Data as JSON: /api/errors/647d484cbf972d24. Report an issue: GitHub.