org.apache.accumulo.core.client.mock
Class MockBatchDeleter

java.lang.Object
  extended by org.apache.accumulo.core.client.impl.ScannerOptions
      extended by org.apache.accumulo.core.client.mock.MockScannerBase
          extended by org.apache.accumulo.core.client.mock.MockBatchScanner
              extended by org.apache.accumulo.core.client.mock.MockBatchDeleter
All Implemented Interfaces:
Iterable<Map.Entry<Key,Value>>, BatchDeleter, BatchScanner, ScannerBase

public class MockBatchDeleter
extends MockBatchScanner
implements BatchDeleter

BatchDeleter for a MockAccumulo instance. Behaves similarly to a regular BatchDeleter, with a few exceptions:

  1. There is no waiting for memory to fill before flushing
  2. Only one thread is used for writing
Otherwise, it behaves as expected.


Field Summary
 
Fields inherited from class org.apache.accumulo.core.client.mock.MockScannerBase
auths, table
 
Fields inherited from class org.apache.accumulo.core.client.impl.ScannerOptions
fetchedColumns, serverSideIteratorList, serverSideIteratorOptions
 
Constructor Summary
MockBatchDeleter(MockAccumulo acc, String tableName, Authorizations auths)
          Create a BatchDeleter for the specified instance on the specified table where the writer uses the specified Authorizations.
 
Method Summary
 void delete()
          Deletes the ranges specified by BatchDeleter.setRanges(java.util.Collection).
 
Methods inherited from class org.apache.accumulo.core.client.mock.MockBatchScanner
close, iterator, setRanges
 
Methods inherited from class org.apache.accumulo.core.client.mock.MockScannerBase
createFilter
 
Methods inherited from class org.apache.accumulo.core.client.impl.ScannerOptions
addScanIterator, clearColumns, clearScanIterators, fetchColumn, fetchColumn, fetchColumnFamily, getFetchedColumns, removeScanIterator, setColumnFamilyRegex, setColumnQualifierRegex, setOptions, setRowRegex, setScanIteratorOption, setScanIterators, setupRegex, setValueRegex, updateScanIteratorOption
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.accumulo.core.client.BatchDeleter
close, setRanges
 
Methods inherited from interface org.apache.accumulo.core.client.ScannerBase
addScanIterator, clearColumns, clearScanIterators, fetchColumn, fetchColumnFamily, iterator, removeScanIterator, setColumnFamilyRegex, setColumnQualifierRegex, setRowRegex, setScanIteratorOption, setScanIterators, setupRegex, setValueRegex, updateScanIteratorOption
 

Constructor Detail

MockBatchDeleter

public MockBatchDeleter(MockAccumulo acc,
                        String tableName,
                        Authorizations auths)
Create a BatchDeleter for the specified instance on the specified table where the writer uses the specified Authorizations.

Parameters:
acc -
tableName -
auths -
Method Detail

delete

public void delete()
            throws MutationsRejectedException,
                   TableNotFoundException
Description copied from interface: BatchDeleter
Deletes the ranges specified by BatchDeleter.setRanges(java.util.Collection).

Specified by:
delete in interface BatchDeleter
Throws:
MutationsRejectedException - this can be thrown when deletion mutations fail
TableNotFoundException - when the table does not exist


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