下面列出了怎么用org.apache.hadoop.mapred.SequenceFileRecordReader的API类实例代码及写法,或者点击链接到github查看源代码。
public ContentAsTextRecordReader(Configuration conf, FileSplit split)
throws IOException {
sequenceFileRecordReader = new SequenceFileRecordReader<Text, Content>(
conf, split);
innerKey = (Text)sequenceFileRecordReader.createKey();
innerValue = (Content)sequenceFileRecordReader.createValue();
}
public ContentAsTextRecordReader(Configuration conf, FileSplit split)
throws IOException {
sequenceFileRecordReader = new SequenceFileRecordReader<Text, Content>(
conf, split);
innerKey = sequenceFileRecordReader.createKey();
innerValue = sequenceFileRecordReader.createValue();
}
/**
* Overrides virtual method to create specialized record reader
*/
@Override
protected Object getReader(JobConf jobConf, InputSplit split) throws IOException {
return new SequenceFileRecordReader<>(jobConf, (FileSplit) split);
}
@Override
public RecordReader<LongWritable, HarEntry> getRecordReader(InputSplit split,
JobConf job, Reporter reporter) throws IOException {
return new SequenceFileRecordReader<LongWritable, HarEntry>(job,
(FileSplit)split);
}
/** {@inheritDoc} */
public RecordReader<Text, FileOperation> getRecordReader(InputSplit split,
JobConf job, Reporter reporter) throws IOException {
return new SequenceFileRecordReader<Text, FileOperation>(job,
(FileSplit)split);
}
/**
* Returns a reader for this split of the src file list.
*/
public RecordReader<Text, Text> getRecordReader(InputSplit split,
JobConf job, Reporter reporter) throws IOException {
return new SequenceFileRecordReader<Text, Text>(job, (FileSplit)split);
}
@Override
public RecordReader<LongWritable, HarEntry> getRecordReader(InputSplit split,
JobConf job, Reporter reporter) throws IOException {
return new SequenceFileRecordReader<LongWritable, HarEntry>(job,
(FileSplit)split);
}
/** {@inheritDoc} */
public RecordReader<Text, FileOperation> getRecordReader(InputSplit split,
JobConf job, Reporter reporter) throws IOException {
return new SequenceFileRecordReader<Text, FileOperation>(job,
(FileSplit)split);
}
/**
* Returns a reader for this split of the src file list.
*/
public RecordReader<Text, Text> getRecordReader(InputSplit split,
JobConf job, Reporter reporter) throws IOException {
return new SequenceFileRecordReader<Text, Text>(job, (FileSplit)split);
}
public RecordReader<LongWritable, HarEntry> getRecordReader(InputSplit split,
JobConf job, Reporter reporter) throws IOException {
return new SequenceFileRecordReader<LongWritable, HarEntry>(job,
(FileSplit)split);
}
/** {@inheritDoc} */
public RecordReader<Text, FileOperation> getRecordReader(InputSplit split,
JobConf job, Reporter reporter) throws IOException {
return new SequenceFileRecordReader<Text, FileOperation>(job,
(FileSplit)split);
}
/**
* Returns a reader for this split of the src file list.
*/
public RecordReader<Text, Text> getRecordReader(InputSplit split,
JobConf job, Reporter reporter) throws IOException {
return new SequenceFileRecordReader<Text, Text>(job, (FileSplit)split);
}
/** {@inheritDoc} */
public RecordReader<Text, Text> getRecordReader(InputSplit split,
JobConf job, Reporter reporter) throws IOException {
return new SequenceFileRecordReader<Text, Text>(job,
(FileSplit) split);
}
/** {@inheritDoc} */
public RecordReader<Text, PolicyInfo> getRecordReader(InputSplit split,
JobConf job, Reporter reporter) throws IOException {
return new SequenceFileRecordReader<Text, PolicyInfo>(job,
(FileSplit) split);
}
public RecordReader<LongWritable, Text> getRecordReader(InputSplit split,
JobConf job, Reporter reporter) throws IOException {
return new SequenceFileRecordReader<LongWritable, Text>(job,
(FileSplit)split);
}
/** {@inheritDoc} */
public RecordReader<Text, FileOperation> getRecordReader(InputSplit split,
JobConf job, Reporter reporter) throws IOException {
return new SequenceFileRecordReader<Text, FileOperation>(job,
(FileSplit)split);
}
/**
* Returns a reader for this split of the src file list.
*/
public RecordReader<Text, Text> getRecordReader(InputSplit split,
JobConf job, Reporter reporter) throws IOException {
return new SequenceFileRecordReader<Text, Text>(job, (FileSplit)split);
}