apache/flink · error · IllegalArgumentException

Job ID %s is not derived from the base job ID %s.

Error message

Job ID %s is not derived from the base job ID %s.

What it means

Error "Job ID %s is not derived from the base job ID %s." thrown in apache/flink.

Source

Thrown at flink-clients/src/main/java/org/apache/flink/client/program/JobNameBasedJobIdManager.java:220

    /**
     * Computes the index of the given job ID relative to the base job ID.
     *
     * <p>This method correctly calculates the index even when the lower and upper parts of the job
     * ID have wrapped around due to overflow.
     *
     * @param jobId the job ID to derive the index from
     * @param baseId the base job ID
     * @return the index of the given job ID relative to the base job ID
     */
    @VisibleForTesting
    static int getJobIndex(JobID jobId, JobID baseId) {
        long lowerDiff = jobId.getLowerPart() - baseId.getLowerPart();
        long upperDiff = jobId.getUpperPart() - baseId.getUpperPart();

        if (lowerDiff != upperDiff
                || lowerDiff < Integer.MIN_VALUE
                || lowerDiff > Integer.MAX_VALUE) {
            throw new IllegalArgumentException(
                    String.format(
                            "Job ID %s is not derived from the base job ID %s.", jobId, baseId));
        }

        return (int) lowerDiff;
    }

    /**
     * Creates a comparator for sorting job IDs based on their logical position relative to an
     * initial index, supporting circular sequence number semantics.
     *
     * <p>This comparator handles the case where job indices may have wrapped around due to overflow
     * by treating the difference as an unsigned 32-bit value. This allows proper ordering of job
     * IDs even when their indices span across the boundary where signed integers would overflow.
     *
     * @param initialIndex the starting index used as reference point for calculating logical
     *     offsets
     * @return a comparator that sorts job IDs by their calculated unsigned offset from the initial

View on GitHub (pinned to 2f3c205e92)

Solutions

  1. Address the cause reported by the error message: Job ID the reported value is not derived from the base job ID the reported value.
  2. Verify the inputs, configuration values, and classpath/dependency setup related to this operation, then retry.

Example fix

Correct the condition described ("Job ID the reported value is not derived from the base job ID the reported value.") and rerun the job or command.

When it happens

Trigger: Triggered at runtime when the operation fails because: Job ID the reported value is not derived from the base job ID the reported value.

Common situations: Commonly caused by misconfiguration, missing dependencies or files, unsupported types or operations, or invalid user input leading to: Job ID the reported value is not derived from the base job ID the reported value.


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