org.apache.cassandra.hadoop.cql3

## Class CqlPagingRecordReader

- java.lang.Object
- - org.apache.hadoop.mapreduce.RecordReader<java.util.Map<java.lang.String,java.nio.ByteBuffer>,java.util.Map<java.lang.String,java.nio.ByteBuffer>>
  - - org.apache.cassandra.hadoop.cql3.CqlPagingRecordReader

- All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, org.apache.hadoop.mapred.RecordReader<java.util.Map<java.lang.String,java.nio.ByteBuffer>,java.util.Map<java.lang.String,java.nio.ByteBuffer>>

      public class CqlPagingRecordReader
      extends org.apache.hadoop.mapreduce.RecordReader<java.util.Map<java.lang.String,java.nio.ByteBuffer>,java.util.Map<java.lang.String,java.nio.ByteBuffer>>
      implements org.apache.hadoop.mapred.RecordReader<java.util.Map<java.lang.String,java.nio.ByteBuffer>,java.util.Map<java.lang.String,java.nio.ByteBuffer>>

  Hadoop RecordReader read the values return from the CQL query It use CQL key range query to page through the wide rows.

  Return List as keys columns

  Map as column name to columns mappings

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DEFAULT_CQL_PAGE_LIMIT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CqlPagingRecordReader()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `java.util.Map<java.lang.String,java.nio.ByteBuffer>` | `createKey()`
    `java.util.Map<java.lang.String,java.nio.ByteBuffer>` | `createValue()`
    `java.util.Map<java.lang.String,java.nio.ByteBuffer>` | `getCurrentKey()`
    `java.util.Map<java.lang.String,java.nio.ByteBuffer>` | `getCurrentValue()`
    `long` | `getPos()`
    `float` | `getProgress()`
    `void` | `initialize(org.apache.hadoop.mapreduce.InputSplit split, org.apache.hadoop.mapreduce.TaskAttemptContext context)`
    `boolean` | `next(java.util.Map<java.lang.String,java.nio.ByteBuffer> keys, java.util.Map<java.lang.String,java.nio.ByteBuffer> value)`
    `boolean` | `nextKeyValue()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_CQL_PAGE_LIMIT

          public static final int DEFAULT_CQL_PAGE_LIMIT

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### CqlPagingRecordReader

          public CqlPagingRecordReader()

  - ### Method Detail

    - #### initialize

          public void initialize(org.apache.hadoop.mapreduce.InputSplit split,
                        org.apache.hadoop.mapreduce.TaskAttemptContext context)
                          throws java.io.IOException

      Specified by:
        `initialize` in class `org.apache.hadoop.mapreduce.RecordReader<java.util.Map<java.lang.String,java.nio.ByteBuffer>,java.util.Map<java.lang.String,java.nio.ByteBuffer>>`
      Throws:
        `java.io.IOException`

    - #### close

          public void close()

      Specified by:
        `close` in interface `java.io.Closeable`
      Specified by:
        `close` in interface `java.lang.AutoCloseable`
      Specified by:
        `close` in interface `org.apache.hadoop.mapred.RecordReader<java.util.Map<java.lang.String,java.nio.ByteBuffer>,java.util.Map<java.lang.String,java.nio.ByteBuffer>>`
      Specified by:
        `close` in class `org.apache.hadoop.mapreduce.RecordReader<java.util.Map<java.lang.String,java.nio.ByteBuffer>,java.util.Map<java.lang.String,java.nio.ByteBuffer>>`

    - #### getCurrentKey

          public java.util.Map<java.lang.String,java.nio.ByteBuffer> getCurrentKey()

      Specified by:
        `getCurrentKey` in class `org.apache.hadoop.mapreduce.RecordReader<java.util.Map<java.lang.String,java.nio.ByteBuffer>,java.util.Map<java.lang.String,java.nio.ByteBuffer>>`

    - #### getCurrentValue

          public java.util.Map<java.lang.String,java.nio.ByteBuffer> getCurrentValue()

      Specified by:
        `getCurrentValue` in class `org.apache.hadoop.mapreduce.RecordReader<java.util.Map<java.lang.String,java.nio.ByteBuffer>,java.util.Map<java.lang.String,java.nio.ByteBuffer>>`

    - #### getProgress

          public float getProgress()

      Specified by:
        `getProgress` in interface `org.apache.hadoop.mapred.RecordReader<java.util.Map<java.lang.String,java.nio.ByteBuffer>,java.util.Map<java.lang.String,java.nio.ByteBuffer>>`
      Specified by:
        `getProgress` in class `org.apache.hadoop.mapreduce.RecordReader<java.util.Map<java.lang.String,java.nio.ByteBuffer>,java.util.Map<java.lang.String,java.nio.ByteBuffer>>`

    - #### nextKeyValue

          public boolean nextKeyValue()
                               throws java.io.IOException

      Specified by:
        `nextKeyValue` in class `org.apache.hadoop.mapreduce.RecordReader<java.util.Map<java.lang.String,java.nio.ByteBuffer>,java.util.Map<java.lang.String,java.nio.ByteBuffer>>`
      Throws:
        `java.io.IOException`

    - #### next

          public boolean next(java.util.Map<java.lang.String,java.nio.ByteBuffer> keys,
                     java.util.Map<java.lang.String,java.nio.ByteBuffer> value)
                       throws java.io.IOException

      Specified by:
        `next` in interface `org.apache.hadoop.mapred.RecordReader<java.util.Map<java.lang.String,java.nio.ByteBuffer>,java.util.Map<java.lang.String,java.nio.ByteBuffer>>`
      Throws:
        `java.io.IOException`

    - #### getPos

          public long getPos()
                      throws java.io.IOException

      Specified by:
        `getPos` in interface `org.apache.hadoop.mapred.RecordReader<java.util.Map<java.lang.String,java.nio.ByteBuffer>,java.util.Map<java.lang.String,java.nio.ByteBuffer>>`
      Throws:
        `java.io.IOException`

    - #### createKey

          public java.util.Map<java.lang.String,java.nio.ByteBuffer> createKey()

      Specified by:
        `createKey` in interface `org.apache.hadoop.mapred.RecordReader<java.util.Map<java.lang.String,java.nio.ByteBuffer>,java.util.Map<java.lang.String,java.nio.ByteBuffer>>`

    - #### createValue

          public java.util.Map<java.lang.String,java.nio.ByteBuffer> createValue()

      Specified by:
        `createValue` in interface `org.apache.hadoop.mapred.RecordReader<java.util.Map<java.lang.String,java.nio.ByteBuffer>,java.util.Map<java.lang.String,java.nio.ByteBuffer>>`

Copyright © 2014 The Apache Software Foundation