{"record":{"id":"3663e477756ad00c","repo":"apache/seatunnel","slug":"namespace-create-exception","errorCode":"NAMESPACE_CREATE_EXCEPTION","errorMessage":"HbaseConnectorErrorCode.NAMESPACE_CREATE_EXCEPTION.getErrorMessage()","messagePattern":"HbaseConnectorErrorCode\\.NAMESPACE_CREATE_EXCEPTION\\.getErrorMessage\\(\\)","errorType":"error_code","errorClass":"HbaseConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-hbase/src/main/java/org/apache/seatunnel/connectors/seatunnel/hbase/client/HbaseClient.java","lineNumber":248,"sourceCode":"                    HbaseConnectorErrorCode.TABLE_CREATE_EXCEPTION,\n                    HbaseConnectorErrorCode.TABLE_CREATE_EXCEPTION.getErrorMessage(),\n                    e);\n        }\n    }\n\n    /**\n     * Drop a table.\n     *\n     * @param databaseName database name\n     * @param tableName table name\n     */\n    public void dropTable(String databaseName, String tableName) {\n        try {\n            TableName table = TableName.valueOf(databaseName, tableName);\n            admin.disableTable(table);\n            admin.deleteTable(table);\n        } catch (IOException e) {\n            throw new HbaseConnectorException(\n                    HbaseConnectorErrorCode.TABLE_DELETE_EXCEPTION,\n                    HbaseConnectorErrorCode.TABLE_DELETE_EXCEPTION.getErrorMessage(),\n                    e);\n        }\n    }\n\n    /**\n     * Create a namespace.\n     *\n     * @param namespace namespace name\n     */\n    public void createNamespace(String namespace) {\n        try {\n            admin.createNamespace(NamespaceDescriptor.create(namespace).build());\n        } catch (IOException e) {\n            throw new HbaseConnectorException(\n                    HbaseConnectorErrorCode.NAMESPACE_CREATE_EXCEPTION,\n                    HbaseConnectorErrorCode.NAMESPACE_CREATE_EXCEPTION.getErrorMessage(),","sourceCodeStart":230,"sourceCodeEnd":266,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-hbase/src/main/java/org/apache/seatunnel/connectors/seatunnel/hbase/client/HbaseClient.java#L230-L266","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Check table state first; if it is already disabled, skip disableTable and call deleteTable directly (or make disable idempotent with TableNotEnabledException handling)","Verify the table exists (tableExists) before dropping and validate the namespace/table names","Confirm the user has permission to disable/delete the table","Ensure no running jobs are writing to the table during the drop; check cluster health","Inspect the wrapped IOException cause for the precise failure"],"exampleFix":"// before\ntry {\n    admin.disableTable(table);\n    admin.deleteTable(table);\n} catch (IOException e) { throw new HbaseConnectorException(TABLE_DELETE_EXCEPTION, ...); }\n// after\ntry {\n    if (admin.isTableEnabled(table)) {\n        admin.disableTable(table);\n    }\n    admin.deleteTable(table);\n} catch (TableNotFoundException e) {\n    log.info(\"Table {} already absent\", table);\n} catch (IOException e) {\n    throw new HbaseConnectorException(TABLE_DELETE_EXCEPTION, ...);\n}","handlingStrategy":"validation","validationCode":"// check state before dropping\nTableName tn = TableName.valueOf(ns, table);\nif (!client.tableExists(tn.getNameAsString())) {\n    throw new IllegalStateException(\"Table not found: \" + tn);\n}\n// confirm no active jobs are writing to it","typeGuard":null,"tryCatchPattern":"try {\n    client.dropTable(ns, table);\n} catch (HbaseConnectorException e) {\n    if (e.getErrorCode() == HbaseConnectorErrorCode.TABLE_DELETE_EXCEPTION) {\n        log.error(\"Drop failed (already disabled? permission?): {}\", e.getCause(), e);\n    } else throw e;\n}","preventionTips":["Stop writers and check the table is enabled before disabling","Handle already-disabled/idempotent drop flows (isTableEnabled check)","Verify table existence and permissions before dropping","Retry on transient master failover"],"tags":["hbase","table","delete","admin"],"backgroundTag":"database-write-failed","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}