MultiFileWordCount.CombineFileLineRecordReader (Hadoop 0.20.2-CDH3B4 API)
Date: 2011-02-21

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.hadoop.examples
Class MultiFileWordCount.CombineFileLineRecordReader

    java.lang.Object
      org.apache.hadoop.mapreduce.RecordReader<MultiFileWordCount.WordOffset,Text>
          org.apache.hadoop.examples.MultiFileWordCount.CombineFileLineRecordReader

All Implemented Interfaces:
  Closeable

Enclosing class:
  MultiFileWordCount

    public static class MultiFileWordCount.CombineFileLineRecordReader

extends RecordReader<MultiFileWordCount.WordOffset,Text>

RecordReader is responsible from extracting records from a chunk of the CombineFileSplit.

Constructor Summary
`MultiFileWordCount.CombineFileLineRecordReader(CombineFileSplit split, TaskAttemptContext context, Integer index)`

Method Summary
`void` | `close()` Close the record reader.
`MultiFileWordCount.WordOffset` | `getCurrentKey()` Get the current key
`Text` | `getCurrentValue()` Get the current value.
`float` | `getProgress()` The current progress of the record reader through its data.
`void` | `initialize(InputSplit split, TaskAttemptContext context)` Called once at initialization.
`boolean` | `nextKeyValue()` Read the next key, value pair.

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

Constructor Detail

### MultiFileWordCount.CombineFileLineRecordReader

    public MultiFileWordCount.CombineFileLineRecordReader(CombineFileSplit split,
                                                          TaskAttemptContext context,
                                                          Integer index)
                                                   throws IOException

Throws:
  `IOException`

Method Detail

### initialize

    public void initialize(InputSplit split,
                           TaskAttemptContext context)
                    throws IOException,
                           InterruptedException

  Description copied from class: `RecordReader`
  Called once at initialization.

  Specified by:
    `initialize` in class `RecordReader<MultiFileWordCount.WordOffset,Text>`
  Parameters:
    `split` - the split that defines the range of records to read
    `context` - the information about the task
  Throws:
    `IOException`
    `InterruptedException`

### close

    public void close()
               throws IOException

  Description copied from class: `RecordReader`
  Close the record reader.

  Specified by:
    `close` in interface `Closeable`
  Specified by:
    `close` in class `RecordReader<MultiFileWordCount.WordOffset,Text>`
  Throws:
    `IOException`

### getProgress

    public float getProgress()
                      throws IOException

  Description copied from class: `RecordReader`
  The current progress of the record reader through its data.

  Specified by:
    `getProgress` in class `RecordReader<MultiFileWordCount.WordOffset,Text>`
  Returns:
    a number between 0.0 and 1.0 that is the fraction of the data read
  Throws:
    `IOException`

### nextKeyValue

    public boolean nextKeyValue()
                         throws IOException

  Description copied from class: `RecordReader`
  Read the next key, value pair.

  Specified by:
    `nextKeyValue` in class `RecordReader<MultiFileWordCount.WordOffset,Text>`
  Returns:
    true if a key/value pair was read
  Throws:
    `IOException`

### getCurrentKey

    public MultiFileWordCount.WordOffset getCurrentKey()
                                                throws IOException,
                                                       InterruptedException

  Description copied from class: `RecordReader`
  Get the current key

  Specified by:
    `getCurrentKey` in class `RecordReader<MultiFileWordCount.WordOffset,Text>`
  Returns:
    the current key or null if there is no current key
  Throws:
    `IOException`
    `InterruptedException`

### getCurrentValue

    public Text getCurrentValue()
                         throws IOException,
                                InterruptedException

  Description copied from class: `RecordReader`
  Get the current value.

  Specified by:
    `getCurrentValue` in class `RecordReader<MultiFileWordCount.WordOffset,Text>`
  Returns:
    the object that was read
  Throws:
    `IOException`
    `InterruptedException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation