apache/seatunnel · error · HbaseConnectorException

NAMESPACE_CREATE_EXCEPTION

NAMESPACE_CREATE_EXCEPTION

Error message

HbaseConnectorErrorCode.NAMESPACE_CREATE_EXCEPTION.getErrorMessage()

What it means

Despite the message naming NAMESPACE_CREATE_EXCEPTION in the error entry, the source region shows dropTable() wrapping IOExceptions from admin.disableTable/admin.deleteTable with code TABLE_DELETE_EXCEPTION. It is thrown when disabling or deleting an HBase table fails.

Solutions

  1. Check table state first; if it is already disabled, skip disableTable and call deleteTable directly (or make disable idempotent with TableNotEnabledException handling)
  2. Verify the table exists (tableExists) before dropping and validate the namespace/table names
  3. Confirm the user has permission to disable/delete the table
  4. Ensure no running jobs are writing to the table during the drop; check cluster health
  5. Inspect the wrapped IOException cause for the precise failure

Example fix

// before
try {
    admin.disableTable(table);
    admin.deleteTable(table);
} catch (IOException e) { throw new HbaseConnectorException(TABLE_DELETE_EXCEPTION, ...); }
// after
try {
    if (admin.isTableEnabled(table)) {
        admin.disableTable(table);
    }
    admin.deleteTable(table);
} catch (TableNotFoundException e) {
    log.info("Table {} already absent", table);
} catch (IOException e) {
    throw new HbaseConnectorException(TABLE_DELETE_EXCEPTION, ...);
}
Defensive patterns

Strategy: validation

Validate before calling

// check state before dropping
TableName tn = TableName.valueOf(ns, table);
if (!client.tableExists(tn.getNameAsString())) {
    throw new IllegalStateException("Table not found: " + tn);
}
// confirm no active jobs are writing to it

Try / catch

try {
    client.dropTable(ns, table);
} catch (HbaseConnectorException e) {
    if (e.getErrorCode() == HbaseConnectorErrorCode.TABLE_DELETE_EXCEPTION) {
        log.error("Drop failed (already disabled? permission?): {}", e.getCause(), e);
    } else throw e;
}

Prevention

When it happens

Trigger: Calling dropTable() when admin.disableTable or admin.deleteTable throws IOException: table already disabled (disableTable throws TableNotEnabledException, an IOException subclass), table not found, cluster unreachable, or permission denied.

Common situations: Dropping a table that is already disabled from a previous failed drop; concurrent readers/writers blocking disable; table does not exist (typo'd name); user lacks permission; master unavailable mid-operation.

Related errors


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

Appendix: source

Thrown at seatunnel-connectors-v2/connector-hbase/src/main/java/org/apache/seatunnel/connectors/seatunnel/hbase/client/HbaseClient.java:248

                    HbaseConnectorErrorCode.TABLE_CREATE_EXCEPTION,
                    HbaseConnectorErrorCode.TABLE_CREATE_EXCEPTION.getErrorMessage(),
                    e);
        }
    }

    /**
     * Drop a table.
     *
     * @param databaseName database name
     * @param tableName table name
     */
    public void dropTable(String databaseName, String tableName) {
        try {
            TableName table = TableName.valueOf(databaseName, tableName);
            admin.disableTable(table);
            admin.deleteTable(table);
        } catch (IOException e) {
            throw new HbaseConnectorException(
                    HbaseConnectorErrorCode.TABLE_DELETE_EXCEPTION,
                    HbaseConnectorErrorCode.TABLE_DELETE_EXCEPTION.getErrorMessage(),
                    e);
        }
    }

    /**
     * Create a namespace.
     *
     * @param namespace namespace name
     */
    public void createNamespace(String namespace) {
        try {
            admin.createNamespace(NamespaceDescriptor.create(namespace).build());
        } catch (IOException e) {
            throw new HbaseConnectorException(
                    HbaseConnectorErrorCode.NAMESPACE_CREATE_EXCEPTION,
                    HbaseConnectorErrorCode.NAMESPACE_CREATE_EXCEPTION.getErrorMessage(),

View on GitHub (pinned to cf67b549a7)