apache/flink · error · UnsupportedOperationException

Unsupported policy

Error message

Unsupported policy: %s

What it means

Thrown by PartitionCommitPolicyFactory.createPolicyChain when the configured sink partition commit policy string is neither 'success-file', 'metadata', nor a recognized name resolvable to a custom policy class. The switch over policy kinds falls through to this default branch; check the 'sink.partition-commit.policy.kind' option value.

Solutions

  1. Address the cause reported by the error message: Unsupported policy: 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 ("Unsupported policy: the reported value") and rerun the job or command.
Defensive patterns

Strategy: validation

When it happens

Trigger: Triggered at runtime when the operation fails because: Unsupported policy: the reported value.

Common situations: Commonly caused by misconfiguration, missing dependencies or files, unsupported types or operations, or invalid user input leading to: Unsupported policy: the reported value.


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

Appendix: source

Thrown at flink-connectors/flink-connector-files/src/main/java/org/apache/flink/connector/file/table/PartitionCommitPolicyFactory.java:98

                                                    cl.loadClass(customClass)
                                                            .getConstructor(classes)
                                                            .newInstance((Object[]) paramStrings);
                                        } else {
                                            return (PartitionCommitPolicy)
                                                    cl.loadClass(customClass).newInstance();
                                        }
                                    } catch (ClassNotFoundException
                                            | IllegalAccessException
                                            | InstantiationException
                                            | NoSuchMethodException
                                            | InvocationTargetException e) {
                                        throw new RuntimeException(
                                                "Can not create new instance for custom class from "
                                                        + customClass,
                                                e);
                                    }
                                default:
                                    throw new UnsupportedOperationException(
                                            "Unsupported policy: " + name);
                            }
                        })
                .collect(Collectors.toList());
    }
}

View on GitHub (pinned to 2f3c205e92)