apache/hadoop · error · IllegalArgumentException

Invalid format (Expected name, name:SignerClass, name:Signer

Error message

Invalid format (Expected name, name:SignerClass, name:SignerClass:SignerInitializerClass) for CustomSigner: [{customSigner}]

What it means

At filesystem initialization SignerManager parses fs.s3a.custom.signers, a comma-separated list where each entry must have 1-3 colon-separated parts: 'name' (predefined signer reference), 'name:SignerClass', or 'name:SignerClass:SignerInitializerClass'. Any other part count is a configuration-format error and the manager throws IllegalArgumentException immediately rather than guessing.

Source

Thrown at hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/auth/SignerManager.java:79

   * Initialize custom signers and register them with the AWS SDK.
   *
   */
  public void initCustomSigners() {
    String[] customSigners = ownerConf.getTrimmedStrings(CUSTOM_SIGNERS);
    if (customSigners == null || customSigners.length == 0) {
      // No custom signers specified, nothing to do.
      LOG.debug("No custom signers specified");
      return;
    }

    for (String customSigner : customSigners) {
      String[] parts = customSigner.split(":");
      if (!(parts.length == 1 || parts.length == 2 || parts.length == 3)) {
        String message = "Invalid format (Expected name, name:SignerClass,"
            + " name:SignerClass:SignerInitializerClass)"
            + " for CustomSigner: [" + customSigner + "]";
        LOG.error(message);
        throw new IllegalArgumentException(message);
      }
      if (parts.length == 1) {
        // Nothing to do. Trying to use a pre-defined Signer
      } else {
        // Register any custom Signer
        maybeRegisterSigner(parts[0], parts[1], ownerConf);

        // If an initializer is specified, take care of instantiating it and
        // setting it up
        if (parts.length == 3) {
          Class<? extends AwsSignerInitializer> clazz = null;
          try {
            clazz = (Class<? extends AwsSignerInitializer>) ownerConf
                .getClassByName(parts[2]);
          } catch (ClassNotFoundException e) {
            throw new RuntimeException(String.format(
                "SignerInitializer class" + " [%s] not found for signer [%s]",
                parts[2], parts[0]), e);

View on GitHub (pinned to 2add963021)

Solutions

  1. Fix each entry to exactly 1-3 colon-separated parts: MySigner, MySigner:com.example.MySigner, or MySigner:com.example.MySigner:com.example.MySignerInitializer
  2. Separate multiple custom signers with commas: fs.s3a.custom.signers=One:com.foo.S1,Two:com.foo.S2
  3. Remove empty entries (dangling commas) which produce blank strings

Example fix

<!-- before -->
<property><name>fs.s3a.custom.signers</name>
  <value>MySigner:com.example.MySigner;com.example.MyInit;Other</value></property>

<!-- after -->
<property><name>fs.s3a.custom.signers</name>
  <value>MySigner:com.example.MySigner:com.example.MySignerInit,Other</value></property>
Defensive patterns

Strategy: validation

Validate before calling

for (String entry : conf.getTrimmedStrings("fs.s3a.custom.signers")) {
  if (entry == null || entry.isEmpty()) continue;
  int parts = entry.split(":").length;
  if (parts < 1 || parts > 3) {
    throw new IllegalArgumentException("Bad fs.s3a.custom.signers entry (need 1-3 colon parts): " + entry);
  }
}

Type guard

static boolean isValidCustomSignerEntry(String entry) {
  if (entry == null || entry.isEmpty()) return false;
  int n = entry.split(":").length;
  return n >= 1 && n <= 3;
}

Prevention

When it happens

Trigger: An entry like 'MySigner:com.example.MySigner:com.example.MyInit:extra' (4 parts), or a mangled entry where multiple signers were joined with colons/semicolons instead of commas so getTrimmedStrings returns one long string with many colons.

Common situations: Hand-editing core-site.xml; assuming semicolon separators between signers (the property is comma-split); concatenating entries when merging configs; trailing separators creating empty segments.

Related errors


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