本文整理汇总了Java中org.apache.hadoop.mapred.LineRecordReader类的典型用法代码示例。如果您正苦于以下问题:Java LineRecordReader类的具体用法?Java LineRecordReader怎么用?Java LineRecordReader使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
LineRecordReader类属于org.apache.hadoop.mapred包,在下文中一共展示了LineRecordReader类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getRecordReader
import org.apache.hadoop.mapred.LineRecordReader; //导入依赖的package包/类
public RecordReader<LongWritable, Text> getRecordReader(
InputSplit genericSplit,
JobConf job,
Reporter reporter)
throws IOException {
reporter.setStatus(genericSplit.toString());
return new LineRecordReader(job, (FileSplit) genericSplit);
}
示例2: getRecordReader
import org.apache.hadoop.mapred.LineRecordReader; //导入依赖的package包/类
public RecordReader<LongWritable,Text> getRecordReader(InputSplit split,JobConf job,Reporter reporter)throws IOException
{
reporter.setStatus(split.toString());
String delimiter = job.get("textinputformat.record.delimiter");
byte[] recordDelimiterBytes = null;
if (null != delimiter) {
recordDelimiterBytes = delimiter.getBytes(Charsets.UTF_8);
}
return new LineRecordReader(job, (FileSplit) split,recordDelimiterBytes);
}
示例3: getRecordReader
import org.apache.hadoop.mapred.LineRecordReader; //导入依赖的package包/类
public RecordReader<LongWritable, BytesWritable> getRecordReader(
InputSplit genericSplit, JobConf job, Reporter reporter) throws IOException {
reporter.setStatus(genericSplit.toString());
Base64LineRecordReader reader = new Base64LineRecordReader(
new LineRecordReader(job, (FileSplit) genericSplit));
reader.configure(job);
return reader;
}
示例4: getRecordReader
import org.apache.hadoop.mapred.LineRecordReader; //导入依赖的package包/类
@Override
public RecordReader<LongWritable, Text> getRecordReader(
InputSplit genericSplit, JobConf job, Reporter reporter)
throws IOException {
reporter.setStatus(genericSplit.toString());
MyDemoRecordReader reader = new MyDemoRecordReader(
new LineRecordReader(job, (FileSplit) genericSplit));
return reader;
}
示例5: TeraRecordReader
import org.apache.hadoop.mapred.LineRecordReader; //导入依赖的package包/类
public TeraRecordReader(Configuration job,
FileSplit split) throws IOException {
in = new LineRecordReader(job, split);
}
示例6: ParagraphRecordReader
import org.apache.hadoop.mapred.LineRecordReader; //导入依赖的package包/类
public ParagraphRecordReader(JobConf conf, FileSplit split)
throws IOException {
lineRecord = new LineRecordReader(conf, split);
lineKey = lineRecord.createKey();
lineValue = lineRecord.createValue();
}
示例7: Base64LineRecordReader
import org.apache.hadoop.mapred.LineRecordReader; //导入依赖的package包/类
public Base64LineRecordReader(LineRecordReader reader) {
this.reader = reader;
text = reader.createValue();
}
示例8: MyDemoRecordReader
import org.apache.hadoop.mapred.LineRecordReader; //导入依赖的package包/类
public MyDemoRecordReader(LineRecordReader reader) {
this.reader = reader;
text = reader.createValue();
}
示例9: getRecordReader
import org.apache.hadoop.mapred.LineRecordReader; //导入依赖的package包/类
@Override
public RecordReader<LongWritable, Text> getRecordReader(InputSplit inputSplit, JobConf jobConf,
Reporter reporter) throws IOException {
return new LineRecordReader(jobConf, (FileSplit) inputSplit);
}
示例10: SequenceRecordReader
import org.apache.hadoop.mapred.LineRecordReader; //导入依赖的package包/类
public SequenceRecordReader(JobConf job, FileSplit split) throws IOException {
lineReader = new LineRecordReader(job, split);
lineKey = lineReader.createKey();
lineValue = lineReader.createValue();
}
示例11: SimpleJsonRecordReader
import org.apache.hadoop.mapred.LineRecordReader; //导入依赖的package包/类
public SimpleJsonRecordReader(Configuration conf, FileSplit split)
throws IOException {
rdr = new LineRecordReader(conf, split);
}
示例12: TeraRecordReader
import org.apache.hadoop.mapred.LineRecordReader; //导入依赖的package包/类
public TeraRecordReader(Configuration job,
FileSplit split) throws IOException {
in = new LineRecordReader(job, split);
}
示例13: FilenameKeyLineRecordReader
import org.apache.hadoop.mapred.LineRecordReader; //导入依赖的package包/类
public FilenameKeyLineRecordReader(Configuration job,
FileSplit split) throws IOException {
lineRecordReader = new LineRecordReader(job, (FileSplit) split);
fileName = split.getPath().getName();
longKey = new LongWritable();
}