org.apache.hadoop.hive.ql.io
Class IOContext

java.lang.Object
  extended by org.apache.hadoop.hive.ql.io.IOContext

public class IOContext
extends Object

IOContext basically contains the position information of the current key/value. For blockCompressed files, isBlockPointer should return true, and currentBlockStart refers to the RCFile Block or SequenceFile Block. For non compressed files, isBlockPointer should return false, and currentBlockStart refers to the beginning offset of the current row, nextBlockStart refers the end of current row and beginning of next row.


Nested Class Summary
static class IOContext.Comparison
           
 
Constructor Summary
IOContext()
           
 
Method Summary
static void clear()
           
static IOContext get()
           
 IOContext.Comparison getComparison()
           
 long getCurrentBlockStart()
           
 long getCurrentRow()
           
 String getGenericUDFClassName()
           
 org.apache.hadoop.fs.Path getInputPath()
           
 boolean getIOExceptions()
           
 long getNextBlockStart()
           
 boolean isBinarySearching()
           
 boolean isBlockPointer()
           
 void resetSortingValues()
          The thread local IOContext is static, we may need to restart the search if, for instance, multiple files are being searched as part of a CombinedHiveRecordReader
 void setBlockPointer(boolean isBlockPointer)
           
 void setComparison(Integer comparison)
           
 void setCurrentBlockStart(long currentBlockStart)
           
 void setCurrentRow(long currentRow)
           
 void setEndBinarySearch(boolean endBinarySearch)
           
 void setGenericUDFClassName(String genericUDFClassName)
           
 void setInputPath(org.apache.hadoop.fs.Path inputPath)
           
 void setIOExceptions(boolean ioe)
           
 void setIsBinarySearching(boolean isBinarySearching)
           
 void setNextBlockStart(long nextBlockStart)
           
 void setUseSorted(boolean useSorted)
           
 boolean shouldEndBinarySearch()
           
 boolean useSorted()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IOContext

public IOContext()
Method Detail

get

public static IOContext get()

clear

public static void clear()

getCurrentBlockStart

public long getCurrentBlockStart()

setCurrentBlockStart

public void setCurrentBlockStart(long currentBlockStart)

getNextBlockStart

public long getNextBlockStart()

setNextBlockStart

public void setNextBlockStart(long nextBlockStart)

getCurrentRow

public long getCurrentRow()

setCurrentRow

public void setCurrentRow(long currentRow)

isBlockPointer

public boolean isBlockPointer()

setBlockPointer

public void setBlockPointer(boolean isBlockPointer)

getInputPath

public org.apache.hadoop.fs.Path getInputPath()

setInputPath

public void setInputPath(org.apache.hadoop.fs.Path inputPath)

setIOExceptions

public void setIOExceptions(boolean ioe)

getIOExceptions

public boolean getIOExceptions()

useSorted

public boolean useSorted()

setUseSorted

public void setUseSorted(boolean useSorted)

isBinarySearching

public boolean isBinarySearching()

setIsBinarySearching

public void setIsBinarySearching(boolean isBinarySearching)

shouldEndBinarySearch

public boolean shouldEndBinarySearch()

setEndBinarySearch

public void setEndBinarySearch(boolean endBinarySearch)

getComparison

public IOContext.Comparison getComparison()

setComparison

public void setComparison(Integer comparison)

getGenericUDFClassName

public String getGenericUDFClassName()

setGenericUDFClassName

public void setGenericUDFClassName(String genericUDFClassName)

resetSortingValues

public void resetSortingValues()
The thread local IOContext is static, we may need to restart the search if, for instance, multiple files are being searched as part of a CombinedHiveRecordReader



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