apache/seatunnel · error · HiveConnectorException
GET_HIVE_TABLE_INFORMATION_FAILED
GET_HIVE_TABLE_INFORMATION_FAILED
Error message
Failed to get Hive table information for table_name=''. Please ensure metastore is reachable and the table exists.
What it means
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.
Source
Thrown at seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/source/config/HiveSourceConfig.java:100
private final CatalogTable catalogTable;
private final FileFormat fileFormat;
private final ReadStrategy readStrategy;
private final List<String> filePaths;
private final HadoopConf hadoopConf;
@SneakyThrows
public HiveSourceConfig(ReadonlyConfig readonlyConfig) {
readonlyConfig
.getOptional(HiveSourceOptions.READ_PARTITIONS)
.ifPresent(this::validatePartitions);
Table table;
try {
table = HiveTableUtils.getTableInfo(readonlyConfig);
} catch (Exception e) {
String tableName =
readonlyConfig.getOptional(HiveSourceOptions.TABLE_NAME).orElse("<missing>");
throw new HiveConnectorException(
HiveConnectorErrorCode.GET_HIVE_TABLE_INFORMATION_FAILED,
"Failed to get Hive table information for table_name='"
+ tableName
+ "'. Please ensure metastore is reachable and the table exists.",
e);
}
this.hadoopConf = parseHiveHadoopConfig(readonlyConfig, table);
this.fileFormat = HiveTableUtils.parseFileFormat(table);
this.readStrategy = parseReadStrategy(table, readonlyConfig, fileFormat, hadoopConf);
this.filePaths = parseFilePaths(table, readStrategy);
this.catalogTable =
parseCatalogTable(
readonlyConfig, readStrategy, fileFormat, hadoopConf, filePaths, table);
}
private void validatePartitions(List<String> partitionsList) {
if (CollectionUtils.isEmpty(partitionsList)) {
throw new HiveConnectorException(View on GitHub (pinned to cf67b549a7)
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
Example fix
// before
source {
Hive {
table_name = "" // empty -> lookup fails
metastore_uri = "thrift://localhost:9083"
}
}
// after
source {
Hive {
table_name = "default.sales"
metastore_uri = "thrift://metastore-host:9083"
}
} Defensive patterns
Strategy: try-catch
Validate before calling
// Pre-flight: confirm table via Hive CLI using the same metastore_uri // beeline -u $JDBC -e 'DESCRIBE FORMATTED db.table'; // Also: nc -zv metastore-host 9083
Try / catch
try {
HiveSourceConfig cfg = new HiveSourceConfig(pluginConfig);
} catch (HiveConnectorException e) {
log.error("Hive table lookup failed: {}", e.getMessage(), e.getCause());
// fix metastore_uri / table_name / auth before retry
throw e;
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- CONFIG_VALIDATION_FAILED
- FILE_LIST_GET_FAILED
- Hive metastore_uri is required for regex table discovery (us
- No hive tables matched the regex pattern. Please check `tabl
- GET_HIVE_TABLE_INFORMATION_FAILED
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/c0efea3813b177ec.
Report an issue: GitHub.