org.apache.hadoop.hbase.regionserver
Class HAbstractScanner

java.lang.Object
  extended by org.apache.hadoop.hbase.regionserver.HAbstractScanner
All Implemented Interfaces:
Closeable, InternalScanner

public abstract class HAbstractScanner
extends Object
implements InternalScanner

Abstract base class that implements the InternalScanner.


Field Summary
protected  boolean scannerClosed
           
protected  long timestamp
           
 
Constructor Summary
protected HAbstractScanner(long timestamp, byte[][] targetCols)
          Constructor for abstract base class
 
Method Summary
protected  boolean columnMatch(byte[] column)
          For a particular column, find all the matchers defined for the column.
 boolean isMultipleMatchScanner()
          
 boolean isWildcardScanner()
          
abstract  boolean next(HStoreKey key, SortedMap<byte[],Cell> results)
          Grab the next row's worth of values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.hadoop.hbase.regionserver.InternalScanner
close
 

Field Detail

scannerClosed

protected volatile boolean scannerClosed

timestamp

protected long timestamp
Constructor Detail

HAbstractScanner

protected HAbstractScanner(long timestamp,
                           byte[][] targetCols)
                    throws IOException
Constructor for abstract base class

Throws:
IOException
Method Detail

columnMatch

protected boolean columnMatch(byte[] column)
                       throws IOException
For a particular column, find all the matchers defined for the column. Compare the column family and column key using the matchers. The first one that matches returns true. If no matchers are successful, return false.

Parameters:
column - Column to test
Returns:
true if any of the matchers for the column match the column family and the column key.
Throws:
IOException

isWildcardScanner

public boolean isWildcardScanner()

Specified by:
isWildcardScanner in interface InternalScanner
Returns:
true if the scanner is matching a column family or regex

isMultipleMatchScanner

public boolean isMultipleMatchScanner()

Specified by:
isMultipleMatchScanner in interface InternalScanner
Returns:
true if the scanner is matching multiple column family members

next

public abstract boolean next(HStoreKey key,
                             SortedMap<byte[],Cell> results)
                      throws IOException
Grab the next row's worth of values. The scanner will return the most recent data value for each row that is not newer than the target time passed when the scanner was created.

Specified by:
next in interface InternalScanner
Parameters:
key - will contain the row and timestamp upon return
results - will contain an entry for each column family member and its value
Returns:
true if data was returned
Throws:
IOException


Copyright © 2008 The Apache Software Foundation