Manipulate the working area for the transient store for maps and reduces.
| Method from org.apache.hadoop.mapred.MapOutputFile Detail: |
public void cleanupStorage() throws IOException {
conf.deleteLocalFiles();
}
Removes all contents of temporary storage. Called upon
startup, to remove any leftovers from previous run. |
public Path getInputFile(int mapId,
String reduceTaskId) throws IOException {
// TODO *oom* should use a format here
return lDirAlloc.getLocalPathToRead(reduceTaskId + "/map_"+mapId+".out",
conf);
}
Return a local reduce input file created earlier |
public Path getInputFileForWrite(int mapId,
String reduceTaskId,
long size) throws IOException {
// TODO *oom* should use a format here
return lDirAlloc.getLocalPathForWrite(reduceTaskId + "/map_"+mapId+".out",
size, conf);
}
Create a local reduce input file name. |
public Path getOutputFile(String mapTaskId) throws IOException {
return lDirAlloc.getLocalPathToRead(mapTaskId+"/file.out", conf);
}
Return the path to local map output file created earlier |
public Path getOutputFileForWrite(String mapTaskId,
long size) throws IOException {
return lDirAlloc.getLocalPathForWrite(mapTaskId+"/file.out", size, conf);
}
Create a local map output file name. |
public Path getOutputIndexFile(String mapTaskId) throws IOException {
return lDirAlloc.getLocalPathToRead(mapTaskId + "/file.out.index", conf);
}
Return the path to a local map output index file created earlier |
public Path getOutputIndexFileForWrite(String mapTaskId,
long size) throws IOException {
return lDirAlloc.getLocalPathForWrite(mapTaskId + "/file.out.index",
size, conf);
}
Create a local map output index file name. |
public Path getSpillFile(String mapTaskId,
int spillNumber) throws IOException {
return lDirAlloc.getLocalPathToRead(mapTaskId+"/spill" +spillNumber+".out",
conf);
}
Return a local map spill file created earlier. |
public Path getSpillFileForWrite(String mapTaskId,
int spillNumber,
long size) throws IOException {
return lDirAlloc.getLocalPathForWrite(mapTaskId+
"/spill" +spillNumber+".out",
size, conf);
}
Create a local map spill file name. |
public Path getSpillIndexFile(String mapTaskId,
int spillNumber) throws IOException {
return lDirAlloc.getLocalPathToRead(
mapTaskId+"/spill" +spillNumber+".out.index", conf);
}
Return a local map spill index file created earlier |
public Path getSpillIndexFileForWrite(String mapTaskId,
int spillNumber,
long size) throws IOException {
return lDirAlloc.getLocalPathForWrite(
mapTaskId+"/spill" +spillNumber+".out.index", size, conf);
}
Create a local map spill index file name. |
public void removeAll(String taskId) throws IOException {
conf.deleteLocalFiles(taskId);
}
Removes all of the files related to a task. |
public void setConf(Configuration conf) {
if (conf instanceof JobConf) {
this.conf = (JobConf) conf;
} else {
this.conf = new JobConf(conf);
}
}
|