## org.apache.mahout.text
Class WholeFileRecordReader

    java.lang.Object
      org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.BytesWritable>
          org.apache.mahout.text.WholeFileRecordReader

All Implemented Interfaces:
  Closeable

    public class WholeFileRecordReader

extends org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.BytesWritable>

RecordReader used with the MultipleTextFileInputFormat class to read full files as k/v pairs and groups of files as single input splits.

Constructor Summary
`WholeFileRecordReader(org.apache.hadoop.mapreduce.lib.input.CombineFileSplit fileSplit, org.apache.hadoop.mapreduce.TaskAttemptContext taskAttemptContext, Integer idx)`

Method Summary
`void` `close()`
`org.apache.hadoop.io.IntWritable` `getCurrentKey()`
`org.apache.hadoop.io.BytesWritable` `getCurrentValue()`
`float` `getProgress()`
`void` `initialize(org.apache.hadoop.mapreduce.InputSplit inputSplit, org.apache.hadoop.mapreduce.TaskAttemptContext taskAttemptContext)`
`boolean` `nextKeyValue()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### WholeFileRecordReader

    public WholeFileRecordReader(org.apache.hadoop.mapreduce.lib.input.CombineFileSplit fileSplit,
                                 org.apache.hadoop.mapreduce.TaskAttemptContext taskAttemptContext,
                                 Integer idx)
                          throws IOException

Throws:
  `IOException`

Method Detail

### getCurrentKey

    public org.apache.hadoop.io.IntWritable getCurrentKey()

  Specified by:
    `getCurrentKey` in class `org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.BytesWritable>`

### getCurrentValue

    public org.apache.hadoop.io.BytesWritable getCurrentValue()

  Specified by:
    `getCurrentValue` in class `org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.BytesWritable>`

### getProgress

    public float getProgress()
                      throws IOException

  Specified by:
    `getProgress` in class `org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.BytesWritable>`
  Throws:
    `IOException`

### initialize

    public void initialize(org.apache.hadoop.mapreduce.InputSplit inputSplit,
                           org.apache.hadoop.mapreduce.TaskAttemptContext taskAttemptContext)
                    throws IOException,
                           InterruptedException

  Specified by:
    `initialize` in class `org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.BytesWritable>`
  Throws:
    `IOException`
    `InterruptedException`

### nextKeyValue

    public boolean nextKeyValue()
                         throws IOException

  Specified by:
    `nextKeyValue` in class `org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.BytesWritable>`
  Throws:
    `IOException`

### 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.IntWritable,org.apache.hadoop.io.BytesWritable>`
  Throws:
    `IOException`

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