apache/hadoop · error · UnsupportedOperationException

Rename is not supported in pseudo local file system.

Error message

Rename is not supported in pseudo local file system.

What it means

PseudoLocalFs.rename() unconditionally throws UnsupportedOperationException. Files in the pseudo local file system have no stored state to move — their identity (name plus encoded size) fully determines their content — so renaming is not implemented. The class only supports validation-style create, open for reading, and metadata queries.

Source

Thrown at hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/PseudoLocalFs.java:317

    }
  }

  @Override
  public FSDataOutputStream append(Path path, int bufferSize,
      Progressable progress) throws IOException {
    throw new UnsupportedOperationException("Append is not supported"
        + " in pseudo local file system.");
  }

  @Override
  public boolean mkdirs(Path f, FsPermission permission) throws IOException {
    throw new UnsupportedOperationException("Mkdirs is not supported"
        + " in pseudo local file system.");
  }

  @Override
  public boolean rename(Path src, Path dst) throws IOException {
    throw new UnsupportedOperationException("Rename is not supported"
        + " in pseudo local file system.");
  }

  @Override
  public boolean delete(Path path, boolean recursive) {
    throw new UnsupportedOperationException("File deletion is not supported "
        + "in pseudo local file system.");
  }

  @Override
  public void setWorkingDirectory(Path newDir) {
    throw new UnsupportedOperationException("SetWorkingDirectory "
        + "is not supported in pseudo local file system.");
  }

  @Override
  public Path makeQualified(Path path) {
    // skip FileSystem#checkPath() to validate some other Filesystems

View on GitHub (pinned to 2add963021)

Solutions

  1. Never use pseudo:/// as a rename source or destination; keep outputs on a real FileSystem
  2. If you need a differently-sized generated file, create a new pseudo-local path with the new name/size instead of renaming
  3. Skip rename for pseudo scheme via a capability check on fs.getUri().getScheme()
Defensive patterns

Strategy: try-catch

Validate before calling

if ("pseudo".equals(fs.getUri().getScheme())) {
  // rename unsupported: create a new pseudo path with the new name instead
}

Try / catch

try {
  fs.rename(src, dst);
} catch (UnsupportedOperationException e) {
  // commit/atomic-move logic must not run against pseudo:///; use a real FS
}

Prevention

When it happens

Trigger: Calling FileSystem.rename(Path, Path) against PseudoLocalFs; output-commit protocols that rename temporary files into final locations (FileOutputCommitter move logic) when the destination is pseudo:///; any commit or atomic-move utility pointed at pseudo-local paths.

Common situations: Configuring gridmix or custom jobs to write output to pseudo:// paths; test code that exercises commit logic against a mock/pseudo file system; copy utilities that rename as part of atomic upload.

Related errors


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