org.apache.accumulo.core.client
Interface ScannerBase

All Known Subinterfaces:
BatchDeleter, BatchScanner, Scanner
All Known Implementing Classes:
IsolatedScanner, MockBatchScanner, MockScanner, MockScannerBase, ScannerImpl, ScannerOptions, TabletServerBatchDeleter, TabletServerBatchReader

public interface ScannerBase

This class host methods that are shared between all different types of scanners.


Method Summary
 void clearColumns()
          Clears the columns to be fetched (useful for resetting the scanner for reuse)
 void clearScanIterators()
          Clears scan iterators prior to returning a scanner to the pool.
 void fetchColumn(org.apache.hadoop.io.Text colFam, org.apache.hadoop.io.Text colQual)
          Limits the scan to only this column, identified by family and qualifier.
 void fetchColumnFamily(org.apache.hadoop.io.Text col)
           
 void setColumnFamilyRegex(java.lang.String regex)
          Set a column family regular expression that filters non matching entries server side.
 void setColumnQualifierRegex(java.lang.String regex)
          Set a column qualifier regular expression that filters non matching entries server side.
 void setRowRegex(java.lang.String regex)
          Set a row regular expression that filters non matching entries server side.
 void setScanIteratorOption(java.lang.String iteratorName, java.lang.String key, java.lang.String value)
          Sets options for server side scan iterators.
 void setScanIterators(int priority, java.lang.String iteratorClass, java.lang.String iteratorName)
          Sets server side scan iterators.
 void setupRegex(java.lang.String iteratorName, int iteratorPriority)
          Call this method to initialize regular expressions on a scanner.
 void setValueRegex(java.lang.String regex)
          Set a value regular expression that filters non matching entries server side.
 

Method Detail

setScanIterators

void setScanIterators(int priority,
                      java.lang.String iteratorClass,
                      java.lang.String iteratorName)
                      throws java.io.IOException
Sets server side scan iterators.

Parameters:
priority - determines the order in which iterators are applied (system iterators are always applied first, then per-table and scan-time, lowest first)
iteratorClass - the fully qualified class name of the iterator to be applied at scan time
iteratorName - a nickname for the iterator
Throws:
java.io.IOException - if an exception occurs reading from the iterator stack

setScanIteratorOption

void setScanIteratorOption(java.lang.String iteratorName,
                           java.lang.String key,
                           java.lang.String value)
Sets options for server side scan iterators.

Parameters:
iteratorName - a nickname for the iterator
key - option name (depends on specific iterator)
value - option value (depends on specific iterator)

setupRegex

void setupRegex(java.lang.String iteratorName,
                int iteratorPriority)
                throws java.io.IOException
Call this method to initialize regular expressions on a scanner. If it is not called, reasonable defaults will be used.

Parameters:
iteratorName - a nickname for the iterator
iteratorPriority - determines the order in which iterators are applied (system iterators are always applied first, then per-table and scan-time, lowest first)
Throws:
java.io.IOException - if an exception occurs reading from the iterator stack

setRowRegex

void setRowRegex(java.lang.String regex)
Set a row regular expression that filters non matching entries server side.

Parameters:
regex - java regular expression to match

setColumnFamilyRegex

void setColumnFamilyRegex(java.lang.String regex)
Set a column family regular expression that filters non matching entries server side.

Parameters:
regex - java regular expression to match

setColumnQualifierRegex

void setColumnQualifierRegex(java.lang.String regex)
Set a column qualifier regular expression that filters non matching entries server side.

Parameters:
regex - java regular expression to match

setValueRegex

void setValueRegex(java.lang.String regex)
Set a value regular expression that filters non matching entries server side.

Parameters:
regex - java regular expression to match

fetchColumnFamily

void fetchColumnFamily(org.apache.hadoop.io.Text col)
Parameters:
col - limit the scan to only this column family (multiple calls appends to the list of column families to limit)

fetchColumn

void fetchColumn(org.apache.hadoop.io.Text colFam,
                 org.apache.hadoop.io.Text colQual)
Limits the scan to only this column, identified by family and qualifier. Multiple calls appends to the list of columns to be fetched.

Parameters:
colFam - the column family of the column to be fetched
colQual - the column qualifier of the column to be fetched

clearColumns

void clearColumns()
Clears the columns to be fetched (useful for resetting the scanner for reuse)


clearScanIterators

void clearScanIterators()
Clears scan iterators prior to returning a scanner to the pool.



Copyright © 2012 The Apache Software Foundation. All Rights Reserved.