|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.mapred.OutputFormatBase
public abstract class OutputFormatBase
A base class for OutputFormat
.
Constructor Summary | |
---|---|
OutputFormatBase()
|
Method Summary | |
---|---|
void |
checkOutputSpecs(FileSystem ignored,
JobConf job)
Check whether the output specification for a job is appropriate. |
static boolean |
getCompressOutput(JobConf conf)
Is the reduce output compressed? |
static Class |
getOutputCompressorClass(JobConf conf,
Class defaultValue)
Get the codec for compressing the reduce outputs |
abstract RecordWriter |
getRecordWriter(FileSystem ignored,
JobConf job,
String name,
Progressable progress)
Construct a RecordWriter with Progressable. |
static void |
setCompressOutput(JobConf conf,
boolean val)
Set whether the output of the reduce is compressed |
static void |
setOutputCompressorClass(JobConf conf,
Class codecClass)
Set the given class as the output compression codec. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OutputFormatBase()
Method Detail |
---|
public static void setCompressOutput(JobConf conf, boolean val)
val
- the new settingpublic static boolean getCompressOutput(JobConf conf)
public static void setOutputCompressorClass(JobConf conf, Class codecClass)
conf
- the JobConf to modifycodecClass
- the CompressionCodec class that will compress the
reduce outputspublic static Class getOutputCompressorClass(JobConf conf, Class defaultValue)
conf
- the Configuration to look indefaultValue
- the value to return if it is not set
IllegalArgumentException
- if the class was specified, but not foundpublic abstract RecordWriter getRecordWriter(FileSystem ignored, JobConf job, String name, Progressable progress) throws IOException
OutputFormat
RecordWriter
with Progressable.
getRecordWriter
in interface OutputFormat
job
- the job whose output is being writtenname
- the unique name for this part of the outputprogress
- mechanism for reporting progress while writing to file
RecordWriter
IOException
public void checkOutputSpecs(FileSystem ignored, JobConf job) throws FileAlreadyExistsException, InvalidJobConfException, IOException
OutputFormat
checkOutputSpecs
in interface OutputFormat
job
- the job whose output will be written
IOException
- when output should not be attempted
FileAlreadyExistsException
InvalidJobConfException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |