apache/seatunnel · error · UnsupportedOperationException

Unsupported action type: ${actionType}

Error message

Unsupported action type: ${actionType}

What it means

HbaseCatalog.previewAction() only implements preview messages for CREATE_TABLE, DROP_TABLE, CREATE_DATABASE and DROP_DATABASE action types. Any other ActionType passed in reaches the final else branch and throws UnsupportedOperationException. This is an internal exhaustiveness guard for catalog operations not supported by the HBase connector.

Source

Thrown at seatunnel-connectors-v2/connector-hbase/src/main/java/org/apache/seatunnel/connectors/seatunnel/hbase/catalog/HbaseCatalog.java:215

        options.put("config", ConfigUtil.convertToJsonString(tablePath));
        return options;
    }

    @Override
    public PreviewResult previewAction(
            ActionType actionType, TablePath tablePath, 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);
        }
    }
}

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Add a branch for the missing ActionType in previewAction() and return an appropriate InfoPreviewResult
  2. Verify the caller is only passing supported catalog actions to the HBase connector
  3. Upgrade to a SeaTunnel version where the HBase catalog covers the ActionType you need
  4. Wrap the preview call in try-catch and surface a user-friendly 'operation not supported by HBase catalog' message

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.DROP_DATABASE) {
    return new InfoPreviewResult("delete index " + tablePath.getTableName());
} else if (actionType == ActionType.RENAME_TABLE) {
    return new InfoPreviewResult("rename table " + tablePath.getTableName());
} else {
    throw new UnsupportedOperationException("Unsupported action type: " + actionType);
}
Defensive patterns

Strategy: validation

Validate before calling

java.util.Set<ActionType> SUPPORTED = java.util.Set.of(ActionType.CREATE_TABLE, ActionType.DROP_TABLE, ActionType.CREATE_DATABASE, ActionType.DROP_DATABASE);
if (!SUPPORTED.contains(actionType)) { throw new IllegalArgumentException("HBase catalog does not support: " + actionType); }
previewAction(actionType, tablePath);

Type guard

boolean isSupported(ActionType t) {
    return t == ActionType.CREATE_TABLE || t == ActionType.DROP_TABLE
        || t == ActionType.CREATE_DATABASE || t == ActionType.DROP_DATABASE;
}

Try / catch

try {
    result = catalog.previewAction(actionType, tablePath);
} catch (UnsupportedOperationException e) {
    log.warn("HBase catalog cannot preview this action: {}", e.getMessage());
}

Prevention

When it happens

Trigger: Calling HbaseCatalog.previewAction() (directly or via catalog preview APIs) with an ActionType outside the four handled values, e.g. RENAME_TABLE, ADD_COLUMN or any newly added ActionType enum constant not yet mapped in HbaseCatalog.

Common situations: A new ActionType was added to the SeaTunnel API but the HBase catalog was not updated; a caller reuses a generic catalog preview flow that passes unsupported operations (like rename) to HBase; plugin dispatch logic passes the wrong ActionType.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


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