DistCpOptions (Apache Hadoop Main 3.5.0 API)
Description: declaration: package: org.apache.hadoop.tools, class: DistCpOptions

Package org.apache.hadoop.tools

# Class DistCpOptions

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

@Public @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.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `org.apache.hadoop.tools.DistCpOptions.Builder`
  The builder of the `DistCpOptions`.
  `static enum`
  `DistCpOptions.FileAttribute`
  File attributes for preserve.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `MAX_NUM_LISTSTATUS_THREADS`

- ## Method Summary

  Modifier and Type
  Method
  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<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(DistCpOptions.FileAttribute attribute)`
  Checks if the input attribute should be preserved or not.
  `boolean`
  `shouldSkipCRC()`
  `boolean`
  `shouldSyncFolder()`
  `boolean`
  `shouldUpdateRoot()`
  `boolean`
  `shouldUseDiff()`
  `boolean`
  `shouldUseIterator()`
  `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 Details

  - ### MAX_NUM_LISTSTATUS_THREADS

    public static final int MAX_NUM_LISTSTATUS_THREADS
    See Also:
      - Constant Field Values

- ## Method Details

  - ### 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<DistCpOptions.FileAttribute> getPreserveAttributes()

  - ### shouldPreserve

    public boolean shouldPreserve(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()

  - ### shouldUseIterator

    public boolean shouldUseIterator()

  - ### shouldUpdateRoot

    public boolean shouldUpdateRoot()

  - ### 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.