Package org.apache.hadoop.mapred
Class YarnOutputFiles
java.lang.Object
org.apache.hadoop.mapred.MapOutputFile
org.apache.hadoop.mapred.YarnOutputFiles
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable
@Private
@Unstable
public class YarnOutputFiles
extends org.apache.hadoop.mapred.MapOutputFile
Manipulate the working area for the transient store for maps and reduces.
This class is used by map and reduce tasks to identify the directories that
they need to write to/read from for intermediate files. The callers of
these methods are from child space.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.conf.ConfigurationgetConf()org.apache.hadoop.fs.PathgetInputFile(int mapId) Return a local reduce input file created earlierorg.apache.hadoop.fs.PathgetInputFileForWrite(org.apache.hadoop.mapreduce.TaskID mapId, long size) Create a local reduce input file name.org.apache.hadoop.fs.PathReturn the path to local map output file created earlierorg.apache.hadoop.fs.PathgetOutputFileForWrite(long size) Create a local map output file name.org.apache.hadoop.fs.PathgetOutputFileForWriteInVolume(org.apache.hadoop.fs.Path existing) Create a local map output file name on the same volume.org.apache.hadoop.fs.PathReturn the path to a local map output index file created earlierorg.apache.hadoop.fs.PathgetOutputIndexFileForWrite(long size) Create a local map output index file name.org.apache.hadoop.fs.PathgetOutputIndexFileForWriteInVolume(org.apache.hadoop.fs.Path existing) Create a local map output index file name on the same volume.org.apache.hadoop.fs.PathgetSpillFile(int spillNumber) Return a local map spill file created earlier.org.apache.hadoop.fs.PathgetSpillFileForWrite(int spillNumber, long size) Create a local map spill file name.org.apache.hadoop.fs.PathgetSpillIndexFile(int spillNumber) Return a local map spill index file created earlierorg.apache.hadoop.fs.PathgetSpillIndexFileForWrite(int spillNumber, long size) Create a local map spill index file name.voidRemoves all of the files related to a task.voidsetConf(org.apache.hadoop.conf.Configuration conf)
-
Constructor Details
-
YarnOutputFiles
public YarnOutputFiles()
-
-
Method Details
-
getOutputFile
Return the path to local map output file created earlier- Specified by:
getOutputFilein classorg.apache.hadoop.mapred.MapOutputFile- Returns:
- path
- Throws:
IOException
-
getOutputFileForWrite
Create a local map output file name.- Specified by:
getOutputFileForWritein classorg.apache.hadoop.mapred.MapOutputFile- Parameters:
size- the size of the file- Returns:
- path
- Throws:
IOException
-
getOutputFileForWriteInVolume
public org.apache.hadoop.fs.Path getOutputFileForWriteInVolume(org.apache.hadoop.fs.Path existing) Create a local map output file name on the same volume.- Specified by:
getOutputFileForWriteInVolumein classorg.apache.hadoop.mapred.MapOutputFile
-
getOutputIndexFile
Return the path to a local map output index file created earlier- Specified by:
getOutputIndexFilein classorg.apache.hadoop.mapred.MapOutputFile- Returns:
- path
- Throws:
IOException
-
getOutputIndexFileForWrite
Create a local map output index file name.- Specified by:
getOutputIndexFileForWritein classorg.apache.hadoop.mapred.MapOutputFile- Parameters:
size- the size of the file- Returns:
- path
- Throws:
IOException
-
getOutputIndexFileForWriteInVolume
public org.apache.hadoop.fs.Path getOutputIndexFileForWriteInVolume(org.apache.hadoop.fs.Path existing) Create a local map output index file name on the same volume.- Specified by:
getOutputIndexFileForWriteInVolumein classorg.apache.hadoop.mapred.MapOutputFile
-
getSpillFile
Return a local map spill file created earlier.- Specified by:
getSpillFilein classorg.apache.hadoop.mapred.MapOutputFile- Parameters:
spillNumber- the number- Returns:
- path
- Throws:
IOException
-
getSpillFileForWrite
public org.apache.hadoop.fs.Path getSpillFileForWrite(int spillNumber, long size) throws IOException Create a local map spill file name.- Specified by:
getSpillFileForWritein classorg.apache.hadoop.mapred.MapOutputFile- Parameters:
spillNumber- the numbersize- the size of the file- Returns:
- path
- Throws:
IOException
-
getSpillIndexFile
Return a local map spill index file created earlier- Specified by:
getSpillIndexFilein classorg.apache.hadoop.mapred.MapOutputFile- Parameters:
spillNumber- the number- Returns:
- path
- Throws:
IOException
-
getSpillIndexFileForWrite
public org.apache.hadoop.fs.Path getSpillIndexFileForWrite(int spillNumber, long size) throws IOException Create a local map spill index file name.- Specified by:
getSpillIndexFileForWritein classorg.apache.hadoop.mapred.MapOutputFile- Parameters:
spillNumber- the numbersize- the size of the file- Returns:
- path
- Throws:
IOException
-
getInputFile
Return a local reduce input file created earlier- Specified by:
getInputFilein classorg.apache.hadoop.mapred.MapOutputFile- Parameters:
mapId- a map task id- Returns:
- path
- Throws:
IOException
-
getInputFileForWrite
public org.apache.hadoop.fs.Path getInputFileForWrite(org.apache.hadoop.mapreduce.TaskID mapId, long size) throws IOException Create a local reduce input file name.- Specified by:
getInputFileForWritein classorg.apache.hadoop.mapred.MapOutputFile- Parameters:
mapId- a map task idsize- the size of the file- Returns:
- path
- Throws:
IOException
-
removeAll
Removes all of the files related to a task.- Specified by:
removeAllin classorg.apache.hadoop.mapred.MapOutputFile- Throws:
IOException
-
setConf
public void setConf(org.apache.hadoop.conf.Configuration conf) - Specified by:
setConfin interfaceorg.apache.hadoop.conf.Configurable- Overrides:
setConfin classorg.apache.hadoop.mapred.MapOutputFile
-
getConf
public org.apache.hadoop.conf.Configuration getConf()- Specified by:
getConfin interfaceorg.apache.hadoop.conf.Configurable- Overrides:
getConfin classorg.apache.hadoop.mapred.MapOutputFile
-