@InterfaceAudience.Public @InterfaceStability.Stable public class SequenceFileAsBinaryOutputFormat extends SequenceFileOutputFormat<BytesWritable,BytesWritable>
OutputFormat
that writes keys,
values to SequenceFile
s in binary(raw) formatModifier and Type | Field and Description |
---|---|
static String |
KEY_CLASS |
static String |
VALUE_CLASS |
BASE_OUTPUT_NAME, COMPRESS, COMPRESS_CODEC, COMPRESS_TYPE, OUTDIR, PART
Constructor and Description |
---|
SequenceFileAsBinaryOutputFormat() |
Modifier and Type | Method and Description |
---|---|
void |
checkOutputSpecs(JobContext job)
Check for validity of the output-specification for the job.
|
RecordWriter<BytesWritable,BytesWritable> |
getRecordWriter(TaskAttemptContext context)
Get the
RecordWriter for the given task. |
static Class<? extends WritableComparable> |
getSequenceFileOutputKeyClass(JobContext job)
Get the key class for the
SequenceFile |
static Class<? extends Writable> |
getSequenceFileOutputValueClass(JobContext job)
Get the value class for the
SequenceFile |
static void |
setSequenceFileOutputKeyClass(Job job,
Class<?> theClass)
Set the key class for the
SequenceFile |
static void |
setSequenceFileOutputValueClass(Job job,
Class<?> theClass)
Set the value class for the
SequenceFile |
getOutputCompressionType, getSequenceWriter, setOutputCompressionType
getCompressOutput, getDefaultWorkFile, getOutputCommitter, getOutputCompressorClass, getOutputName, getOutputPath, getPathForWorkFile, getUniqueFile, getWorkOutputPath, setCompressOutput, setOutputCompressorClass, setOutputName, setOutputPath
public static String VALUE_CLASS
public SequenceFileAsBinaryOutputFormat()
public static void setSequenceFileOutputKeyClass(Job job, Class<?> theClass)
SequenceFile
This allows the user to specify the key class to be different
from the actual class (BytesWritable
) used for writing
job
- the Job
to modifytheClass
- the SequenceFile output key class.public static void setSequenceFileOutputValueClass(Job job, Class<?> theClass)
SequenceFile
This allows the user to specify the value class to be different
from the actual class (BytesWritable
) used for writing
job
- the Job
to modifytheClass
- the SequenceFile output key class.public static Class<? extends WritableComparable> getSequenceFileOutputKeyClass(JobContext job)
SequenceFile
SequenceFile
public static Class<? extends Writable> getSequenceFileOutputValueClass(JobContext job)
SequenceFile
SequenceFile
public RecordWriter<BytesWritable,BytesWritable> getRecordWriter(TaskAttemptContext context) throws IOException
OutputFormat
RecordWriter
for the given task.getRecordWriter
in class SequenceFileOutputFormat<BytesWritable,BytesWritable>
context
- the information about the current task.RecordWriter
to write the output for the job.IOException
public void checkOutputSpecs(JobContext job) throws IOException
OutputFormat
This is to validate the output specification for the job when it is a job is submitted. Typically checks that it does not already exist, throwing an exception when it already exists, so that output is not overwritten.
checkOutputSpecs
in class FileOutputFormat<BytesWritable,BytesWritable>
job
- information about the jobIOException
- when output should not be attemptedCopyright © 2015 Apache Software Foundation. All rights reserved.