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 java.lang.String |
KEY_CLASS |
static java.lang.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 java.lang.Class<? extends org.apache.hadoop.io.WritableComparable> |
getSequenceFileOutputKeyClass(JobContext job)
Get the key class for the
SequenceFile |
static java.lang.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,
java.lang.Class<?> keyClass,
java.lang.Class<?> valueClass) |
static void |
setSequenceFileOutputKeyClass(Job job,
java.lang.Class<?> theClass)
Set the key class for the
SequenceFile |
static void |
setSequenceFileOutputValueClass(Job job,
java.lang.Class<?> theClass)
Set the value class for the
SequenceFile |
getOutputCompressionType, setOutputCompressionTypegetCompressOutput, getDefaultWorkFile, getOutputCommitter, getOutputCompressorClass, getOutputName, getOutputPath, getPathForWorkFile, getUniqueFile, getWorkOutputPath, setCompressOutput, setOutputCompressorClass, setOutputName, setOutputPathpublic static java.lang.String KEY_CLASS
public static java.lang.String VALUE_CLASS
public static void setSequenceFileOutputKeyClass(Job job, java.lang.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, java.lang.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 java.lang.Class<? extends org.apache.hadoop.io.WritableComparable> getSequenceFileOutputKeyClass(JobContext job)
SequenceFileSequenceFilepublic static java.lang.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 java.io.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.java.io.IOExceptionprotected org.apache.hadoop.io.SequenceFile.Writer getSequenceWriter(TaskAttemptContext context, java.lang.Class<?> keyClass, java.lang.Class<?> valueClass) throws java.io.IOException
java.io.IOExceptionpublic void checkOutputSpecs(JobContext job) throws java.io.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 jobjava.io.IOException - when output should not be attemptedCopyright © 2009 The Apache Software Foundation