org.apache.accumulo.server.monitor.servlets.trace
Class NullScanner

java.lang.Object
  extended by org.apache.accumulo.server.monitor.servlets.trace.NullScanner
All Implemented Interfaces:
java.lang.Iterable<java.util.Map.Entry<Key,Value>>, Scanner, ScannerBase

public class NullScanner
extends java.lang.Object
implements Scanner


Constructor Summary
NullScanner()
           
 
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 disableIsolation()
           
 void enableIsolation()
           
 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)
           
 int getBatchSize()
           
 Range getRange()
           
 int getTimeOut()
           
 java.util.Iterator<java.util.Map.Entry<Key,Value>> iterator()
          Returns an iterator over an accumulo table.
 void setBatchSize(int size)
           
 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 setRange(Range range)
           
 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 setTimeOut(int timeOut)
          When failure occurs, the scanner automatically retries.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullScanner

public NullScanner()
Method Detail

setScanIterators

public void setScanIterators(int priority,
                             java.lang.String iteratorClass,
                             java.lang.String iteratorName)
                      throws java.io.IOException
Description copied from interface: ScannerBase
Sets server side scan iterators.

Specified by:
setScanIterators in interface ScannerBase
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

public void setScanIteratorOption(java.lang.String iteratorName,
                                  java.lang.String key,
                                  java.lang.String value)
Description copied from interface: ScannerBase
Sets options for server side scan iterators.

Specified by:
setScanIteratorOption in interface ScannerBase
Parameters:
iteratorName - a nickname for the iterator
key - option name (depends on specific iterator)
value - option value (depends on specific iterator)

setupRegex

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

Specified by:
setupRegex in interface ScannerBase
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

public void setRowRegex(java.lang.String regex)
Description copied from interface: ScannerBase
Set a row regular expression that filters non matching entries server side.

Specified by:
setRowRegex in interface ScannerBase
Parameters:
regex - java regular expression to match

setColumnFamilyRegex

public void setColumnFamilyRegex(java.lang.String regex)
Description copied from interface: ScannerBase
Set a column family regular expression that filters non matching entries server side.

Specified by:
setColumnFamilyRegex in interface ScannerBase
Parameters:
regex - java regular expression to match

setColumnQualifierRegex

public void setColumnQualifierRegex(java.lang.String regex)
Description copied from interface: ScannerBase
Set a column qualifier regular expression that filters non matching entries server side.

Specified by:
setColumnQualifierRegex in interface ScannerBase
Parameters:
regex - java regular expression to match

setValueRegex

public void setValueRegex(java.lang.String regex)
Description copied from interface: ScannerBase
Set a value regular expression that filters non matching entries server side.

Specified by:
setValueRegex in interface ScannerBase
Parameters:
regex - java regular expression to match

fetchColumnFamily

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

fetchColumn

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

Specified by:
fetchColumn in interface ScannerBase
Parameters:
colFam - the column family of the column to be fetched
colQual - the column qualifier of the column to be fetched

clearColumns

public void clearColumns()
Description copied from interface: ScannerBase
Clears the columns to be fetched (useful for resetting the scanner for reuse)

Specified by:
clearColumns in interface ScannerBase

clearScanIterators

public void clearScanIterators()
Description copied from interface: ScannerBase
Clears scan iterators prior to returning a scanner to the pool.

Specified by:
clearScanIterators in interface ScannerBase

setTimeOut

public void setTimeOut(int timeOut)
Description copied from interface: Scanner
When failure occurs, the scanner automatically retries. This setting determines how long a scanner will retry. By default a scanner will retry forever.

Specified by:
setTimeOut in interface Scanner
Parameters:
timeOut - in seconds

getTimeOut

public int getTimeOut()
Specified by:
getTimeOut in interface Scanner
Returns:
the timeout configured for this scanner

setRange

public void setRange(Range range)
Specified by:
setRange in interface Scanner
Parameters:
range - key range to begin and end scan

getRange

public Range getRange()
Specified by:
getRange in interface Scanner
Returns:
the range configured for this scanner

setBatchSize

public void setBatchSize(int size)
Specified by:
setBatchSize in interface Scanner
Parameters:
size - the number of Keys/Value pairs to fetch per call to Accumulo

getBatchSize

public int getBatchSize()
Specified by:
getBatchSize in interface Scanner
Returns:
the batch size configured for this scanner

enableIsolation

public void enableIsolation()
Specified by:
enableIsolation in interface Scanner

disableIsolation

public void disableIsolation()
Specified by:
disableIsolation in interface Scanner

iterator

public java.util.Iterator<java.util.Map.Entry<Key,Value>> iterator()
Description copied from interface: Scanner
Returns an iterator over an accumulo table. This iterator uses the options that are currently set on the scanner for its lifetime. So setting options on a Scanner object will have no effect on existing iterators. Keys are returned in sorted order by the iterator.

Specified by:
iterator in interface java.lang.Iterable<java.util.Map.Entry<Key,Value>>
Specified by:
iterator in interface Scanner


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