{"record":{"id":"c2cd376f5d32afdb","repo":"apache/hadoop","slug":"unsupported-block-buffer","errorCode":null,"errorMessage":"Unsupported block buffer \"{}\"","messagePattern":"Unsupported block buffer \"(.+?)\"","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-cloud-storage-project/hadoop-huaweicloud/src/main/java/org/apache/hadoop/fs/obs/OBSDataBlocks.java","lineNumber":98,"sourceCode":"  /**\n   * Create a factory.\n   *\n   * @param owner factory owner\n   * @param name  factory name -the option from {@link OBSConstants}.\n   * @return the factory, ready to be initialized.\n   * @throws IllegalArgumentException if the name is unknown.\n   */\n  static BlockFactory createFactory(final OBSFileSystem owner,\n      final String name) {\n    switch (name) {\n    case OBSConstants.FAST_UPLOAD_BUFFER_ARRAY:\n      return new ByteArrayBlockFactory(owner);\n    case OBSConstants.FAST_UPLOAD_BUFFER_DISK:\n      return new DiskBlockFactory(owner);\n    case OBSConstants.FAST_UPLOAD_BYTEBUFFER:\n      return new ByteBufferBlockFactory(owner);\n    default:\n      throw new IllegalArgumentException(\n          \"Unsupported block buffer\" + \" \\\"\" + name + '\"');\n    }\n  }\n\n  /**\n   * Base class for block factories.\n   */\n  abstract static class BlockFactory {\n    /**\n     * OBS file system type.\n     */\n    private final OBSFileSystem owner;\n\n    protected BlockFactory(final OBSFileSystem obsFileSystem) {\n      this.owner = obsFileSystem;\n    }\n\n    /**","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-cloud-storage-project/hadoop-huaweicloud/src/main/java/org/apache/hadoop/fs/obs/OBSDataBlocks.java#L80-L116","documentation":"Thrown by OBSDataBlocks.createFactory when initializing the fast-upload buffering mechanism: the value of fs.obs.fast.upload.buffer does not match any of the three supported block buffer types. The connector only accepts 'array' (heap byte[] blocks), 'disk' (files on local disk), or 'bytebuffer' (off-heap NIO ByteBuffers), so any other string aborts FileSystem initialization with an IllegalArgumentException. It surfaces at initialize()/new OBSFileSystem() time, before any I/O happens.","triggerScenarios":"Setting fs.obs.fast.upload.buffer to a misspelled or unsupported value (e.g. 'arrays', 'ByteBuffer', 'memory', 'heap', or an S3A-style value like 'bytebuffer' with different casing). Also happens when the property is empty/whitespace after someone comments out the intended value, because createFactory is invoked with the raw configured string during OBSFileSystem.initialize.","commonSituations":"Copying S3A configuration (fs.s3a.fast.upload.buffer) into the OBS keys and assuming the same vocabulary; upgrading connector versions where the accepted set changed; XML config typos or trailing spaces in core-site.xml; automated templating tools substituting an empty variable into the property.","solutions":["Set fs.obs.fast.upload.buffer to exactly one of: array, disk, or bytebuffer (lowercase, no quotes/whitespace) in core-site.xml or the Configuration used to instantiate the filesystem","If migrating from S3A, re-check every fs.obs.fast.upload.* property against OBSConstants/OBS documentation instead of copying fs.s3a.* values verbatim","Remove the property entirely to fall back to the documented default (disk buffering) rather than leaving an invalid string","Add a startup assertion or integration test that mounts the OBS filesystem with the production configuration so bad values fail in CI, not at runtime"],"exampleFix":"<!-- before -->\n<property><name>fs.obs.fast.upload.buffer</name><value>arrays</value></property>\n\n<!-- after -->\n<property><name>fs.obs.fast.upload.buffer</name><value>array</value></property>","handlingStrategy":"validation","validationCode":"import java.util.Set;\nimport org.apache.hadoop.conf.Configuration;\n\nSet<String> VALID = Set.of(\"array\", \"disk\", \"bytebuffer\");\n\nvoid checkBufferConfig(Configuration conf) {\n  String v = conf.get(\"fs.obs.fast.upload.buffer\", \"disk\");\n  if (!VALID.contains(v)) {\n    throw new IllegalArgumentException(\n        \"fs.obs.fast.upload.buffer must be one of \" + VALID + \", got: '\" + v + \"'\");\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  FileSystem fs = path.getFileSystem(conf);\n} catch (IllegalArgumentException e) {\n  if (e.getMessage() != null && e.getMessage().contains(\"Unsupported block buffer\")) {\n    // fix fs.obs.fast.upload.buffer, then re-create the FileSystem\n  }\n  throw e;\n}","preventionTips":["Validate fs.obs.* values against OBSConstants at deploy time in a config lint step","Never copy fs.s3a.* values into fs.obs.* keys without checking accepted vocabularies","Add a CI integration test that mounts the OBS filesystem with production configuration"],"tags":["configuration","initialization","invalid-argument","hadoop-obs"],"backgroundTag":"invalid-configuration-value","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}