@InterfaceAudience.Public @InterfaceStability.Stable public class SequenceFileAsBinaryOutputFormat extends SequenceFileOutputFormat<BytesWritable,BytesWritable>
OutputFormat that writes keys,
values to SequenceFiles in binary(raw) format| 限定符和类型 | 类和说明 |
|---|---|
static class |
SequenceFileAsBinaryOutputFormat.WritableValueBytes
Inner class used for appendRaw
|
FileOutputFormat.Counter| 限定符和类型 | 字段和说明 |
|---|---|
static String |
KEY_CLASS |
static String |
VALUE_CLASS |
BASE_OUTPUT_NAME, PART| 构造器和说明 |
|---|
SequenceFileAsBinaryOutputFormat() |
| 限定符和类型 | 方法和说明 |
|---|---|
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 |
protected SequenceFile.Writer |
getSequenceWriter(TaskAttemptContext context,
Class<?> keyClass,
Class<?> valueClass) |
static void |
setSequenceFileOutputKeyClass(Job job,
Class<?> theClass)
Set the key class for the
SequenceFile
This allows the user to specify the key class to be different
from the actual class (BytesWritable) used for writing |
static void |
setSequenceFileOutputValueClass(Job job,
Class<?> theClass)
Set the value class for the
SequenceFile
This allows the user to specify the value class to be different
from the actual class (BytesWritable) used for writing |
getOutputCompressionType, setOutputCompressionTypegetCompressOutput, getDefaultWorkFile, getOutputCommitter, getOutputCompressorClass, getOutputName, getOutputPath, getPathForWorkFile, getUniqueFile, getWorkOutputPath, setCompressOutput, setOutputCompressorClass, setOutputName, setOutputPathpublic 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)
SequenceFileSequenceFilepublic static Class<? extends Writable> getSequenceFileOutputValueClass(JobContext job)
SequenceFileSequenceFilepublic RecordWriter<BytesWritable,BytesWritable> getRecordWriter(TaskAttemptContext context) throws IOException
OutputFormatRecordWriter for the given task.getRecordWriter 在类中 SequenceFileOutputFormat<BytesWritable,BytesWritable>context - the information about the current task.RecordWriter to write the output for the job.IOExceptionprotected SequenceFile.Writer getSequenceWriter(TaskAttemptContext context, Class<?> keyClass, Class<?> valueClass) throws IOException
IOExceptionpublic void checkOutputSpecs(JobContext job) throws IOException
OutputFormatThis 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 在类中 FileOutputFormat<BytesWritable,BytesWritable>job - information about the jobIOException - when output should not be attemptedCopyright © 2009 The Apache Software Foundation