apache/beam · error · UnsupportedOperationException

Support for move options is not yet implemented.

Error message

Support for move options is not yet implemented.

What it means

AzureBlobStoreFileSystem.rename() implements move as copy-then-delete and explicitly rejects any MoveOptions arguments with an UnsupportedOperationException. Beam's filesystem contract allows callers to pass move options, but this implementation has not implemented them. The rename itself still works when moveOptions is empty.

Solutions

  1. Call rename/copy+delete without any MoveOptions arguments.
  2. If you need option semantics (e.g. ignore missing sources), pre-check existence yourself and filter the path list before calling rename.
  3. Implement the move with explicit copy() then delete() calls in your own code.
  4. Track/patch the Beam connector to add MoveOptions support if it is a hard requirement.

Example fix

// before
FileSystems.rename(srcList, dstList, MoveOptions.IgnoreMissingSubscriptions); // throws
// after
FileSystems.rename(srcList, dstList); // no move options
Defensive patterns

Strategy: try-catch

Try / catch

try {
  FileSystems.rename(srcIds, dstIds, moveOptions);
} catch (UnsupportedOperationException e) {
  // azfs backend: fall back to rename without options
  FileSystems.rename(srcIds, dstIds);
}

Prevention

When it happens

Trigger: Calling FileSystems.rename(src, dest, SomeMoveOptions...) — or any API that forwards move options (e.g. rename with ignore-missing-subdirs style options) — against an azfs filesystem.

Common situations: Generic Beam pipeline code that passes MoveOptions regardless of the underlying filesystem; newer Beam code using MoveOptions.IgnoreMissingSubscriptions / standard cleanup options being pointed at Azure storage.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


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

Appendix: source

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

          "Copying blobs requires that a SAS token, connection string, or account key be provided.");
    }

    try {
      CloudStorageAccount storageAccount = CloudStorageAccount.parse(storageConnectionString);
      return "?" + storageAccount.generateSharedAccessSignature(sharedAccessAccountPolicy);
    } catch (Exception e) {
      throw (IOException) e.getCause();
    }
  }

  @Override
  protected void rename(
      List<AzfsResourceId> srcResourceIds,
      List<AzfsResourceId> destResourceIds,
      MoveOptions... moveOptions)
      throws IOException {
    if (moveOptions.length > 0) {
      throw new UnsupportedOperationException("Support for move options is not yet implemented.");
    }
    copy(srcResourceIds, destResourceIds);
    delete(srcResourceIds);
  }

  /** This method will delete a virtual folder or a blob, not a container. */
  @Override
  protected void delete(Collection<AzfsResourceId> resourceIds) throws IOException {
    for (AzfsResourceId resourceId : resourceIds) {
      if (resourceId.getBlob() == null) {
        throw new IOException("delete does not delete containers.");
      }

      BlobContainerClient container =
          client.get().getBlobContainerClient(resourceId.getContainer());

      // deleting a blob that is not a directory
      if (!resourceId.isDirectory()) {

View on GitHub (pinned to 12126d8942)