apache/beam · error · UnsupportedOperationException

Unexpected StandardResolveOptions

Error message

Unexpected StandardResolveOptions [%s]

What it means

AzfsResourceId.resolve only supports the standard resolution behaviors; when given StandardResolveOptions other than the expected ones it throws UnsupportedOperationException('Unexpected StandardResolveOptions [%s]'). The Azure blobstore filesystem cannot resolve the resource id with the supplied options.

Solutions

  1. Check the resolveOptions value in the message and avoid operations that request unsupported options.
  2. Use blob-object paths directly (fromBlobPath) instead of generic resolve with special options.
  3. Avoid glob/directory semantics on azure:// paths that the Azure filesystem doesn't implement.
  4. Upgrade Beam — newer versions may support more resolve options for Azure.

Example fix

// before
ResourceIds.matchResource("azure://acct.container/dir/*") // triggers resolve with unsupported options
// after
ResourceIds.matchResource("azure://acct.container/dir/") // use supported resolution semantics
Defensive patterns

Strategy: validation

Validate before calling

// only use resolve options known to be supported by AzfsResourceId
// avoid EMPTY_DIRECTORY style options on azure:// resource ids

Try / catch

try {
  ResourceId resolved = azurePath.resolve(name, options);
} catch (UnsupportedOperationException e) {
  if (e.getMessage().startsWith("Unexpected StandardResolveOptions")) {
    // fall back to direct fromBlobPath construction
  }
}

Prevention

When it happens

Trigger: Calling resolve(path, resolveOptions) on an AzfsResourceId with a StandardResolveOptions value outside the handled set (e.g., empty-directory resolution semantics not implemented for Azure blob layout).

Common situations: Filesystem operations (match/globbing, directory moves) that request resolve options unsupported by the Azure filesystem, Beam FileSystems default operations interacting with azure:// paths in ways the AzfsResourceId doesn't implement.

Related errors


AI-assisted analysis of apache/beam@12126d8942 (2026-09-13). Data as JSON: /api/errors/b73811f49f62d755. Report an issue: GitHub.

Appendix: source

Thrown at sdks/java/io/azure/src/main/java/org/apache/beam/sdk/io/azure/blobstore/AzfsResourceId.java:231

      }
      if (blob == null) {
        return fromComponents(account, container, other);
      }
      return fromComponents(account, container, blob + other);
    }
    if (resolveOptions == ResolveOptions.StandardResolveOptions.RESOLVE_FILE) {
      checkArgument(
          !other.endsWith("/"), "Cannot resolve a file with a directory path: [%s]", other);
      checkArgument(!"..".equals(other), "Cannot resolve parent as file: [%s]", other);
      if (AZFS_URI.matcher(other).matches()) {
        return fromUri(other);
      }
      if (blob == null) {
        return fromComponents(account, container, other);
      }
      return fromComponents(account, container, blob + other);
    }
    throw new UnsupportedOperationException(
        String.format("Unexpected StandardResolveOptions [%s]", resolveOptions));
  }
}

View on GitHub (pinned to 12126d8942)