{"record":{"id":"6c4710fffa7a761b","repo":"apache/hadoop","slug":"unsupported-block-buffer-name","errorCode":null,"errorMessage":"Unsupported block buffer \"{name}\"","messagePattern":"Unsupported block buffer \"(.+?)\"","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/store/DataBlocks.java","lineNumber":141,"sourceCode":"   * @param keyToBufferDir Key to buffer directory config for a FS.\n   * @param configuration  factory configurations.\n   * @param name           factory name -the option from {@link CommonConfigurationKeys}.\n   * @return the factory, ready to be initialized.\n   * @throws IllegalArgumentException if the name is unknown.\n   */\n  public static BlockFactory createFactory(String keyToBufferDir,\n      Configuration configuration,\n      String name) {\n    LOG.debug(\"Creating DataFactory of type : {}\", name);\n    switch (name) {\n    case DATA_BLOCKS_BUFFER_ARRAY:\n      return new ArrayBlockFactory(keyToBufferDir, configuration);\n    case DATA_BLOCKS_BUFFER_DISK:\n      return new DiskBlockFactory(keyToBufferDir, configuration);\n    case DATA_BLOCKS_BYTEBUFFER:\n      return new ByteBufferBlockFactory(keyToBufferDir, configuration);\n    default:\n      throw new IllegalArgumentException(\"Unsupported block buffer\" +\n          \" \\\"\" + name + '\"');\n    }\n  }\n\n  /**\n   * The output information for an upload.\n   * It can be one of a file, an input stream or a byteArray.\n   * {@link #toByteArray()} method to be used to convert the data into byte\n   * array to be done in this class as well.\n   * When closed, any stream is closed. Any source file is untouched.\n   */\n  public static final class BlockUploadData implements Closeable {\n    private final File file;\n    private InputStream uploadStream;\n    private byte[] byteArray;\n    private boolean isClosed;\n\n    /**","sourceCodeStart":123,"sourceCodeEnd":159,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/store/DataBlocks.java#L123-L159","documentation":"DataBlocks.createFactory selects the upload buffering strategy by name: 'array' (heap byte[] blocks), 'disk' (spill files on local disk) or 'bytebuffer' (direct ByteBuffer blocks). The name comes from filesystem configuration keys such as fs.s3a.fast.upload.buffer. Any other string throws IllegalArgumentException('Unsupported block buffer \"<name>\"').","triggerScenarios":"Setting fs.s3a.fast.upload.buffer (or the equivalent buffering key of another store) to an unknown value: 'memory', 'ByteBuffer' (wrong case), 'disk-buffer', or a value with trailing whitespace.","commonSituations":"Config snippets copied from older or newer Hadoop docs; XML with typos or wrong case; values taken from another store's vocabulary.","solutions":["Set the key to exactly one lowercase value: disk, array or bytebuffer","Prefer 'disk' for large uploads to avoid OutOfMemoryError","Validate the configured value against the allowed set at config load time"],"exampleFix":"<!-- before -->\n<property><name>fs.s3a.fast.upload.buffer</name><value>memory</value></property>\n\n<!-- after -->\n<property><name>fs.s3a.fast.upload.buffer</name><value>disk</value></property>","handlingStrategy":"validation","validationCode":"static boolean isSupportedBlockBuffer(String name) {\n  return Arrays.asList(\n      DataBlocks.DATA_BLOCKS_BUFFER_ARRAY,\n      DataBlocks.DATA_BLOCKS_BUFFER_DISK,\n      DataBlocks.DATA_BLOCKS_BYTEBUFFER).contains(name);\n}\n// use at config load: if (!isSupportedBlockBuffer(conf.get(key))) fail(...);","typeGuard":null,"tryCatchPattern":"Catch IllegalArgumentException from DataBlocks.createFactory during filesystem initialization; the message names the bad value, so surface it with the config key it came from.","preventionTips":["Only use lowercase disk, array, bytebuffer","Lint configuration files for buffer keys before deploy","Prefer 'disk' buffering for large uploads"],"tags":["hadoop","configuration","s3a","upload","buffer","argument-validation"],"backgroundTag":"invalid-configuration-value","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}