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.
  • Field Details

    • MAX_NUM_LISTSTATUS_THREADS

      public static final int MAX_NUM_LISTSTATUS_THREADS
      See Also:
  • 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.