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 close()
          Closes any underlying connections on the scanner
 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()
          Deprecated. 
 long getTimeout(TimeUnit timeUnit)
          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 setRange(Range range)
          Sets the range of keys to scan over.
 void setTimeOut(int timeOut)
          Deprecated. 
 void setTimeout(long timeOut, TimeUnit timeUnit)
          This setting determines how long a scanner will automatically retry when a failure occurs.
 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

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.

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

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

@Deprecated
public void setTimeOut(int timeOut)
Deprecated. 

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

@Deprecated
public int getTimeOut()
Deprecated. 

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

setTimeout

public void setTimeout(long timeOut,
                       TimeUnit timeUnit)
Description copied from interface: ScannerBase
This setting determines how long a scanner will automatically retry when a failure occurs. By default a scanner will retry forever. Setting to zero or Long.MAX_VALUE and TimeUnit.MILLISECONDS means to retry forever.

Specified by:
setTimeout in interface ScannerBase
timeUnit - determines how timeout is interpreted

getTimeout

public long getTimeout(TimeUnit timeUnit)
Description copied from interface: ScannerBase
Returns the setting for how long a scanner will automatically retry when a failure occurs.

Specified by:
getTimeout in interface ScannerBase
Returns:
the timeout configured for this scanner

close

public void close()
Description copied from interface: ScannerBase
Closes any underlying connections on the scanner

Specified by:
close in interface ScannerBase


Copyright © 2013 Apache Accumulo Project. All Rights Reserved.