org.apache.hadoop.tools

## Class DistCpOptions

- java.lang.Object
- - org.apache.hadoop.tools.DistCpOptions

-     @InterfaceAudience.Public
       @InterfaceStability.Evolving
      public final class DistCpOptions
      extends Object

  The Options class encapsulates all DistCp options. When you add a new option, please: - Add the field along with javadoc in DistCpOptions and its Builder - Add setter method in the `DistCpOptions.Builder` class This class is immutable.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `MAX_NUM_LISTSTATUS_THREADS`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `appendToConf(Configuration conf)` Add options to configuration.
    `Path` | `getAtomicWorkPath()`
    `int` | `getBlocksPerChunk()`
    `int` | `getCopyBufferSize()`
    `String` | `getCopyStrategy()`
    `String` | `getFiltersFile()`
    `String` | `getFromSnapshot()`
    `Path` | `getLogPath()`
    `float` | `getMapBandwidth()`
    `int` | `getMaxMaps()`
    `int` | `getNumListstatusThreads()`
    `Set<org.apache.hadoop.tools.DistCpOptions.FileAttribute>` | `getPreserveAttributes()`
    `Path` | `getSourceFileListing()`
    `List<Path>` | `getSourcePaths()`
    `Path` | `getTargetPath()`
    `String` | `getToSnapshot()`
    `Path` | `getTrackPath()`
    `boolean` | `shouldAppend()`
    `boolean` | `shouldAtomicCommit()`
    `boolean` | `shouldBlock()`
    `boolean` | `shouldDeleteMissing()`
    `boolean` | `shouldDirectWrite()`
    `boolean` | `shouldIgnoreFailures()`
    `boolean` | `shouldOverwrite()`
    `boolean` | `shouldPreserve(org.apache.hadoop.tools.DistCpOptions.FileAttribute attribute)` Checks if the input attribute should be preserved or not.
    `boolean` | `shouldSkipCRC()`
    `boolean` | `shouldSyncFolder()`
    `boolean` | `shouldUseDiff()`
    `boolean` | `shouldUseRdiff()`
    `boolean` | `shouldUseSnapshotDiff()`
    `boolean` | `shouldVerboseLog()`
    `String` | `toString()` Utility to easily string-ify Options, for logging.

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

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

- - ### Field Detail

    - #### MAX_NUM_LISTSTATUS_THREADS

          public static final int MAX_NUM_LISTSTATUS_THREADS

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getSourceFileListing

          public Path getSourceFileListing()

    - #### getSourcePaths

          public List<Path> getSourcePaths()

    - #### getTargetPath

          public Path getTargetPath()

    - #### shouldAtomicCommit

          public boolean shouldAtomicCommit()

    - #### getAtomicWorkPath

          public Path getAtomicWorkPath()

    - #### shouldSyncFolder

          public boolean shouldSyncFolder()

    - #### shouldDeleteMissing

          public boolean shouldDeleteMissing()

    - #### shouldIgnoreFailures

          public boolean shouldIgnoreFailures()

    - #### shouldOverwrite

          public boolean shouldOverwrite()

    - #### shouldAppend

          public boolean shouldAppend()

    - #### shouldSkipCRC

          public boolean shouldSkipCRC()

    - #### shouldBlock

          public boolean shouldBlock()

    - #### shouldUseDiff

          public boolean shouldUseDiff()

    - #### shouldUseRdiff

          public boolean shouldUseRdiff()

    - #### shouldUseSnapshotDiff

          public boolean shouldUseSnapshotDiff()

    - #### getFromSnapshot

          public String getFromSnapshot()

    - #### getToSnapshot

          public String getToSnapshot()

    - #### getFiltersFile

          public String getFiltersFile()

    - #### getLogPath

          public Path getLogPath()

    - #### getCopyStrategy

          public String getCopyStrategy()

    - #### getNumListstatusThreads

          public int getNumListstatusThreads()

    - #### getMaxMaps

          public int getMaxMaps()

    - #### getMapBandwidth

          public float getMapBandwidth()

    - #### getPreserveAttributes

          public Set<org.apache.hadoop.tools.DistCpOptions.FileAttribute> getPreserveAttributes()

    - #### shouldPreserve

          public boolean shouldPreserve(org.apache.hadoop.tools.DistCpOptions.FileAttribute attribute)

      Checks if the input attribute should be preserved or not.
      Parameters:
        `attribute` - - Attribute to check
      Returns:
        True if attribute should be preserved, false otherwise

    - #### getBlocksPerChunk

          public int getBlocksPerChunk()

    - #### getCopyBufferSize

          public int getCopyBufferSize()

    - #### shouldVerboseLog

          public boolean shouldVerboseLog()

    - #### getTrackPath

          public Path getTrackPath()

    - #### shouldDirectWrite

          public boolean shouldDirectWrite()

    - #### appendToConf

          public void appendToConf(Configuration conf)

      Add options to configuration. These will be used in the Mapper/committer
      Parameters:
        `conf` - - Configuration object to which the options need to be added

    - #### toString

          public String toString()

      Utility to easily string-ify Options, for logging.
      Overrides:
        `toString` in class `Object`
      Returns:
        String representation of the Options.

Copyright © 2022 Apache Software Foundation. All rights reserved.