public class SimpleCopyListing extends CopyListing
限定符 | 构造器和说明 |
---|---|
protected |
SimpleCopyListing(Configuration configuration,
Credentials credentials)
Protected constructor, to initialize configuration.
|
限定符和类型 | 方法和说明 |
---|---|
void |
doBuildListing(Path pathToListingFile,
DistCpOptions options)
The interface to be implemented by sub-classes, to create the source/target file listing.
|
protected long |
getBytesToCopy()
Return the total bytes that distCp should copy for the source paths
This doesn't consider whether file is same should be skipped during copy
|
protected long |
getNumberOfPaths()
Return the total number of paths to distcp, includes directories as well
This doesn't consider whether file/dir is already present and should be skipped during copy
|
protected boolean |
shouldCopy(Path path,
DistCpOptions options)
Provide an option to skip copy of a path, Allows for exclusion
of files such as
FileOutputCommitter.SUCCEEDED_FILE_NAME |
protected void |
validatePaths(DistCpOptions options)
Validate input and output paths
|
buildListing, getCopyListing, getCredentials, setCredentials
getConf, setConf
protected SimpleCopyListing(Configuration configuration, Credentials credentials)
configuration
- The input configuration, with which the source/target FileSystems may be accessed.credentials
- - Credentials object on which the FS delegation tokens are cached. If null
delegation token caching is skippedprotected void validatePaths(DistCpOptions options) throws IOException, org.apache.hadoop.tools.distcp2.CopyListing.InvalidInputException
CopyListing
validatePaths
在类中 CopyListing
options
- - Input optionsIOException
org.apache.hadoop.tools.distcp2.CopyListing.InvalidInputException
public void doBuildListing(Path pathToListingFile, DistCpOptions options) throws IOException
doBuildListing
在类中 CopyListing
pathToListingFile
- Path on HDFS where the listing file is written.options
- Input Options for DistCp (indicating source/target paths.)IOException
protected boolean shouldCopy(Path path, DistCpOptions options)
FileOutputCommitter.SUCCEEDED_FILE_NAME
path
- - Path being considered for copy while building the file listingoptions
- - Input options passed during DistCp invocationprotected long getBytesToCopy()
getBytesToCopy
在类中 CopyListing
protected long getNumberOfPaths()
getNumberOfPaths
在类中 CopyListing
Copyright © 2009 The Apache Software Foundation