apache/flink · warning · IOException

Interrupted

Error message

Interrupted

What it means

AbstractOrcFileInputFormat's reader threads take ORC batches from a pool via pool.pollEntry(); if the thread is interrupted while waiting, the code restores the interrupt flag (Thread.currentThread().interrupt()) and converts the InterruptedException into IOException('Interrupted'). This occurs during reader shutdown/cancellation, e.g. when a source is canceled mid-read or a task is failing over.

Source

Thrown at flink-formats/flink-orc/src/main/java/org/apache/flink/orc/AbstractOrcFileInputFormat.java:294

            orcReader.close();
        }

        /**
         * The argument of {@link RecordReader#seekToRow(long)} must come from {@link
         * RecordReader#getRowNumber()}. The internal implementation of ORC is very confusing. It
         * has special behavior when dealing with Predicate.
         */
        public void seek(CheckpointedPosition position) throws IOException {
            orcReader.seekToRow(position.getOffset());
            recordsToSkip = position.getRecordsAfterOffset();
        }

        private OrcReaderBatch<T, BatchT> 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--;
            }
        }
    }
}

View on GitHub (pinned to 2f3c205e92)

Solutions

  1. If seen during clean cancellation/shutdown, treat it as benign: the interrupt flag is already restored and the task is going down.
  2. If it appears during normal reads, look for what is interrupting the reader thread (task manager restarts, socket timeouts causing task failure) and fix that root cause.
  3. Ensure you do not manually interrupt Flink task threads in surrounding application code.
Defensive patterns

Strategy: try-catch

Try / catch

try { /* ORC batch read loop */ } catch (IOException e) { if (Thread.currentThread().isInterrupted() || "Interrupted".equals(e.getMessage())) { // shutdown in progress return; } throw e; }

Prevention

When it happens

Trigger: OrcFileSource reader thread blocked in pool.pollEntry() gets interrupt() from task cancellation, job shutdown, or failover; also possible if user code interrupts the read thread.

Common situations: Job cancellation while ORC batches are in flight; checkpoint-timeout-triggered task restarts; source idle-timeout configurations cancelling readers; intentional fast failover tests.

Related errors


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