org.apache.accumulo.examples.wikisearch.reader
Class LongLineRecordReader

java.lang.Object
  extended by org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
      extended by org.apache.accumulo.examples.wikisearch.reader.LongLineRecordReader
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
AggregatingRecordReader

public class LongLineRecordReader
extends org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>

A copy of LineRecordReader which does not discard lines longer than "mapred.linerecordreader.maxlength". Instead, it returns them, leaving it to the mapper to decide what to do with it. It also does not treat '\r' (CR) characters as new lines -- it uses LfLineReader instead of LineReader to read lines.


Constructor Summary
LongLineRecordReader()
           
 
Method Summary
 void close()
           
 org.apache.hadoop.io.LongWritable getCurrentKey()
           
 org.apache.hadoop.io.Text getCurrentValue()
           
 float getProgress()
          Get the progress within the split
 void initialize(org.apache.hadoop.mapreduce.InputSplit genericSplit, org.apache.hadoop.mapreduce.TaskAttemptContext context)
           
 boolean nextKeyValue()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LongLineRecordReader

public LongLineRecordReader()
Method Detail

initialize

public void initialize(org.apache.hadoop.mapreduce.InputSplit genericSplit,
                       org.apache.hadoop.mapreduce.TaskAttemptContext context)
                throws IOException
Specified by:
initialize in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
Throws:
IOException

nextKeyValue

public boolean nextKeyValue()
                     throws IOException
Specified by:
nextKeyValue in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
Throws:
IOException

getCurrentKey

public org.apache.hadoop.io.LongWritable getCurrentKey()
Specified by:
getCurrentKey in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>

getCurrentValue

public org.apache.hadoop.io.Text getCurrentValue()
Specified by:
getCurrentValue in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>

getProgress

public float getProgress()
Get the progress within the split

Specified by:
getProgress in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Specified by:
close in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
Throws:
IOException


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.