org.apache.mahout.text
Class LuceneSegmentRecordReader

java.lang.Object
  extended by org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.Text,org.apache.hadoop.io.NullWritable>
      extended by org.apache.mahout.text.LuceneSegmentRecordReader
All Implemented Interfaces:
Closeable

public class LuceneSegmentRecordReader
extends org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.Text,org.apache.hadoop.io.NullWritable>

RecordReader implementation for Lucene segments. Each InputSplit contains a separate Lucene segment. Emits records consisting of a Text document ID and a null key.


Field Summary
static int USE_TERM_INFO
           
 
Constructor Summary
LuceneSegmentRecordReader()
           
 
Method Summary
 void close()
           
 org.apache.hadoop.io.Text getCurrentKey()
           
 org.apache.hadoop.io.NullWritable getCurrentValue()
           
 float getProgress()
           
 void initialize(org.apache.hadoop.mapreduce.InputSplit split, 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
 

Field Detail

USE_TERM_INFO

public static final int USE_TERM_INFO
See Also:
Constant Field Values
Constructor Detail

LuceneSegmentRecordReader

public LuceneSegmentRecordReader()
Method Detail

initialize

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

nextKeyValue

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

getCurrentKey

public org.apache.hadoop.io.Text getCurrentKey()
                                        throws IOException,
                                               InterruptedException
Specified by:
getCurrentKey in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.Text,org.apache.hadoop.io.NullWritable>
Throws:
IOException
InterruptedException

getCurrentValue

public org.apache.hadoop.io.NullWritable getCurrentValue()
                                                  throws IOException,
                                                         InterruptedException
Specified by:
getCurrentValue in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.Text,org.apache.hadoop.io.NullWritable>
Throws:
IOException
InterruptedException

getProgress

public float getProgress()
                  throws IOException,
                         InterruptedException
Specified by:
getProgress in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.Text,org.apache.hadoop.io.NullWritable>
Throws:
IOException
InterruptedException

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.Text,org.apache.hadoop.io.NullWritable>
Throws:
IOException


Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.