apache/seatunnel · warning

set time-characteristic failed, unknown time-characteristic

Error message

set time-characteristic failed, unknown time-characteristic [{}],only support event-time,ingestion-time,processing-time

What it means

Emitted by AbstractFlinkRuntimeEnvironment.setTimeCharacteristic when the 'time-characteristic' env option is not one of 'event-time', 'ingestion-time', or 'processing-time'. The starter logs a warning and skips the setting, so the Flink DataStream's default time characteristic remains in effect. It is a soft config-validation failure, not a job abort.

Solutions

  1. Set time-characteristic to exactly one of 'event-time', 'ingestion-time', or 'processing-time'.
  2. Remove the key to keep Flink's default time characteristic.
  3. Verify in the job log that no 'set time-characteristic failed' warning appears.

Example fix

// before
env {
  time-characteristic = EventTime
}
// after
env {
  time-characteristic = "event-time"
}
Defensive patterns

Strategy: validation

Validate before calling

String t = config.getString("time-characteristic");
if (!java.util.Arrays.asList("event-time","ingestion-time","processing-time").contains(t)) {
    throw new IllegalArgumentException("time-characteristic must be event-time, ingestion-time, or processing-time");
}

Prevention

When it happens

Trigger: env block contains 'time-characteristic' with an unrecognized string (case-sensitive, hyphenated), e.g. 'EventTime', 'event_time', or 'watermark'; passed via createStreamEnvironment -> setTimeCharacteristic.

Common situations: Typos like 'event_time' from underscore-style configs; values copied from Flink's TimeCharacteristic enum names (EventTime/IngestionTime/ProcessingTime); stale configs referencing removed options.

Understand the failure class

Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/2661201b8927a147. Report an issue: GitHub.

Appendix: source

Thrown at seatunnel-core/seatunnel-flink-starter/seatunnel-flink-starter-common/src/main/java/org/apache/seatunnel/core/starter/flink/execution/AbstractFlinkRuntimeEnvironment.java:246

        }
        return OptionalLong.empty();
    }

    private void setTimeCharacteristic() {
        if (EnvironmentUtil.hasPathAndWaring(config, ConfigKeyName.TIME_CHARACTERISTIC)) {
            String timeType = config.getString(ConfigKeyName.TIME_CHARACTERISTIC);
            switch (timeType.toLowerCase()) {
                case "event-time":
                    environment.setStreamTimeCharacteristic(TimeCharacteristic.EventTime);
                    break;
                case "ingestion-time":
                    environment.setStreamTimeCharacteristic(TimeCharacteristic.IngestionTime);
                    break;
                case "processing-time":
                    environment.setStreamTimeCharacteristic(TimeCharacteristic.ProcessingTime);
                    break;
                default:
                    LOGGER.warn(
                            "set time-characteristic failed, unknown time-characteristic [{}],only support event-time,ingestion-time,processing-time",
                            timeType);
                    break;
            }
        }
    }

    public boolean isStreaming() {
        return JobMode.STREAMING.equals(jobMode);
    }

    public String getJobName() {
        return jobName;
    }

    @Override
    public JobMode getJobMode() {
        return jobMode;

View on GitHub (pinned to cf67b549a7)