@InterfaceAudience.Public @InterfaceStability.Stable public class SequenceFileAsBinaryOutputFormat extends SequenceFileOutputFormat<BytesWritable,BytesWritable>
OutputFormat that writes keys, values to
SequenceFiles in binary(raw) format| Constructor and Description |
|---|
SequenceFileAsBinaryOutputFormat() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkOutputSpecs(FileSystem ignored,
JobConf job)
Check for validity of the output-specification for the job.
|
RecordWriter<BytesWritable,BytesWritable> |
getRecordWriter(FileSystem ignored,
JobConf job,
String name,
Progressable progress)
Get the
RecordWriter for the given job. |
static Class<? extends WritableComparable> |
getSequenceFileOutputKeyClass(JobConf conf)
Get the key class for the
SequenceFile |
static Class<? extends Writable> |
getSequenceFileOutputValueClass(JobConf conf)
Get the value class for the
SequenceFile |
static void |
setSequenceFileOutputKeyClass(JobConf conf,
Class<?> theClass)
Set the key class for the
SequenceFile |
static void |
setSequenceFileOutputValueClass(JobConf conf,
Class<?> theClass)
Set the value class for the
SequenceFile |
getOutputCompressionType, getReaders, setOutputCompressionTypegetCompressOutput, getOutputCompressorClass, getOutputPath, getPathForCustomFile, getTaskOutputPath, getUniqueName, getWorkOutputPath, setCompressOutput, setOutputCompressorClass, setOutputPathpublic static void setSequenceFileOutputKeyClass(JobConf conf, Class<?> theClass)
SequenceFile
This allows the user to specify the key class to be different
from the actual class (BytesWritable) used for writing
conf - the JobConf to modifytheClass - the SequenceFile output key class.public static void setSequenceFileOutputValueClass(JobConf conf, Class<?> theClass)
SequenceFile
This allows the user to specify the value class to be different
from the actual class (BytesWritable) used for writing
conf - the JobConf to modifytheClass - the SequenceFile output key class.public static Class<? extends WritableComparable> getSequenceFileOutputKeyClass(JobConf conf)
SequenceFileSequenceFilepublic static Class<? extends Writable> getSequenceFileOutputValueClass(JobConf conf)
SequenceFileSequenceFilepublic RecordWriter<BytesWritable,BytesWritable> getRecordWriter(FileSystem ignored, JobConf job, String name, Progressable progress) throws IOException
OutputFormatRecordWriter for the given job.getRecordWriter in interface OutputFormat<BytesWritable,BytesWritable>getRecordWriter in class SequenceFileOutputFormat<BytesWritable,BytesWritable>job - configuration for the job whose output is being written.name - the unique name for this part of the output.progress - mechanism for reporting progress while writing to file.RecordWriter to write the output for the job.IOExceptionpublic void checkOutputSpecs(FileSystem ignored, JobConf 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.
Implementations which write to filesystems which support delegation tokens usually collect the tokens for the destination path(s) and attach them to the job configuration.checkOutputSpecs in interface OutputFormat<BytesWritable,BytesWritable>checkOutputSpecs in class FileOutputFormat<BytesWritable,BytesWritable>job - job configuration.IOException - when output should not be attemptedCopyright © 2023 Apache Software Foundation. All rights reserved.