org.apache.hadoop.hive.ql.exec
Class FooterBuffer

java.lang.Object
  extended by org.apache.hadoop.hive.ql.exec.FooterBuffer

public class FooterBuffer
extends Object


Constructor Summary
FooterBuffer()
           
 
Method Summary
 boolean initializeBuffer(org.apache.hadoop.mapred.JobConf job, org.apache.hadoop.mapred.RecordReader recordreader, int footerCount, org.apache.hadoop.io.WritableComparable key, org.apache.hadoop.io.Writable value)
          Initialize footer buffer in order to keep footer records at the end of file.
 void setCursor(int cur)
           
 boolean updateBuffer(org.apache.hadoop.mapred.JobConf job, org.apache.hadoop.mapred.RecordReader recordreader, org.apache.hadoop.io.WritableComparable key, org.apache.hadoop.io.Writable value)
          Enqueue most recent record read, and dequeue earliest result in the queue.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FooterBuffer

public FooterBuffer()
Method Detail

setCursor

public void setCursor(int cur)

initializeBuffer

public boolean initializeBuffer(org.apache.hadoop.mapred.JobConf job,
                                org.apache.hadoop.mapred.RecordReader recordreader,
                                int footerCount,
                                org.apache.hadoop.io.WritableComparable key,
                                org.apache.hadoop.io.Writable value)
                         throws IOException
Initialize footer buffer in order to keep footer records at the end of file.

Parameters:
job - Current job configuration.
recordreader - Record reader.
footerCount - Footer line number of the table files.
key - Key of current reading record.
value - Value of current reading record.
Returns:
Return true if there are 0 or more records left in the file after initializing the footer buffer, otherwise return false.
Throws:
IOException

updateBuffer

public boolean updateBuffer(org.apache.hadoop.mapred.JobConf job,
                            org.apache.hadoop.mapred.RecordReader recordreader,
                            org.apache.hadoop.io.WritableComparable key,
                            org.apache.hadoop.io.Writable value)
                     throws IOException
Enqueue most recent record read, and dequeue earliest result in the queue.

Parameters:
job - Current job configuration.
recordreader - Record reader.
key - Key of current reading record.
value - Value of current reading record.
Returns:
Return false if reaches the end of file, otherwise return true.
Throws:
IOException


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