org.apache.hadoop.fs.http.server

## Class FSOperations.FSCreateSnapshot

- java.lang.Object
- - org.apache.hadoop.fs.http.server.FSOperations.FSCreateSnapshot

- All Implemented Interfaces:
    FileSystemAccess.FileSystemExecutor<String>
  Enclosing class:
    FSOperations

      @InterfaceAudience.Private
      public static class FSOperations.FSCreateSnapshot
      extends Object
      implements FileSystemAccess.FileSystemExecutor<String>

  Executor that performs a createSnapshot FileSystemAccess operation.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FSCreateSnapshot(String path, String snapshotName)` Creates a createSnapshot executor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `execute(org.apache.hadoop.fs.FileSystem fs)` Executes the filesystem operation.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FSCreateSnapshot

          public FSCreateSnapshot(String path,
                                  String snapshotName)

      Creates a createSnapshot executor.
      Parameters:
        `path` - directory path to be snapshotted.
        `snapshotName` - the snapshot name.

  - ### Method Detail

    - #### execute

          public String execute(org.apache.hadoop.fs.FileSystem fs)
                         throws IOException

      Executes the filesystem operation.
      Specified by:
        `execute` in interface `FileSystemAccess.FileSystemExecutor<String>`
      Parameters:
        `fs` - filesystem instance to use.
      Returns:
        `Path` the complete path for newly created snapshot
      Throws:
        `IOException` - thrown if an IO error occurred.

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.