apache/seatunnel · error · IllegalArgumentException
Unsupported AEROSPIKE data type:
Error message
Unsupported AEROSPIKE data type:
What it means
AerospikeSinkWriter.convertValue() maps upstream SeaTunnel values into Aerospike bin values based on the AerospikeDataType configured for the field. The switch only handles STRING, INTEGER, LONG, DOUBLE, BOOLEAN, BYTEARRAY and LIST; any other enum constant (e.g. a newly added AerospikeDataType not yet wired into the writer) falls into the default branch and throws this IllegalArgumentException. It signals a mapping gap between the connector's type configuration and its value conversion logic.
Source
Thrown at seatunnel-connectors-v2/connector-aerospike/src/main/java/org/apache/seatunnel/connectors/seatunnel/aerospike/sink/AerospikeSinkWriter.java:221
case BOOLEAN:
if (value instanceof Boolean) {
return value;
}
return Boolean.parseBoolean(value.toString());
case BYTEARRAY:
if (value.getClass().isArray()) {
return value;
}
throw new IllegalArgumentException(
"Expected Array type but got: " + value.getClass());
case LIST:
if (value instanceof Iterable) {
return value;
}
throw new IllegalArgumentException(
"Expected List type but got: " + value.getClass());
default:
throw new IllegalArgumentException("Unsupported AEROSPIKE data type: " + dataType);
}
}
private long parseDateTimeString(String datetime) {
try {
return LocalDateTime.parse(datetime)
.atZone(ZoneId.systemDefault())
.toInstant()
.toEpochMilli();
} catch (DateTimeParseException e) {
try {
return Instant.parse(datetime).toEpochMilli();
} catch (DateTimeParseException ex) {
throw new IllegalArgumentException("Unsupported datetime format: " + datetime);
}
}
}
View on GitHub (pinned to cf67b549a7)
Solutions
- Check the field's entry in the 'field_types' sink option and change it to a supported value: STRING, INTEGER, LONG, DOUBLE, BOOLEAN, BYTEARRAY or LIST.
- Remove the offending field from field_types so its SeaTunnel type is auto-mapped via mapSeaTunnelType instead.
- If a new AerospikeDataType constant is legitimately needed, extend convertValue() with a case for it (or fix the version mismatch between the enum and the writer).
Example fix
// before
field_types = {score = GEOSPATIAL}
// after
field_types = {score = DOUBLE} Defensive patterns
Strategy: validation
Validate before calling
java.util.Set<String> supported = java.util.Set.of("STRING","INTEGER","LONG","DOUBLE","BOOLEAN","BYTEARRAY","LIST");
for (java.util.Map.Entry<String,String> e : fieldTypes.entrySet()) {
if (!supported.contains(e.getValue().toUpperCase())) {
throw new IllegalArgumentException("field_types entry '" + e.getKey() + "' uses unsupported type " + e.getValue());
}
} Type guard
boolean isSupportedType(AerospikeDataType t) {
return t == AerospikeDataType.STRING || t == AerospikeDataType.INTEGER || t == AerospikeDataType.LONG
|| t == AerospikeDataType.DOUBLE || t == AerospikeDataType.BOOLEAN
|| t == AerospikeDataType.BYTEARRAY || t == AerospikeDataType.LIST;
} Prevention
- Only use documented values in field_types: STRING, INTEGER, LONG, DOUBLE, BOOLEAN, BYTEARRAY, LIST.
- Validate field_types against the supported set at job-configuration time, before submission.
- When upgrading the connector, re-check the AerospikeDataType enum for removed/renamed constants.
When it happens
Trigger: A field's AerospikeDataType (from the 'field_types' config or mapSeaTunnelType) resolves to an enum constant that convertValue()'s switch does not cover, and the row value for that field is non-null, so the default branch executes during write() -> convertValue().
Common situations: Configuring a field type string in field_types that parses to an AerospikeDataType the writer cannot convert; running a newer/patched AerospikeDataType enum against an older writer implementation; a custom build where a new data type was added to the enum without updating convertValue().
Related errors
- Unsupported datetime format:
- Unsupported timestamp type:
- UNSUPPORTED_DATA_TYPE
- Unknown MetaLakeTypeMapper type:
- Unsupported convert ${value.getClass()} to LocalTime, typeDe
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/12ee4e01609af2a9.
Report an issue: GitHub.