apache/seatunnel · warning · UnsupportedOperationException
Unsupported action type: ${actionType}
Error message
Unsupported action type: ${actionType} What it means
EasysearchCatalog.previewAction only knows how to describe CREATE_TABLE, DROP_TABLE, CREATE_DATABASE and DROP_DATABASE actions; any other ActionType reaches the else branch and throws UnsupportedOperationException.
Source
Thrown at seatunnel-connectors-v2/connector-easysearch/src/main/java/org/apache/seatunnel/connectors/seatunnel/easysearch/catalog/EasysearchCatalog.java:281
}
@Override
public PreviewResult previewAction(
ActionType actionType,
TablePath tablePath,
java.util.Optional<CatalogTable> catalogTable) {
if (actionType == ActionType.CREATE_TABLE) {
return new InfoPreviewResult("create index " + tablePath.getTableName());
} else if (actionType == ActionType.DROP_TABLE) {
return new InfoPreviewResult("delete index " + tablePath.getTableName());
} else if (actionType == ActionType.TRUNCATE_TABLE) {
return new InfoPreviewResult("delete and create index " + tablePath.getTableName());
} else if (actionType == ActionType.CREATE_DATABASE) {
return new InfoPreviewResult("create index " + tablePath.getTableName());
} else if (actionType == ActionType.DROP_DATABASE) {
return new InfoPreviewResult("delete index " + tablePath.getTableName());
} else {
throw new UnsupportedOperationException("Unsupported action type: " + actionType);
}
}
private Map<String, String> buildTableOptions(TablePath tablePath) {
Map<String, String> options = new HashMap<>();
options.put("connector", "easysearch");
// todo: Right now, we don't use the config in the plugin config, do we need to add
// bootstrap servers here?
options.put("config", ConfigUtil.convertToJsonString(tablePath));
return options;
}
}
View on GitHub (pinned to cf67b549a7)
Solutions
- Only request previews for supported actions (create/drop table or database).
- Skip or special-case preview for unsupported action types in your tooling.
- Update previewAction to handle the missing ActionType (e.g. TRUNCATE_TABLE) if you maintain the connector.
Example fix
// before
} else if (actionType == ActionType.DROP_DATABASE) {
return new InfoPreviewResult("delete index " + tablePath.getTableName());
} else {
throw new UnsupportedOperationException("Unsupported action type: " + actionType);
}
// after
} else if (actionType == ActionType.TRUNCATE_TABLE) {
return new InfoPreviewResult("delete and create index " + tablePath.getTableName());
} else {
throw new UnsupportedOperationException("Unsupported action type: " + actionType);
} Defensive patterns
Strategy: validation
Validate before calling
Set<ActionType> supported = EnumSet.of(ActionType.CREATE_TABLE, ActionType.DROP_TABLE,
ActionType.CREATE_DATABASE, ActionType.DROP_DATABASE);
if (!supported.contains(actionType)) {
throw new IllegalArgumentException("Preview not supported for " + actionType);
} Try / catch
try {
result = catalog.previewAction(actionType, tablePath, ignoreIfNotExists);
} catch (UnsupportedOperationException e) {
// skip preview or fall back to generic description
} Prevention
- Only preview the four supported ActionTypes
- Handle new enum values after SeaTunnel upgrades
- Feature-detect supported actions in tooling
When it happens
Trigger: Calling previewAction with an ActionType other than the four handled ones, e.g. TRUNCATE_TABLE or any newly added ActionType enum value not yet wired into the preview logic.
Common situations: Job configs using truncate/other auto-create actions whose preview is requested; upgrading SeaTunnel adds a new ActionType while the connector's preview switch lags behind.
Related errors
- Unsupported action type:
- Failed to open catalog ${catalogName}
- Failed to drop table ${tableName} in catalog ${catalogName}
- Failed to truncate table ${tableName} in catalog ${catalogNa
- Unsupported action type:
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/f0e886e82b8cdc08.
Report an issue: GitHub.