Package org.apache.hadoop.tools
Class DistCpOptions
java.lang.Object
org.apache.hadoop.tools.DistCpOptions
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 ClassesModifier and TypeClassDescriptionstatic classorg.apache.hadoop.tools.DistCpOptions.BuilderThe builder of theDistCpOptions.static enumFile attributes for preserve. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidappendToConf(Configuration conf) Add options to configuration.intintfloatintintbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanshouldPreserve(DistCpOptions.FileAttribute attribute) Checks if the input attribute should be preserved or not.booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleantoString()Utility to easily string-ify Options, for logging.
-
Field Details
-
MAX_NUM_LISTSTATUS_THREADS
public static final int MAX_NUM_LISTSTATUS_THREADS- See Also:
-
-
Method Details
-
getSourceFileListing
-
getSourcePaths
-
getTargetPath
-
shouldAtomicCommit
public boolean shouldAtomicCommit() -
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
-
getToSnapshot
-
getFiltersFile
-
getLogPath
-
getCopyStrategy
-
getNumListstatusThreads
public int getNumListstatusThreads() -
getMaxMaps
public int getMaxMaps() -
getMapBandwidth
public float getMapBandwidth() -
getPreserveAttributes
-
shouldPreserve
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
-
shouldDirectWrite
public boolean shouldDirectWrite() -
shouldUseIterator
public boolean shouldUseIterator() -
shouldUpdateRoot
public boolean shouldUpdateRoot() -
appendToConf
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
Utility to easily string-ify Options, for logging.
-