{"record":{"id":"c0efea3813b177ec","repo":"apache/seatunnel","slug":"get-hive-table-information-failed","errorCode":"GET_HIVE_TABLE_INFORMATION_FAILED","errorMessage":"Failed to get Hive table information for table_name=''. Please ensure metastore is reachable and the table exists.","messagePattern":"Failed to get Hive table information for table_name=''\\. Please ensure metastore is reachable and the table exists\\.","errorType":"error_code","errorClass":"HiveConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/source/config/HiveSourceConfig.java","lineNumber":100,"sourceCode":"\n    private final CatalogTable catalogTable;\n    private final FileFormat fileFormat;\n    private final ReadStrategy readStrategy;\n    private final List<String> filePaths;\n    private final HadoopConf hadoopConf;\n\n    @SneakyThrows\n    public HiveSourceConfig(ReadonlyConfig readonlyConfig) {\n        readonlyConfig\n                .getOptional(HiveSourceOptions.READ_PARTITIONS)\n                .ifPresent(this::validatePartitions);\n        Table table;\n        try {\n            table = HiveTableUtils.getTableInfo(readonlyConfig);\n        } catch (Exception e) {\n            String tableName =\n                    readonlyConfig.getOptional(HiveSourceOptions.TABLE_NAME).orElse(\"<missing>\");\n            throw new HiveConnectorException(\n                    HiveConnectorErrorCode.GET_HIVE_TABLE_INFORMATION_FAILED,\n                    \"Failed to get Hive table information for table_name='\"\n                            + tableName\n                            + \"'. Please ensure metastore is reachable and the table exists.\",\n                    e);\n        }\n        this.hadoopConf = parseHiveHadoopConfig(readonlyConfig, table);\n        this.fileFormat = HiveTableUtils.parseFileFormat(table);\n        this.readStrategy = parseReadStrategy(table, readonlyConfig, fileFormat, hadoopConf);\n        this.filePaths = parseFilePaths(table, readStrategy);\n        this.catalogTable =\n                parseCatalogTable(\n                        readonlyConfig, readStrategy, fileFormat, hadoopConf, filePaths, table);\n    }\n\n    private void validatePartitions(List<String> partitionsList) {\n        if (CollectionUtils.isEmpty(partitionsList)) {\n            throw new HiveConnectorException(","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/source/config/HiveSourceConfig.java#L82-L118","documentation":"HiveSourceConfig calls HiveTableUtils.getTableInfo to fetch table metadata from the Hive Metastore. Any failure resolving the table (metastore unreachable, wrong table/db name, auth failure) is wrapped in this GET_HIVE_TABLE_INFORMATION_FAILED error, which aborts source creation at config time.","triggerScenarios":"Calling HiveSourceConfig construction with readonlyConfig whose metastore_uri is wrong/unreachable, or whose table_name/database does not exist in the metastore, or with insufficient Kerberos/permissions.","commonSituations":"Typo in table_name or database name; metastore service down or wrong thrift URI; Kerberos/kerberos principal misconfigured; network/firewall blocking the metastore port; table dropped between job design and run.","solutions":["Verify the table exists: run `SHOW TABLES` / `DESCRIBE <table>` via hive/beeline against the same metastore","Check metastore_uri in the source config and confirm the metastore service is reachable (telnet/nc the host:port)","Check authentication settings (kerberos principal, keytab, user) match the metastore's requirements","Inspect the wrapped cause (`e`) in the stack trace for the exact metastore exception (Connection refused vs NoSuchObjectException)","If the table was intentionally empty/missing in the message (table_name=''), fix the empty table_name config value"],"exampleFix":"// before\nsource {\n  Hive {\n    table_name = \"\"          // empty -> lookup fails\n    metastore_uri = \"thrift://localhost:9083\"\n  }\n}\n// after\nsource {\n  Hive {\n    table_name = \"default.sales\"\n    metastore_uri = \"thrift://metastore-host:9083\"\n  }\n}","handlingStrategy":"try-catch","validationCode":"// Pre-flight: confirm table via Hive CLI using the same metastore_uri\n// beeline -u $JDBC -e 'DESCRIBE FORMATTED db.table';\n// Also: nc -zv metastore-host 9083","typeGuard":null,"tryCatchPattern":"try {\n    HiveSourceConfig cfg = new HiveSourceConfig(pluginConfig);\n} catch (HiveConnectorException e) {\n    log.error(\"Hive table lookup failed: {}\", e.getMessage(), e.getCause());\n    // fix metastore_uri / table_name / auth before retry\n    throw e;\n}","preventionTips":["Verify table_name (db.table) and metastore_uri before submitting","Confirm metastore service is up and ports are open from the job environment","Align Kerberos/user credentials with the metastore's auth requirements"],"tags":["hive","metastore","lookup","source"],"backgroundTag":"resource-not-found","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}