org.apache.accumulo.gc
Interface GarbageCollectionEnvironment


public interface GarbageCollectionEnvironment


Method Summary
 void delete(SortedMap<String,String> candidateMap)
          Delete the given files from the provided Map of relative path to absolute path for each file that should be deleted
 void deleteTableDirIfEmpty(String tableID)
          Delete a table's directory if it is empty.
 Iterator<String> getBlipIterator()
          Fetch a list of paths for all bulk loads in progress (blip) from a given table, RootTable.NAME or MetadataTable.NAME
 List<String> getCandidates(String continuePoint)
          Return a list of paths to files and dirs which are candidates for deletion from a given table, RootTable.NAME or MetadataTable.NAME
 Iterator<Map.Entry<Key,Value>> getReferenceIterator()
          Fetches the references to files, MetadataSchema.TabletsSection.DataFileColumnFamily.NAME or MetadataSchema.TabletsSection.ScanFileColumnFamily.NAME, from tablets
 Set<String> getTableIDs()
          Return the set of tableIDs for the given instance this GarbageCollector is running over
 void incrementCandidatesStat(long i)
          Increment the number of candidates for deletion for the current garbage collection run
 void incrementInUseStat(long i)
          Increment the number of files still in use for the current garbage collection run
 

Method Detail

getCandidates

List<String> getCandidates(String continuePoint)
                           throws TableNotFoundException,
                                  AccumuloException,
                                  AccumuloSecurityException
Return a list of paths to files and dirs which are candidates for deletion from a given table, RootTable.NAME or MetadataTable.NAME

Parameters:
continuePoint - A row to resume from if a previous invocation was stopped due to finding an extremely large number of candidates to remove which would have exceeded memory limitations
Returns:
A collection of candidates files for deletion, may not be the complete collection of files for deletion at this point in time
Throws:
TableNotFoundException
AccumuloException
AccumuloSecurityException

getBlipIterator

Iterator<String> getBlipIterator()
                                 throws TableNotFoundException,
                                        AccumuloException,
                                        AccumuloSecurityException
Fetch a list of paths for all bulk loads in progress (blip) from a given table, RootTable.NAME or MetadataTable.NAME

Returns:
The list of files for each bulk load currently in progress.
Throws:
TableNotFoundException
AccumuloException
AccumuloSecurityException

getReferenceIterator

Iterator<Map.Entry<Key,Value>> getReferenceIterator()
                                                    throws TableNotFoundException,
                                                           AccumuloException,
                                                           AccumuloSecurityException
Fetches the references to files, MetadataSchema.TabletsSection.DataFileColumnFamily.NAME or MetadataSchema.TabletsSection.ScanFileColumnFamily.NAME, from tablets

Returns:
An Iterator of Map.Entry<Key, Value> which constitute a reference to a file.
Throws:
TableNotFoundException
AccumuloException
AccumuloSecurityException

getTableIDs

Set<String> getTableIDs()
Return the set of tableIDs for the given instance this GarbageCollector is running over

Returns:
The valueSet for the table name to table id map.

delete

void delete(SortedMap<String,String> candidateMap)
            throws IOException,
                   AccumuloException,
                   AccumuloSecurityException,
                   TableNotFoundException
Delete the given files from the provided Map of relative path to absolute path for each file that should be deleted

Parameters:
candidateMap - A Map from relative path to absolute path for files to be deleted.
Throws:
IOException
AccumuloException
AccumuloSecurityException
TableNotFoundException

deleteTableDirIfEmpty

void deleteTableDirIfEmpty(String tableID)
                           throws IOException
Delete a table's directory if it is empty.

Parameters:
tableID - The id of the table whose directory we are to operate on
Throws:
IOException

incrementCandidatesStat

void incrementCandidatesStat(long i)
Increment the number of candidates for deletion for the current garbage collection run

Parameters:
i - Value to increment the deletion candidates by

incrementInUseStat

void incrementInUseStat(long i)
Increment the number of files still in use for the current garbage collection run

Parameters:
i - Value to increment the still-in-use count by.


Copyright © 2015 Apache Accumulo Project. All rights reserved.