public class FixedLengthBinaryInputFormat
extends org.apache.hadoop.mapreduce.lib.input.FileInputFormat<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.BytesWritable>
Constructor and Description |
---|
FixedLengthBinaryInputFormat() |
Modifier and Type | Method and Description |
---|---|
long |
computeSplitSize(long blockSize,
long minSize,
long maxSize)
This input format overrides computeSplitSize() to make sure that each split
only contains full records.
|
org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.BytesWritable> |
createRecordReader(org.apache.hadoop.mapreduce.InputSplit split,
org.apache.hadoop.mapreduce.TaskAttemptContext context)
Create a FixedLengthBinaryRecordReader
|
static int |
getRecordLength(org.apache.hadoop.mapreduce.JobContext context)
Retrieves the record length property from a Hadoop configuration
|
boolean |
isSplitable(org.apache.hadoop.mapreduce.JobContext context,
org.apache.hadoop.fs.Path filename)
Override of isSplitable to ensure initial computation of the record length
|
static String |
RECORD_LENGTH_PROPERTY()
Property name to set in Hadoop JobConfs for record length
|
public static String RECORD_LENGTH_PROPERTY()
public static int getRecordLength(org.apache.hadoop.mapreduce.JobContext context)
public boolean isSplitable(org.apache.hadoop.mapreduce.JobContext context, org.apache.hadoop.fs.Path filename)
isSplitable
in class org.apache.hadoop.mapreduce.lib.input.FileInputFormat<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.BytesWritable>
public long computeSplitSize(long blockSize, long minSize, long maxSize)
computeSplitSize
in class org.apache.hadoop.mapreduce.lib.input.FileInputFormat<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.BytesWritable>
public org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.BytesWritable> createRecordReader(org.apache.hadoop.mapreduce.InputSplit split, org.apache.hadoop.mapreduce.TaskAttemptContext context)
createRecordReader
in class org.apache.hadoop.mapreduce.InputFormat<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.BytesWritable>