org.apache.accumulo.core.client.admin
Interface TableOperations

All Known Implementing Classes:
MockTableOperations, TableOperationsHelper, TableOperationsHelper, TableOperationsImpl, TableOperationsImpl

public interface TableOperations

Provides a class for administering tables


Method Summary
 int addConstraint(String tableName, String constraintClassName)
          Add a new constraint to a table.
 void addSplits(String tableName, SortedSet<org.apache.hadoop.io.Text> partitionKeys)
          Ensures that tablets are split along a set of keys.
 void attachIterator(String tableName, IteratorSetting setting)
          Add an iterator to a table on all scopes.
 void attachIterator(String tableName, IteratorSetting setting, EnumSet<IteratorUtil.IteratorScope> scopes)
          Add an iterator to a table on the given scopes.
 void cancelCompaction(String tableName)
          Cancels a user initiated major compaction of a table initiated with compact(String, Text, Text, boolean, boolean) or compact(String, Text, Text, List, boolean, boolean).
 void checkIteratorConflicts(String tableName, IteratorSetting setting, EnumSet<IteratorUtil.IteratorScope> scopes)
          Check whether a given iterator configuration conflicts with existing configuration; in particular, determine if the name or priority are already in use for the specified scopes.
 void clearLocatorCache(String tableName)
          Clears the tablet locator cache for a specified table
 void clone(String srcTableName, String newTableName, boolean flush, Map<String,String> propertiesToSet, Set<String> propertiesToExclude)
          Clone a table from an existing table.
 void compact(String tableName, org.apache.hadoop.io.Text start, org.apache.hadoop.io.Text end, boolean flush, boolean wait)
          Starts a full major compaction of the tablets in the range (start, end].
 void compact(String tableName, org.apache.hadoop.io.Text start, org.apache.hadoop.io.Text end, List<IteratorSetting> iterators, boolean flush, boolean wait)
          Starts a full major compaction of the tablets in the range (start, end].
 void create(String tableName)
          Create a table with no special configuration
 void create(String tableName, boolean limitVersion)
           
 void create(String tableName, boolean versioningIter, TimeType timeType)
           
 void delete(String tableName)
          Delete a table
 void deleteRows(String tableName, org.apache.hadoop.io.Text start, org.apache.hadoop.io.Text end)
          Delete rows between (start, end]
 boolean exists(String tableName)
          A method to check if a table exists in Accumulo.
 void exportTable(String tableName, String exportDir)
          Exports a table.
 void flush(String tableName)
          Deprecated. As of release 1.4, replaced by flush(String, Text, Text, boolean)
 void flush(String tableName, org.apache.hadoop.io.Text start, org.apache.hadoop.io.Text end, boolean wait)
          Flush a table's data that is currently in memory.
 List<DiskUsage> getDiskUsage(Set<String> tables)
          Gets the number of bytes being used in the files for a set of tables
 IteratorSetting getIteratorSetting(String tableName, String name, IteratorUtil.IteratorScope scope)
          Get the settings for an iterator.
 Map<String,Set<org.apache.hadoop.io.Text>> getLocalityGroups(String tableName)
          Gets the locality groups currently set for a table.
 org.apache.hadoop.io.Text getMaxRow(String tableName, Authorizations auths, org.apache.hadoop.io.Text startRow, boolean startInclusive, org.apache.hadoop.io.Text endRow, boolean endInclusive)
          Finds the max row within a given range.
 Iterable<Map.Entry<String,String>> getProperties(String tableName)
          Gets properties of a table.
 Collection<org.apache.hadoop.io.Text> getSplits(String tableName)
          Deprecated. since 1.5.0; use listSplits(String) instead.
 Collection<org.apache.hadoop.io.Text> getSplits(String tableName, int maxSplits)
          Deprecated. since 1.5.0; use listSplits(String, int) instead.
 void importDirectory(String tableName, String dir, String failureDir, boolean setTime)
          Bulk import all the files in a directory into a table.
 void importTable(String tableName, String importDir)
          Imports a table exported via exportTable and copied via hadoop distcp.
 SortedSet<String> list()
          Retrieve a list of tables in Accumulo.
 Map<String,Integer> listConstraints(String tableName)
          List constraints on a table with their assigned numbers.
 Map<String,EnumSet<IteratorUtil.IteratorScope>> listIterators(String tableName)
          Get a list of iterators for this table.
 Collection<org.apache.hadoop.io.Text> listSplits(String tableName)
           
 Collection<org.apache.hadoop.io.Text> listSplits(String tableName, int maxSplits)
           
 void merge(String tableName, org.apache.hadoop.io.Text start, org.apache.hadoop.io.Text end)
          Merge tablets between (start, end]
 void offline(String tableName)
          Initiates taking a table offline, but does not wait for action to complete
 void offline(String tableName, boolean wait)
           
 void online(String tableName)
          Initiates bringing a table online, but does not wait for action to complete
 void online(String tableName, boolean wait)
           
 void removeConstraint(String tableName, int number)
          Remove a constraint from a table.
 void removeIterator(String tableName, String name, EnumSet<IteratorUtil.IteratorScope> scopes)
          Remove an iterator from a table by name.
 void removeProperty(String tableName, String property)
          Removes a property from a table.
 void rename(String oldTableName, String newTableName)
          Rename a table
 void setLocalityGroups(String tableName, Map<String,Set<org.apache.hadoop.io.Text>> groups)
          Sets a table's locality groups.
 void setProperty(String tableName, String property, String value)
          Sets a property on a table.
 Set<Range> splitRangeByTablets(String tableName, Range range, int maxSplits)
           
 Map<String,String> tableIdMap()
          Get a mapping of table name to internal table id.
 boolean testClassLoad(String tableName, String className, String asTypeName)
          Test to see if the instance can load the given class as the given type.
 

Method Detail

list

SortedSet<String> list()
Retrieve a list of tables in Accumulo.

Returns:
List of tables in accumulo

exists

boolean exists(String tableName)
A method to check if a table exists in Accumulo.

Parameters:
tableName - the name of the table
Returns:
true if the table exists

create

void create(String tableName)
            throws AccumuloException,
                   AccumuloSecurityException,
                   TableExistsException
Create a table with no special configuration

Parameters:
tableName - the name of the table
Throws:
AccumuloException - if a general error occurs
AccumuloSecurityException - if the user does not have permission
TableExistsException - if the table already exists

create

void create(String tableName,
            boolean limitVersion)
            throws AccumuloException,
                   AccumuloSecurityException,
                   TableExistsException
Parameters:
tableName - the name of the table
limitVersion - Enables/disables the versioning iterator, which will limit the number of Key versions kept.
Throws:
AccumuloException - if a general error occurs
AccumuloSecurityException - if the user does not have permission
TableExistsException - if the table already exists

create

void create(String tableName,
            boolean versioningIter,
            TimeType timeType)
            throws AccumuloException,
                   AccumuloSecurityException,
                   TableExistsException
Parameters:
tableName - the name of the table
versioningIter - Enables/disables the versioning iterator, which will limit the number of Key versions kept.
timeType - specifies logical or real-time based time recording for entries in the table
Throws:
AccumuloException - if a general error occurs
AccumuloSecurityException - if the user does not have permission
TableExistsException - if the table already exists

importTable

void importTable(String tableName,
                 String importDir)
                 throws TableExistsException,
                        AccumuloException,
                        AccumuloSecurityException
Imports a table exported via exportTable and copied via hadoop distcp.

Parameters:
tableName - Name of a table to create and import into.
importDir - Directory that contains the files copied by distcp from exportTable
Throws:
TableExistsException
AccumuloException
AccumuloSecurityException
Since:
1.5.0

exportTable

void exportTable(String tableName,
                 String exportDir)
                 throws TableNotFoundException,
                        AccumuloException,
                        AccumuloSecurityException
Exports a table. The tables data is not exported, just table metadata and a list of files to distcp. The table being exported must be offline and stay offline for the duration of distcp. To avoid losing access to a table it can be cloned and the clone taken offline for export.

See docs/examples/README.export

Parameters:
tableName - Name of the table to export.
exportDir - An empty directory in HDFS where files containing table metadata and list of files to distcp will be placed.
Throws:
TableNotFoundException
AccumuloException
AccumuloSecurityException
Since:
1.5.0

addSplits

void addSplits(String tableName,
               SortedSet<org.apache.hadoop.io.Text> partitionKeys)
               throws TableNotFoundException,
                      AccumuloException,
                      AccumuloSecurityException
Ensures that tablets are split along a set of keys.

Note that while the documentation for Text specifies that its bytestream should be UTF-8, the encoding is not enforced by operations that work with byte arrays.

For example, you can create 256 evenly-sliced splits via the following code sample even though the given byte sequences are not valid UTF-8.

 TableOperations tableOps = connector.tableOperations();
 TreeSet<Text> splits = new TreeSet<Text>();
 for (int i = 0; i < 256; i++) {
   byte[] bytes = {(byte) i};
   splits.add(new Text(bytes));
 }
 tableOps.addSplits(TABLE_NAME, splits);
 

Parameters:
tableName - the name of the table
partitionKeys - a sorted set of row key values to pre-split the table on
Throws:
AccumuloException - if a general error occurs
AccumuloSecurityException - if the user does not have permission
TableNotFoundException - if the table does not exist

getSplits

@Deprecated
Collection<org.apache.hadoop.io.Text> getSplits(String tableName)
                                                throws TableNotFoundException
Deprecated. since 1.5.0; use listSplits(String) instead.

Parameters:
tableName - the name of the table
Returns:
the split points (end-row names) for the table's current split profile
Throws:
TableNotFoundException - if the table does not exist

listSplits

Collection<org.apache.hadoop.io.Text> listSplits(String tableName)
                                                 throws TableNotFoundException,
                                                        AccumuloSecurityException,
                                                        AccumuloException
Parameters:
tableName - the name of the table
Returns:
the split points (end-row names) for the table's current split profile
Throws:
TableNotFoundException - if the table does not exist
AccumuloException - if a general error occurs
AccumuloSecurityException - if the user does not have permission
Since:
1.5.0

getSplits

@Deprecated
Collection<org.apache.hadoop.io.Text> getSplits(String tableName,
                                                           int maxSplits)
                                                throws TableNotFoundException
Deprecated. since 1.5.0; use listSplits(String, int) instead.

Parameters:
tableName - the name of the table
maxSplits - specifies the maximum number of splits to return
Returns:
the split points (end-row names) for the table's current split profile, grouped into fewer splits so as not to exceed maxSplits
Throws:
TableNotFoundException

listSplits

Collection<org.apache.hadoop.io.Text> listSplits(String tableName,
                                                 int maxSplits)
                                                 throws TableNotFoundException,
                                                        AccumuloSecurityException,
                                                        AccumuloException
Parameters:
tableName - the name of the table
maxSplits - specifies the maximum number of splits to return
Returns:
the split points (end-row names) for the table's current split profile, grouped into fewer splits so as not to exceed maxSplits
Throws:
AccumuloException - if a general error occurs
AccumuloSecurityException - if the user does not have permission
TableNotFoundException
Since:
1.5.0

getMaxRow

org.apache.hadoop.io.Text getMaxRow(String tableName,
                                    Authorizations auths,
                                    org.apache.hadoop.io.Text startRow,
                                    boolean startInclusive,
                                    org.apache.hadoop.io.Text endRow,
                                    boolean endInclusive)
                                    throws TableNotFoundException,
                                           AccumuloException,
                                           AccumuloSecurityException
Finds the max row within a given range. To find the max row in a table, pass null for start and end row.

Parameters:
auths - find the max row that can seen with these auths
startRow - row to start looking at, null means -Infinity
startInclusive - determines if the start row is included
endRow - row to stop looking at, null means Infinity
endInclusive - determines if the end row is included
Returns:
The max row in the range, or null if there is no visible data in the range.
Throws:
TableNotFoundException
AccumuloException
AccumuloSecurityException

merge

void merge(String tableName,
           org.apache.hadoop.io.Text start,
           org.apache.hadoop.io.Text end)
           throws AccumuloException,
                  AccumuloSecurityException,
                  TableNotFoundException
Merge tablets between (start, end]

Parameters:
tableName - the table to merge
start - first tablet to be merged contains the row after this row, null means the first tablet
end - last tablet to be merged contains this row, null means the last tablet
Throws:
AccumuloException
AccumuloSecurityException
TableNotFoundException

deleteRows

void deleteRows(String tableName,
                org.apache.hadoop.io.Text start,
                org.apache.hadoop.io.Text end)
                throws AccumuloException,
                       AccumuloSecurityException,
                       TableNotFoundException
Delete rows between (start, end]

Parameters:
tableName - the table to merge
start - delete rows after this, null means the first row of the table
end - last row to be deleted, inclusive, null means the last row of the table
Throws:
AccumuloException
AccumuloSecurityException
TableNotFoundException

compact

void compact(String tableName,
             org.apache.hadoop.io.Text start,
             org.apache.hadoop.io.Text end,
             boolean flush,
             boolean wait)
             throws AccumuloSecurityException,
                    TableNotFoundException,
                    AccumuloException
Starts a full major compaction of the tablets in the range (start, end]. The compaction is preformed even for tablets that have only one file.

Parameters:
tableName - the table to compact
start - first tablet to be compacted contains the row after this row, null means the first tablet in table
end - last tablet to be merged contains this row, null means the last tablet in table
flush - when true, table memory is flushed before compaction starts
wait - when true, the call will not return until compactions are finished
Throws:
AccumuloSecurityException
TableNotFoundException
AccumuloException

compact

void compact(String tableName,
             org.apache.hadoop.io.Text start,
             org.apache.hadoop.io.Text end,
             List<IteratorSetting> iterators,
             boolean flush,
             boolean wait)
             throws AccumuloSecurityException,
                    TableNotFoundException,
                    AccumuloException
Starts a full major compaction of the tablets in the range (start, end]. The compaction is preformed even for tablets that have only one file.

Parameters:
tableName - the table to compact
start - first tablet to be compacted contains the row after this row, null means the first tablet in table
end - last tablet to be merged contains this row, null means the last tablet in table
iterators - A set of iterators that will be applied to each tablet compacted
flush - when true, table memory is flushed before compaction starts
wait - when true, the call will not return until compactions are finished
Throws:
AccumuloSecurityException
TableNotFoundException
AccumuloException
Since:
1.5.0

cancelCompaction

void cancelCompaction(String tableName)
                      throws AccumuloSecurityException,
                             TableNotFoundException,
                             AccumuloException
Cancels a user initiated major compaction of a table initiated with compact(String, Text, Text, boolean, boolean) or compact(String, Text, Text, List, boolean, boolean). Compactions of tablets that are currently running may finish, but new compactions of tablets will not start.

Parameters:
tableName - the name of the table
Throws:
AccumuloException - if a general error occurs
TableNotFoundException - if the table does not exist
AccumuloSecurityException - if the user does not have permission
Since:
1.5.0

delete

void delete(String tableName)
            throws AccumuloException,
                   AccumuloSecurityException,
                   TableNotFoundException
Delete a table

Parameters:
tableName - the name of the table
Throws:
AccumuloException - if a general error occurs
AccumuloSecurityException - if the user does not have permission
TableNotFoundException - if the table does not exist

clone

void clone(String srcTableName,
           String newTableName,
           boolean flush,
           Map<String,String> propertiesToSet,
           Set<String> propertiesToExclude)
           throws AccumuloException,
                  AccumuloSecurityException,
                  TableNotFoundException,
                  TableExistsException
Clone a table from an existing table. The cloned table will have the same data as the source table it was created from. After cloning, the two tables can mutate independently. Initially the cloned table should not use any extra space, however as the source table and cloned table major compact extra space will be used by the clone. Initially the cloned table is only readable and writable by the user who created it.

Parameters:
srcTableName - the table to clone
newTableName - the name of the clone
flush - determines if memory is flushed in the source table before cloning.
propertiesToSet - the sources tables properties are copied, this allows overriding of those properties
propertiesToExclude - do not copy these properties from the source table, just revert to system defaults
Throws:
AccumuloException
AccumuloSecurityException
TableNotFoundException
TableExistsException

rename

void rename(String oldTableName,
            String newTableName)
            throws AccumuloSecurityException,
                   TableNotFoundException,
                   AccumuloException,
                   TableExistsException
Rename a table

Parameters:
oldTableName - the old table name
newTableName - the new table name, which must be in the same namespace as the oldTableName
Throws:
AccumuloException - if a general error occurs
AccumuloSecurityException - if the user does not have permission
TableNotFoundException - if the old table name does not exist
TableExistsException - if the new table name already exists

flush

@Deprecated
void flush(String tableName)
           throws AccumuloException,
                  AccumuloSecurityException
Deprecated. As of release 1.4, replaced by flush(String, Text, Text, boolean)

Initiate a flush of a table's data that is in memory

Parameters:
tableName - the name of the table
Throws:
AccumuloException - if a general error occurs
AccumuloSecurityException - if the user does not have permission

flush

void flush(String tableName,
           org.apache.hadoop.io.Text start,
           org.apache.hadoop.io.Text end,
           boolean wait)
           throws AccumuloException,
                  AccumuloSecurityException,
                  TableNotFoundException
Flush a table's data that is currently in memory.

Parameters:
tableName - the name of the table
wait - if true the call will not return until all data present in memory when the call was is flushed if false will initiate a flush of data in memory, but will not wait for it to complete
Throws:
AccumuloException - if a general error occurs
AccumuloSecurityException - if the user does not have permission
TableNotFoundException

setProperty

void setProperty(String tableName,
                 String property,
                 String value)
                 throws AccumuloException,
                        AccumuloSecurityException
Sets a property on a table. Note that it may take a short period of time (a second) to propagate the change everywhere.

Parameters:
tableName - the name of the table
property - the name of a per-table property
value - the value to set a per-table property to
Throws:
AccumuloException - if a general error occurs
AccumuloSecurityException - if the user does not have permission

removeProperty

void removeProperty(String tableName,
                    String property)
                    throws AccumuloException,
                           AccumuloSecurityException
Removes a property from a table. Note that it may take a short period of time (a second) to propagate the change everywhere.

Parameters:
tableName - the name of the table
property - the name of a per-table property
Throws:
AccumuloException - if a general error occurs
AccumuloSecurityException - if the user does not have permission

getProperties

Iterable<Map.Entry<String,String>> getProperties(String tableName)
                                                 throws AccumuloException,
                                                        TableNotFoundException
Gets properties of a table. Note that recently changed properties may not be available immediately.

Parameters:
tableName - the name of the table
Returns:
all properties visible by this table (system and per-table properties). Note that recently changed properties may not be visible immediately.
Throws:
TableNotFoundException - if the table does not exist
AccumuloException

setLocalityGroups

void setLocalityGroups(String tableName,
                       Map<String,Set<org.apache.hadoop.io.Text>> groups)
                       throws AccumuloException,
                              AccumuloSecurityException,
                              TableNotFoundException
Sets a table's locality groups. A table's locality groups can be changed at any time.

Parameters:
tableName - the name of the table
groups - mapping of locality group names to column families in the locality group
Throws:
AccumuloException - if a general error occurs
AccumuloSecurityException - if the user does not have permission
TableNotFoundException - if the table does not exist

getLocalityGroups

Map<String,Set<org.apache.hadoop.io.Text>> getLocalityGroups(String tableName)
                                                             throws AccumuloException,
                                                                    TableNotFoundException
Gets the locality groups currently set for a table.

Parameters:
tableName - the name of the table
Returns:
mapping of locality group names to column families in the locality group
Throws:
AccumuloException - if a general error occurs
TableNotFoundException - if the table does not exist

splitRangeByTablets

Set<Range> splitRangeByTablets(String tableName,
                               Range range,
                               int maxSplits)
                               throws AccumuloException,
                                      AccumuloSecurityException,
                                      TableNotFoundException
Parameters:
tableName - the name of the table
range - a range to split
maxSplits - the maximum number of splits
Returns:
the range, split into smaller ranges that fall on boundaries of the table's split points as evenly as possible
Throws:
AccumuloException - if a general error occurs
AccumuloSecurityException - if the user does not have permission
TableNotFoundException - if the table does not exist

importDirectory

void importDirectory(String tableName,
                     String dir,
                     String failureDir,
                     boolean setTime)
                     throws TableNotFoundException,
                            IOException,
                            AccumuloException,
                            AccumuloSecurityException
Bulk import all the files in a directory into a table.

Parameters:
tableName - the name of the table
dir - the HDFS directory to find files for importing
failureDir - the HDFS directory to place files that failed to be imported, must exist and be empty
setTime - override the time values in the input files, and use the current time for all mutations
Throws:
IOException - when there is an error reading/writing to HDFS
AccumuloException - when there is a general accumulo error
AccumuloSecurityException - when the user does not have the proper permissions
TableNotFoundException - when the table no longer exists

offline

void offline(String tableName)
             throws AccumuloSecurityException,
                    AccumuloException,
                    TableNotFoundException
Initiates taking a table offline, but does not wait for action to complete

Parameters:
tableName - the table to take offline
Throws:
AccumuloException - when there is a general accumulo error
AccumuloSecurityException - when the user does not have the proper permissions
TableNotFoundException

offline

void offline(String tableName,
             boolean wait)
             throws AccumuloSecurityException,
                    AccumuloException,
                    TableNotFoundException
Parameters:
tableName - the table to take offline
wait - if true, then will not return until table is offline
Throws:
AccumuloException - when there is a general accumulo error
AccumuloSecurityException - when the user does not have the proper permissions
TableNotFoundException
Since:
1.6.0

online

void online(String tableName)
            throws AccumuloSecurityException,
                   AccumuloException,
                   TableNotFoundException
Initiates bringing a table online, but does not wait for action to complete

Parameters:
tableName - the table to take online
Throws:
AccumuloException - when there is a general accumulo error
AccumuloSecurityException - when the user does not have the proper permissions
TableNotFoundException

online

void online(String tableName,
            boolean wait)
            throws AccumuloSecurityException,
                   AccumuloException,
                   TableNotFoundException
Parameters:
tableName - the table to take online
wait - if true, then will not return until table is online
Throws:
AccumuloException - when there is a general accumulo error
AccumuloSecurityException - when the user does not have the proper permissions
TableNotFoundException
Since:
1.6.0

clearLocatorCache

void clearLocatorCache(String tableName)
                       throws TableNotFoundException
Clears the tablet locator cache for a specified table

Parameters:
tableName - the name of the table
Throws:
TableNotFoundException - if table does not exist

tableIdMap

Map<String,String> tableIdMap()
Get a mapping of table name to internal table id.

Returns:
the map from table name to internal table id

attachIterator

void attachIterator(String tableName,
                    IteratorSetting setting)
                    throws AccumuloSecurityException,
                           AccumuloException,
                           TableNotFoundException
Add an iterator to a table on all scopes.

Parameters:
tableName - the name of the table
setting - object specifying the properties of the iterator
Throws:
AccumuloSecurityException - thrown if the user does not have the ability to set properties on the table
TableNotFoundException - throw if the table no longer exists
IllegalArgumentException - if the setting conflicts with any existing iterators
AccumuloException

attachIterator

void attachIterator(String tableName,
                    IteratorSetting setting,
                    EnumSet<IteratorUtil.IteratorScope> scopes)
                    throws AccumuloSecurityException,
                           AccumuloException,
                           TableNotFoundException
Add an iterator to a table on the given scopes.

Parameters:
tableName - the name of the table
setting - object specifying the properties of the iterator
Throws:
AccumuloSecurityException - thrown if the user does not have the ability to set properties on the table
TableNotFoundException - throw if the table no longer exists
IllegalArgumentException - if the setting conflicts with any existing iterators
AccumuloException

removeIterator

void removeIterator(String tableName,
                    String name,
                    EnumSet<IteratorUtil.IteratorScope> scopes)
                    throws AccumuloSecurityException,
                           AccumuloException,
                           TableNotFoundException
Remove an iterator from a table by name.

Parameters:
tableName - the name of the table
name - the name of the iterator
scopes - the scopes of the iterator
Throws:
AccumuloSecurityException - thrown if the user does not have the ability to set properties on the table
TableNotFoundException - throw if the table no longer exists
AccumuloException

getIteratorSetting

IteratorSetting getIteratorSetting(String tableName,
                                   String name,
                                   IteratorUtil.IteratorScope scope)
                                   throws AccumuloSecurityException,
                                          AccumuloException,
                                          TableNotFoundException
Get the settings for an iterator.

Parameters:
tableName - the name of the table
name - the name of the iterator
scope - the scope of the iterator
Returns:
the settings for this iterator
Throws:
AccumuloSecurityException - thrown if the user does not have the ability to set properties on the table
TableNotFoundException - throw if the table no longer exists
AccumuloException

listIterators

Map<String,EnumSet<IteratorUtil.IteratorScope>> listIterators(String tableName)
                                                              throws AccumuloSecurityException,
                                                                     AccumuloException,
                                                                     TableNotFoundException
Get a list of iterators for this table.

Parameters:
tableName - the name of the table
Returns:
a set of iterator names
Throws:
AccumuloSecurityException
AccumuloException
TableNotFoundException

checkIteratorConflicts

void checkIteratorConflicts(String tableName,
                            IteratorSetting setting,
                            EnumSet<IteratorUtil.IteratorScope> scopes)
                            throws AccumuloException,
                                   TableNotFoundException
Check whether a given iterator configuration conflicts with existing configuration; in particular, determine if the name or priority are already in use for the specified scopes.

Parameters:
tableName - the name of the table
setting - object specifying the properties of the iterator
Throws:
AccumuloException
TableNotFoundException

addConstraint

int addConstraint(String tableName,
                  String constraintClassName)
                  throws AccumuloException,
                         AccumuloSecurityException,
                         TableNotFoundException
Add a new constraint to a table.

Parameters:
tableName - the name of the table
constraintClassName - the full name of the constraint class
Returns:
the unique number assigned to the constraint
Throws:
AccumuloException - thrown if the constraint has already been added to the table or if there are errors in the configuration of existing constraints
AccumuloSecurityException - thrown if the user doesn't have permission to add the constraint
TableNotFoundException
Since:
1.5.0

removeConstraint

void removeConstraint(String tableName,
                      int number)
                      throws AccumuloException,
                             AccumuloSecurityException
Remove a constraint from a table.

Parameters:
tableName - the name of the table
number - the unique number assigned to the constraint
Throws:
AccumuloSecurityException - thrown if the user doesn't have permission to remove the constraint
AccumuloException
Since:
1.5.0

listConstraints

Map<String,Integer> listConstraints(String tableName)
                                    throws AccumuloException,
                                           TableNotFoundException
List constraints on a table with their assigned numbers.

Parameters:
tableName - the name of the table
Returns:
a map from constraint class name to assigned number
Throws:
AccumuloException - thrown if there are errors in the configuration of existing constraints
TableNotFoundException
Since:
1.5.0

getDiskUsage

List<DiskUsage> getDiskUsage(Set<String> tables)
                             throws AccumuloException,
                                    AccumuloSecurityException,
                                    TableNotFoundException
Gets the number of bytes being used in the files for a set of tables

Parameters:
tables - a set of tables
Returns:
a list of disk usage objects containing linked table names and sizes
Throws:
AccumuloException
AccumuloSecurityException
TableNotFoundException
Since:
1.6.0

testClassLoad

boolean testClassLoad(String tableName,
                      String className,
                      String asTypeName)
                      throws AccumuloException,
                             AccumuloSecurityException,
                             TableNotFoundException
Test to see if the instance can load the given class as the given type. This check uses the table classpath if it is set.

Returns:
true if the instance can load the given class as the given type, false otherwise
Throws:
AccumuloException
AccumuloSecurityException
TableNotFoundException
Since:
1.5.0


Copyright © 2015 Apache Accumulo Project. All rights reserved.