prestodb/presto · critical · RuntimeException
Could not create hudi connector for catalog
Error message
Could not create hudi connector for catalog
What it means
HudiConnectorFactory.create builds the Hudi connector plugin (module, NodeSelection, and the Connector instance) for a catalog. Any exception thrown during connector construction — usually configuration or classpath problems — is caught, unchecked exceptions rethrown, and anything else wrapped in a RuntimeException prefixed with 'Could not create hudi connector for catalog '. The original cause is attached, so the root problem is in the cause chain.
Source
Thrown at presto-hudi/src/main/java/com/facebook/presto/hudi/HudiConnectorFactory.java:105
new HiveMetastoreModule(catalogName, metastore),
new CachingModule(),
new HiveCommonModule(),
binder -> {
binder.bind(NodeVersion.class).toInstance(new NodeVersion(context.getNodeManager().getCurrentNode().getVersion()));
binder.bind(NodeManager.class).toInstance(context.getNodeManager());
binder.bind(TypeManager.class).toInstance(context.getTypeManager());
binder.bind(PageIndexerFactory.class).toInstance(context.getPageIndexerFactory());
});
return app
.doNotInitializeLogging()
.setRequiredConfigurationProperties(config)
.initialize()
.getInstance(Connector.class);
}
catch (Exception e) {
throwIfUnchecked(e);
throw new RuntimeException("Could not create hudi connector for catalog " + catalogName, e);
}
}
}
View on GitHub (pinned to 55bb57d202)
Solutions
- Read the 'Caused by' of this exception to find the root failure (usually config or classpath)
- Validate etc/catalog/<hudi>.properties — every required key present, no duplicate keys, correct hive.metastore.uri
- Check plugin compatibility: Hudi bundle jars and presto-hudi plugin versions match the server version
- Fix the underlying config and restart the catalog/server
Example fix
// before (etc/catalog/hudi.properties) hive.metastore.uri=thrift://localhost // after (complete, valid config) hive.metastore.uri=thrift://metastore.internal.example.com:9083
Defensive patterns
Strategy: try-catch
Validate before calling
// validate catalog config before creating the connector
Properties props = loadCatalogProperties("hudi");
Set<String> required = ImmutableSet.of("hive.metastore.uri");
Set<String> missing = Sets.difference(required, props.stringPropertyNames());
if (!missing.isEmpty()) {
throw new IllegalArgumentException("Missing hudi catalog properties: " + missing);
} Type guard
boolean isHudiCatalogConfigValid(Map<String,String> config) {
return config != null
&& config.containsKey("hive.metastore.uri")
&& !config.containsKey(""); // no empty keys from typos
} Try / catch
try {
Connector c = connectorFactory.create(catalogName, config, context);
} catch (RuntimeException e) {
if (e.getMessage() != null && e.getMessage().startsWith("Could not create hudi connector")) {
log.error("Hudi catalog '{}' failed to initialize. Root cause:", catalogName, e.getCause());
}
throw e;
} Prevention
- Always read the 'Caused by' chain — the wrapper hides the real config error
- Validate catalog property files at deploy time (no missing/duplicate keys)
- Keep the hudi plugin and Hudi bundle jars version-matched with the server
- Test catalog creation in staging before production rollout
When it happens
Trigger: Catalog initialization at Presto startup or after 'CREATE CATALOG' where the Hudi module initialization fails: invalid hudi.properties, missing required config keys, duplicate property values, or a failure instantiating the Connector class.
Common situations: Typos/missing values in etc/catalog/hudi.properties; incompatible Hudi/Hive versions on the classpath; missing Hive Metastore access config for Hudi copy-on-write tables; JVM errors during plugin DI initialization.
Related errors
- ARROW_INTERNAL_ERROR
- JDBC_ERROR
- JDBC driver class not found: {config.getJdbcDriverName()}
- Unknown file system type:
- EMR File System class not found:
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/bd299c4fc4679ccd.
Report an issue: GitHub.