public class SequenceFileAsBinaryOutputFormat extends SequenceFileOutputFormat<org.apache.hadoop.io.BytesWritable,org.apache.hadoop.io.BytesWritable>
OutputFormat that writes keys,
values to SequenceFiles in binary(raw) format| Modifier and Type | Class and Description |
|---|---|
static class |
SequenceFileAsBinaryOutputFormat.WritableValueBytes
Inner class used for appendRaw
|
| Modifier and Type | Field and Description |
|---|---|
static String |
KEY_CLASS |
static String |
VALUE_CLASS |
BASE_OUTPUT_NAME, 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<org.apache.hadoop.io.BytesWritable,org.apache.hadoop.io.BytesWritable> |
getRecordWriter(TaskAttemptContext context)
Get the
RecordWriter for the given task. |
static Class<? extends org.apache.hadoop.io.WritableComparable> |
getSequenceFileOutputKeyClass(JobContext job)
Get the key class for the
SequenceFile |
static Class<? extends org.apache.hadoop.io.Writable> |
getSequenceFileOutputValueClass(JobContext job)
Get the value class for the
SequenceFile |
protected org.apache.hadoop.io.SequenceFile.Writer |
getSequenceWriter(TaskAttemptContext context,
Class<?> keyClass,
Class<?> valueClass) |
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, 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 org.apache.hadoop.io.WritableComparable> getSequenceFileOutputKeyClass(JobContext job)
SequenceFileSequenceFilepublic static Class<? extends org.apache.hadoop.io.Writable> getSequenceFileOutputValueClass(JobContext job)
SequenceFileSequenceFilepublic RecordWriter<org.apache.hadoop.io.BytesWritable,org.apache.hadoop.io.BytesWritable> getRecordWriter(TaskAttemptContext context) throws IOException
OutputFormatRecordWriter for the given task.getRecordWriter in class SequenceFileOutputFormat<org.apache.hadoop.io.BytesWritable,org.apache.hadoop.io.BytesWritable>context - the information about the current task.RecordWriter to write the output for the job.IOExceptionprotected org.apache.hadoop.io.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 in class FileOutputFormat<org.apache.hadoop.io.BytesWritable,org.apache.hadoop.io.BytesWritable>job - information about the jobIOException - when output should not be attemptedCopyright © 2009 The Apache Software Foundation