public class SequentialFileNamingScheme extends Object implements FileNamingScheme
FileNamingScheme
that uses an incrementing sequence number in
order to generate unique file names.Modifier and Type | Method and Description |
---|---|
static SequentialFileNamingScheme |
getInstance() |
String |
getMapOutputName(org.apache.hadoop.conf.Configuration configuration,
org.apache.hadoop.fs.Path outputDirectory)
Get the output file name for a map task.
|
String |
getReduceOutputName(org.apache.hadoop.conf.Configuration configuration,
org.apache.hadoop.fs.Path outputDirectory,
int partitionId)
Get the output file name for a reduce task.
|
public static SequentialFileNamingScheme getInstance()
public String getMapOutputName(org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.fs.Path outputDirectory) throws IOException
FileNamingScheme
getMapOutputName
in interface FileNamingScheme
configuration
- The configuration of the job for which the map output
is being writtenoutputDirectory
- The directory where the output will be writtenIOException
- if an exception occurs while accessing the output file
systempublic String getReduceOutputName(org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.fs.Path outputDirectory, int partitionId) throws IOException
FileNamingScheme
getReduceOutputName
in interface FileNamingScheme
configuration
- The configuration of the job for which output is being
writtenoutputDirectory
- The directory where the file will be writtenpartitionId
- The partition of the reduce task being outputIOException
- if an exception occurs while accessing output file
systemCopyright © 2016 The Apache Software Foundation. All rights reserved.