@InterfaceAudience.Public @InterfaceStability.Stable public class SequenceFileAsBinaryOutputFormat extends SequenceFileOutputFormat<BytesWritable,BytesWritable>
OutputFormat
that writes keys, values to
SequenceFile
s in binary(raw) formatConstructor 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, setOutputCompressionType
getCompressOutput, getOutputCompressorClass, getOutputPath, getPathForCustomFile, getTaskOutputPath, getUniqueName, getWorkOutputPath, setCompressOutput, setOutputCompressorClass, setOutputPath
public 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)
SequenceFile
SequenceFile
public static Class<? extends Writable> getSequenceFileOutputValueClass(JobConf conf)
SequenceFile
SequenceFile
public RecordWriter<BytesWritable,BytesWritable> getRecordWriter(FileSystem ignored, JobConf job, String name, Progressable progress) throws IOException
OutputFormat
RecordWriter
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.IOException
public void checkOutputSpecs(FileSystem ignored, JobConf 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 interface OutputFormat<BytesWritable,BytesWritable>
checkOutputSpecs
in class FileOutputFormat<BytesWritable,BytesWritable>
job
- job configuration.IOException
- when output should not be attemptedCopyright © 2018 Apache Software Foundation. All rights reserved.