{"record":{"id":"79afc69e2daf5e5d","repo":"apache/seatunnel","slug":"table-query-exception","errorCode":"TABLE_QUERY_EXCEPTION","errorMessage":"HbaseConnectorErrorCode.TABLE_QUERY_EXCEPTION.getErrorMessage()","messagePattern":"HbaseConnectorErrorCode\\.TABLE_QUERY_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":187,"sourceCode":"        } catch (IOException e) {\n            throw new HbaseConnectorException(\n                    HbaseConnectorErrorCode.DATABASE_QUERY_EXCEPTION,\n                    HbaseConnectorErrorCode.DATABASE_QUERY_EXCEPTION.getErrorMessage(),\n                    e);\n        }\n    }\n\n    /**\n     * Check if a table exists.\n     *\n     * @param tableName table name\n     * @return true if the table exists, false otherwise\n     */\n    public boolean tableExists(String tableName) {\n        try {\n            return admin.tableExists(TableName.valueOf(tableName));\n        } catch (IOException e) {\n            throw new HbaseConnectorException(\n                    HbaseConnectorErrorCode.TABLE_QUERY_EXCEPTION,\n                    HbaseConnectorErrorCode.TABLE_QUERY_EXCEPTION.getErrorMessage(),\n                    e);\n        }\n    }\n\n    /**\n     * Create a table.\n     *\n     * @param databaseName database name\n     * @param tableName table name\n     * @param columnFamilies column families\n     * @param ignoreIfExists ignore if the table already exists\n     */\n    public void createTable(\n            String databaseName,\n            String tableName,\n            List<String> columnFamilies,","sourceCodeStart":169,"sourceCodeEnd":205,"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#L169-L205","documentation":"tableExists(tableName) calls admin.tableExists(TableName.valueOf(tableName)); an IOException (RPC/connection failure) is wrapped as HbaseConnectorException with TABLE_QUERY_EXCEPTION. Note: a table simply not existing returns false — this error only fires on infrastructure failures.","triggerScenarios":"Calling tableExists() (directly or via createTable/getTableSplits/source validation) when admin.tableExists throws IOException: connection dropped, master unavailable, RPC timeout, or invalid table name causing server-side errors.","commonSituations":"HBase master restarting while a job starts; network partition; wrong cluster endpoint from missing/bad hbase-site.xml; TableName string malformed (contains illegal characters) causing conversion errors.","solutions":["Verify cluster connectivity and master availability before running jobs","Validate the table name format (namespace:table or default namespace) and allowed characters","Inspect the wrapped IOException for the underlying cause and tune hbase client timeouts/retries","Retry the existence check after transient failures"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// validate name format before the call\nif (tableName == null || tableName.isEmpty() || tableName.contains(\" \")) {\n    throw new IllegalArgumentException(\"Invalid HBase table name: \" + tableName);\n}","typeGuard":null,"tryCatchPattern":"int attempts = 0;\nwhile (true) {\n    try { return client.tableExists(name); }\n    catch (HbaseConnectorException e) {\n        if (e.getErrorCode() == HbaseConnectorErrorCode.TABLE_QUERY_EXCEPTION && ++attempts < 3) {\n            Thread.sleep(1000L * attempts);\n            continue;\n        }\n        throw e;\n    }\n}","preventionTips":["Validate table name format (namespace:table, legal characters) before calling","Retry transient RPC failures with backoff","Monitor HBase master availability during job startup"],"tags":["hbase","table","query","admin"],"backgroundTag":"database-query-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"}