{"record":{"id":"7a5db2ad8a63fe2b","repo":"seaweedfs/seaweedfs","slug":"not-implemented-by-the-getsimplename-filesystem","errorCode":null,"errorMessage":"Not implemented by the {getSimpleName} FileSystem implementation","messagePattern":"Not implemented by the (.+?) FileSystem implementation","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"other/java/hdfs3/src/main/java/seaweed/hdfs/SeaweedFileSystem.java","lineNumber":338,"sourceCode":"        seaweedFileSystemStore.setPermission(path, permission);\n    }\n\n    Path qualify(Path path) {\n        return path.makeQualified(uri, workingDirectory);\n    }\n\n    /**\n     * Concat existing files together.\n     *\n     * @param trg   the path to the target destination.\n     * @param psrcs the paths to the sources to use for the concatenation.\n     * @throws IOException                   IO failure\n     * @throws UnsupportedOperationException if the operation is unsupported\n     *                                       (default).\n     */\n    @Override\n    public void concat(final Path trg, final Path[] psrcs) throws IOException {\n        throw new UnsupportedOperationException(\"Not implemented by the \" +\n                getClass().getSimpleName() + \" FileSystem implementation\");\n    }\n\n    /**\n     * Truncate the file in the indicated path to the indicated size.\n     * <ul>\n     * <li>Fails if path is a directory.</li>\n     * <li>Fails if path does not exist.</li>\n     * <li>Fails if path is not closed.</li>\n     * <li>Fails if new size is greater than current size.</li>\n     * </ul>\n     *\n     * @param f         The path to the file to be truncated\n     * @param newLength The size the file is to be truncated to\n     * @return <code>true</code> if the file has been truncated to the desired\n     *         <code>newLength</code> and is immediately available to be reused for\n     *         write operations such as <code>append</code>, or\n     *         <code>false</code> if a background process of adjusting the length of","sourceCodeStart":320,"sourceCodeEnd":356,"githubUrl":"https://github.com/seaweedfs/seaweedfs/blob/1c926e8fac8e8001ce25efa1027c90b02b4a1804/other/java/hdfs3/src/main/java/seaweed/hdfs/SeaweedFileSystem.java#L320-L356","documentation":"UnsupportedOperationException thrown unconditionally by SeaweedFileSystem.concat() (seaweed.hdfs.SeaweedFileSystem:338): the Hadoop FileSystem concat operation (append source files onto a target and delete sources atomically) is simply not implemented by this filesystem. Any caller of concat on a seaweedfs:// URI gets this immediately — it is deterministic, not environmental.","triggerScenarios":"Calling fs.concat(trg, psrcs) on a SeaweedFileSystem; higher-level utilities that invoke concat, e.g. FileUtil.concat, distcp/HDFS shell 'hdfs dfs -concat' style flows, or frameworks that merge small part-files via concat (some HBase/MapReduce rollup and file-compaction utilities).","commonSituations":"Porting HDFS-native pipelines (which rely on cheap concat) to SeaweedFS; data compaction jobs that expect the target's blocks to be reused; tooling upgrades that started calling concat where it previously copied.","solutions":["Replace concat with copy-based merging: open each source via fs.open, copy bytes into an append/create stream on the target, then fs.delete the sources.","If performance matters, do the merge with filesystem-level parallelism or keep files unmerged and merge on read.","Longer term: request/implement concat support in the SeaweedFS filer client rather than subclassing to fake it."],"exampleFix":"// before\nfs.concat(new Path(\"/out/merged\"), srcPaths); // UnsupportedOperationException\n\n// after — manual merge, then delete sources\ntry (FSDataOutputStream out = fs.create(new Path(\"/out/merged\"), true)) {\n    for (Path src : srcPaths) {\n        try (FSDataInputStream in = fs.open(src)) {\n            org.apache.hadoop.io.IOUtils.copyBytes(in, out, 1 << 16, false);\n        }\n    }\n}\nfor (Path src : srcPaths) fs.delete(src, false);","handlingStrategy":"fallback","validationCode":"boolean supportsConcat(FileSystem fs) {\n    return !(fs instanceof seaweed.hdfs.SeaweedFileSystem)\n        && !\"seaweedfs\".equals(fs.getUri().getScheme());\n}","typeGuard":"boolean canConcat = !(fs instanceof seaweed.hdfs.SeaweedFileSystem);","tryCatchPattern":"try {\n    fs.concat(trg, srcs);\n} catch (UnsupportedOperationException e) {\n    // NOTE: UOE is a RuntimeException — a bare catch(IOException) will NOT stop it\n    mergeByCopy(fs, trg, srcs);\n}","preventionTips":["Assume concat is optional in the Hadoop FileSystem contract; always have a copy-based merge fallback.","Capability-check via instanceof/scheme before calling concat on mixed-storage pipelines.","Remember UnsupportedOperationException is unchecked: it bypasses catch(IOException) blocks and can kill mappers/reducers mid-task."],"tags":["java","hadoop","seaweedfs","unsupported-operation","concat","filesystem"],"backgroundTag":null,"analyzedSha":"1c926e8fac8e8001ce25efa1027c90b02b4a1804","analyzedAt":"2026-08-15T15:37:02.018Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}