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:
Iterable<Map.Entry<Key,Value>>, Scanner, ScannerBase

public class NullScanner
extends Object
implements Scanner


Constructor Summary
NullScanner()
           
 
Method Summary
 void addScanIterator(IteratorSetting cfg)
          Add a server-side scan iterator.
 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()
          Disables row isolation.
 void enableIsolation()
          Enables row isolation.
 void fetchColumn(org.apache.hadoop.io.Text colFam, org.apache.hadoop.io.Text colQual)
          Adds a column to the list of columns that will be fetched by this scanner.
 void fetchColumnFamily(org.apache.hadoop.io.Text col)
          Adds a column family to the list of columns that will be fetched by this scanner.
 int getBatchSize()
          Returns the batch size (number of Key/Value pairs) that will be fetched at a time from a tablet server.
 Range getRange()
          Returns the range of keys to scan over.
 int getTimeOut()
          Returns the setting for how long a scanner will automatically retry when a failure occurs.
 Iterator<Map.Entry<Key,Value>> iterator()
          Returns an iterator over an accumulo table.
 void removeScanIterator(String iteratorName)
          Remove an iterator from the list of iterators.
 void setBatchSize(int size)
          Sets the number of Key/Value pairs that will be fetched at a time from a tablet server.
 void setColumnFamilyRegex(String regex)
          Set a column family regular expression that filters non matching entries server side.
 void setColumnQualifierRegex(String regex)
          Use addScanIterator(int, ScanIterator); Set a column qualifier regular expression that filters non matching entries server side.
 void setRange(Range range)
          Sets the range of keys to scan over.
 void setRowRegex(String regex)
          Set a row regular expression that filters non matching entries server side.
 void setScanIteratorOption(String iteratorName, String key, String value)
           
 void setScanIterators(int priority, String iteratorClass, String iteratorName)
           
 void setTimeOut(int timeOut)
          This setting determines how long a scanner will automatically retry when a failure occurs.
 void setupRegex(String iteratorName, int iteratorPriority)
          Call this method to initialize regular expressions on a scanner.
 void setValueRegex(String regex)
          Set a value regular expression that filters non matching entries server side.
 void updateScanIteratorOption(String iteratorName, String key, String value)
          Update the options for an iterator.
 
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,
                             String iteratorClass,
                             String iteratorName)
Specified by:
setScanIterators in interface ScannerBase

addScanIterator

public void addScanIterator(IteratorSetting cfg)
Description copied from interface: ScannerBase
Add a server-side scan iterator.

Specified by:
addScanIterator in interface ScannerBase
Parameters:
cfg - fully specified scan-time iterator, including all options for the iterator. Any changes to the iterator setting after this call are not propagated to the stored iterator.

setScanIteratorOption

public void setScanIteratorOption(String iteratorName,
                                  String key,
                                  String value)
Specified by:
setScanIteratorOption in interface ScannerBase

updateScanIteratorOption

public void updateScanIteratorOption(String iteratorName,
                                     String key,
                                     String value)
Description copied from interface: ScannerBase
Update the options for an iterator. Note that this does not change the iterator options during a scan, it just replaces the given option on a configured iterator before a scan is started.

Specified by:
updateScanIteratorOption in interface ScannerBase
Parameters:
iteratorName - the name of the iterator to change
key - the name of the option
value - the new value for the named option

setupRegex

public void setupRegex(String iteratorName,
                       int iteratorPriority)
                throws 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:
IOException - if an exception occurs reading from the iterator stack

setRowRegex

public void setRowRegex(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(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(String regex)
Description copied from interface: ScannerBase
Use addScanIterator(int, ScanIterator); 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(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)
Description copied from interface: ScannerBase
Adds a column family to the list of columns that will be fetched by this scanner. By default when no columns have been added the scanner fetches all columns.

Specified by:
fetchColumnFamily in interface ScannerBase
Parameters:
col - the column family to be fetched

fetchColumn

public void fetchColumn(org.apache.hadoop.io.Text colFam,
                        org.apache.hadoop.io.Text colQual)
Description copied from interface: ScannerBase
Adds a column to the list of columns that will be fetched by this scanner. The column is identified by family and qualifier. By default when no columns have been added the scanner fetches all columns.

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). Once cleared, the scanner will fetch all columns.

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
This setting determines how long a scanner will automatically retry when a failure occurs. By default a scanner will retry forever.

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

getTimeOut

public int getTimeOut()
Description copied from interface: Scanner
Returns the setting for how long a scanner will automatically retry when a failure occurs.

Specified by:
getTimeOut in interface Scanner
Returns:
the timeout configured for this scanner

setRange

public void setRange(Range range)
Description copied from interface: Scanner
Sets the range of keys to scan over.

Specified by:
setRange in interface Scanner
Parameters:
range - key range to begin and end scan

getRange

public Range getRange()
Description copied from interface: Scanner
Returns the range of keys to scan over.

Specified by:
getRange in interface Scanner
Returns:
the range configured for this scanner

setBatchSize

public void setBatchSize(int size)
Description copied from interface: Scanner
Sets the number of Key/Value pairs that will be fetched at a time from a tablet server.

Specified by:
setBatchSize in interface Scanner
Parameters:
size - the number of Key/Value pairs to fetch per call to Accumulo

getBatchSize

public int getBatchSize()
Description copied from interface: Scanner
Returns the batch size (number of Key/Value pairs) that will be fetched at a time from a tablet server.

Specified by:
getBatchSize in interface Scanner
Returns:
the batch size configured for this scanner

enableIsolation

public void enableIsolation()
Description copied from interface: Scanner
Enables row isolation. Writes that occur to a row after a scan of that row has begun will not be seen if this option is enabled.

Specified by:
enableIsolation in interface Scanner

disableIsolation

public void disableIsolation()
Description copied from interface: Scanner
Disables row isolation. Writes that occur to a row after a scan of that row has begun may be seen if this option is enabled.

Specified by:
disableIsolation in interface Scanner

iterator

public Iterator<Map.Entry<Key,Value>> iterator()
Description copied from interface: ScannerBase
Returns an iterator over an accumulo table. This iterator uses the options that are currently set for its lifetime, so setting options will have no effect on existing iterators. Keys returned by the iterator are not guaranteed to be in sorted order.

Specified by:
iterator in interface Iterable<Map.Entry<Key,Value>>
Specified by:
iterator in interface ScannerBase
Returns:
an iterator over Key,Value pairs which meet the restrictions set on the scanner

removeScanIterator

public void removeScanIterator(String iteratorName)
Description copied from interface: ScannerBase
Remove an iterator from the list of iterators.

Specified by:
removeScanIterator in interface ScannerBase
Parameters:
iteratorName - nickname used for the iterator


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