{"record":{"id":"bd299c4fc4679ccd","repo":"prestodb/presto","slug":"could-not-create-hudi-connector-for-catalog","errorCode":null,"errorMessage":"Could not create hudi connector for catalog ","messagePattern":"Could not create hudi connector for catalog ","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"critical","filePath":"presto-hudi/src/main/java/com/facebook/presto/hudi/HudiConnectorFactory.java","lineNumber":105,"sourceCode":"                    new HiveMetastoreModule(catalogName, metastore),\n                    new CachingModule(),\n                    new HiveCommonModule(),\n                    binder -> {\n                        binder.bind(NodeVersion.class).toInstance(new NodeVersion(context.getNodeManager().getCurrentNode().getVersion()));\n                        binder.bind(NodeManager.class).toInstance(context.getNodeManager());\n                        binder.bind(TypeManager.class).toInstance(context.getTypeManager());\n                        binder.bind(PageIndexerFactory.class).toInstance(context.getPageIndexerFactory());\n                    });\n\n            return app\n                    .doNotInitializeLogging()\n                    .setRequiredConfigurationProperties(config)\n                    .initialize()\n                    .getInstance(Connector.class);\n        }\n        catch (Exception e) {\n            throwIfUnchecked(e);\n            throw new RuntimeException(\"Could not create hudi connector for catalog \" + catalogName, e);\n        }\n    }\n}\n","sourceCodeStart":87,"sourceCodeEnd":109,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-hudi/src/main/java/com/facebook/presto/hudi/HudiConnectorFactory.java#L87-L109","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before (etc/catalog/hudi.properties)\nhive.metastore.uri=thrift://localhost\n// after (complete, valid config)\nhive.metastore.uri=thrift://metastore.internal.example.com:9083","handlingStrategy":"try-catch","validationCode":"// validate catalog config before creating the connector\nProperties props = loadCatalogProperties(\"hudi\");\nSet<String> required = ImmutableSet.of(\"hive.metastore.uri\");\nSet<String> missing = Sets.difference(required, props.stringPropertyNames());\nif (!missing.isEmpty()) {\n    throw new IllegalArgumentException(\"Missing hudi catalog properties: \" + missing);\n}","typeGuard":"boolean isHudiCatalogConfigValid(Map<String,String> config) {\n    return config != null\n        && config.containsKey(\"hive.metastore.uri\")\n        && !config.containsKey(\"\"); // no empty keys from typos\n}","tryCatchPattern":"try {\n    Connector c = connectorFactory.create(catalogName, config, context);\n} catch (RuntimeException e) {\n    if (e.getMessage() != null && e.getMessage().startsWith(\"Could not create hudi connector\")) {\n        log.error(\"Hudi catalog '{}' failed to initialize. Root cause:\", catalogName, e.getCause());\n    }\n    throw e;\n}","preventionTips":["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"],"tags":["hudi","connector","configuration","startup"],"backgroundTag":"connector-initialization-failed","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}