apache/hadoop · error · UnsupportedOperationException

Append is not supported

Error message

Append is not supported

What it means

Error "Append is not supported" thrown in apache/hadoop.

Source

Thrown at hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/impl/CreateFileBuilder.java:162

    rejectUnknownMandatoryKeys(keysToValidate, CREATE_FILE_KEYS, "for " + path);

    // look for headers

    for (Map.Entry<String, String> option : options) {
      String key = option.getKey();
      if (key.startsWith(headerPrefix) && key.length() > prefixLen) {
        headers.put(key.substring(prefixLen), option.getValue());
      }
    }

    // and add the mimetype
    if (options.get(FS_OPTION_CREATE_CONTENT_TYPE, null) != null)  {
      headers.put(CONTENT_TYPE, options.get(FS_OPTION_CREATE_CONTENT_TYPE, null));
    }

    EnumSet<CreateFlag> flags = getFlags();
    if (flags.contains(CreateFlag.APPEND)) {
      throw new UnsupportedOperationException("Append is not supported");
    }

    if (!flags.contains(CreateFlag.CREATE) &&
        !flags.contains(CreateFlag.OVERWRITE)) {
      throw new PathIOException(path.toString(),
          "Must specify either create or overwrite");
    }

    // build the other switches
    if (isRecursive()) {
      createFileSwitches.add(Recursive);
    }
    if (Performance.isEnabled(options)) {
      createFileSwitches.add(Performance);
    }
    if (CreateMultipart.isEnabled(options)) {
      createFileSwitches.add(CreateMultipart);
    }

View on GitHub (pinned to 2add963021)

Solutions

  1. S3A does not support append; create a new file or rewrite the whole object instead.

When it happens

Trigger: Thrown at hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/impl/CreateFileBuilder.java:162 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22). Data as JSON: /api/errors/5b8b9ddd2932c12a. Report an issue: GitHub.