{"record":{"id":"b318a5a54afd3a6c","repo":"apache/seatunnel","slug":"error-while-checking-whether-table-exists-under-pa","errorCode":null,"errorMessage":"Error while checking whether table exists under path:${basePath}","messagePattern":"Error while checking whether table exists under path:(.+?)","errorType":"exception","errorClass":"CatalogException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-hudi/src/main/java/org/apache/seatunnel/connectors/seatunnel/hudi/catalog/HudiCatalog.java","lineNumber":173,"sourceCode":"                    .map(fileStatus -> fileStatus.getPath().getName())\n                    .collect(Collectors.toList());\n        } catch (IOException e) {\n            throw new CatalogException(\n                    String.format(\"Listing table in database %s exception.\", dbPath), e);\n        }\n    }\n\n    @Override\n    public boolean tableExists(TablePath tablePath) throws CatalogException {\n        String basePath = inferTablePath(tableParentDfsPathStr, tablePath);\n        try {\n            return fs.exists(new Path(basePath, HoodieTableMetaClient.METAFOLDER_NAME))\n                    && fs.exists(\n                            new Path(\n                                    new Path(basePath, HoodieTableMetaClient.METAFOLDER_NAME),\n                                    HoodieTableConfig.HOODIE_PROPERTIES_FILE));\n        } catch (IOException e) {\n            throw new CatalogException(\n                    \"Error while checking whether table exists under path:\" + basePath, e);\n        }\n    }\n\n    @Override\n    public CatalogTable getTable(TablePath tablePath)\n            throws CatalogException, TableNotExistException {\n        if (!tableExists(tablePath)) {\n            throw new TableNotExistException(name(), tablePath);\n        }\n        HoodieTableMetaClient hoodieTableMetaClient =\n                HoodieTableMetaClient.builder()\n                        .setBasePath(inferTablePath(tableParentDfsPathStr, tablePath))\n                        .setConf(HadoopFSUtils.getStorageConfWithCopy(hadoopConf))\n                        .build();\n        HoodieTableType tableType = hoodieTableMetaClient.getTableType();\n        HoodieTableConfig tableConfig = hoodieTableMetaClient.getTableConfig();\n        TableSchema tableSchema = convertSchema(TableSchema.builder(), tableConfig);","sourceCodeStart":155,"sourceCodeEnd":191,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-hudi/src/main/java/org/apache/seatunnel/connectors/seatunnel/hudi/catalog/HudiCatalog.java#L155-L191","documentation":"HudiCatalog.tableExists() wraps IOException from checking for the .hoodie metadata folder and hoodie.properties file under the table base path. Existence is determined by the presence of these Hudi metadata files; a filesystem I/O failure is reported as a CatalogException rather than returning false, to avoid silently claiming a table does not exist.","triggerScenarios":"Calling tableExists(tablePath) (directly or indirectly via getTable/dropTable) when fs.exists() on <basePath>/.hoodie/hoodie.properties throws IOException: filesystem unavailable, permission errors, or transient cloud-storage failures.","commonSituations":"S3/OSS throttling or expired credentials; HDFS NameNode hiccup; Kerberos/permission misconfiguration preventing path stat; wrong basePath derived from tableParentDfsPathStr so the path lookup fails.","solutions":["Check filesystem availability and credentials; retry the call once the environment is healthy.","Verify the table path passed matches the actual Hudi table location (base path containing .hoodie/hoodie.properties).","Fix permission settings (Kerberos/login user) so the connector user can stat the path.","Inspect the wrapped IOException cause in the stack trace for the concrete storage error."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Java\norg.apache.hadoop.fs.FileSystem fs = org.apache.hadoop.fs.FileSystem.get(conf);\nboolean ok = fs.exists(new Path(basePath, \".hoodie/hoodie.properties\"));","typeGuard":null,"tryCatchPattern":"// Java\ntry {\n    boolean exists = catalog.tableExists(tablePath);\n} catch (CatalogException e) {\n    Throwable c = e.getCause();\n    if (c instanceof IOException) { /* storage issue: check creds, retry */ }\n    throw e;\n}","preventionTips":["Validate the table base path contains .hoodie/hoodie.properties before catalog operations.","Keep storage credentials refreshed for long-running jobs.","Use consistent table_parent_dfs_path so basePath inference is correct.","Treat false from tableExists and CatalogException differently: false = missing table, exception = storage problem."],"tags":["hadoop","filesystem","io","hudi"],"backgroundTag":"file-read-failed","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}