org.apache.hadoop.hbase
Class HAbstractScanner

java.lang.Object
  extended by org.apache.hadoop.hbase.HAbstractScanner
All Implemented Interfaces:
Closeable, Iterable<Map.Entry<HStoreKey,SortedMap<org.apache.hadoop.io.Text,byte[]>>>, HInternalScannerInterface, HScannerInterface

public abstract class HAbstractScanner
extends Object
implements HInternalScannerInterface

Abstract base class that implements the HScannerInterface.


Field Summary
protected  TreeMap<org.apache.hadoop.io.Text,Vector<org.apache.hadoop.hbase.HAbstractScanner.ColumnMatcher>> okCols
           
protected  boolean scannerClosed
           
protected  long timestamp
           
 
Method Summary
protected  boolean columnMatch(org.apache.hadoop.io.Text column)
          For a particular column, find all the matchers defined for the column.
 boolean isMultipleMatchScanner()
          
 boolean isWildcardScanner()
          
 Iterator<Map.Entry<HStoreKey,SortedMap<org.apache.hadoop.io.Text,byte[]>>> iterator()
           
abstract  boolean next(HStoreKey key, SortedMap<org.apache.hadoop.io.Text,byte[]> 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.HScannerInterface
close
 

Field Detail

okCols

protected TreeMap<org.apache.hadoop.io.Text,Vector<org.apache.hadoop.hbase.HAbstractScanner.ColumnMatcher>> okCols

scannerClosed

protected boolean scannerClosed

timestamp

protected long timestamp
Method Detail

columnMatch

protected boolean columnMatch(org.apache.hadoop.io.Text 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 HInternalScannerInterface
Returns:
true if the scanner is matching a column family or regex

isMultipleMatchScanner

public boolean isMultipleMatchScanner()

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

next

public abstract boolean next(HStoreKey key,
                             SortedMap<org.apache.hadoop.io.Text,byte[]> results)
                      throws IOException
Description copied from interface: HScannerInterface
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 HScannerInterface
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

iterator

public Iterator<Map.Entry<HStoreKey,SortedMap<org.apache.hadoop.io.Text,byte[]>>> iterator()
Specified by:
iterator in interface Iterable<Map.Entry<HStoreKey,SortedMap<org.apache.hadoop.io.Text,byte[]>>>


Copyright © 2008 The Apache Software Foundation