public interface Admin
extends java.lang.AutoCloseable
Modifier and Type | Method and Description |
---|---|
void |
alterFamily(org.apache.hadoop.fs.Path tablePath,
java.lang.String familyName,
FamilyDescriptor familyDesc) |
void |
alterFamily(java.lang.String tablePath,
java.lang.String familyName,
FamilyDescriptor familyDesc) |
void |
alterTable(TableDescriptor tableDesc)
Modify the attributes of an existing table.
|
void |
close()
Override
AutoCloseable.close() to avoid declaring a checked exception. |
Table |
createTable(org.apache.hadoop.fs.Path tablePath)
Creates a Json table at the specified path with 'default' column family and default options.
|
Table |
createTable(java.lang.String tablePath)
Creates a Json table at the specified path with 'default' column family and default options.
|
Table |
createTable(TableDescriptor tableDesc)
Creates a Json table using the specified TableDescriptor.
|
Table |
createTable(TableDescriptor tableDesc,
java.nio.ByteBuffer[] splitPoints)
Creates a pre-split JSON table using the specified TableDescriptor and the split points
as the tablet boundaries.
|
Table |
createTable(TableDescriptor tableDesc,
java.lang.String[] splitPoints)
Creates a pre-split Json table using the specified TableDescriptor and the split points
as the tablet boundaries.
|
boolean |
deleteFamily(org.apache.hadoop.fs.Path tablePath,
java.lang.String familyName)
Deletes a family from a Json table.
|
boolean |
deleteFamily(java.lang.String tablePath,
java.lang.String familyName)
Deletes a family from a Json table.
|
boolean |
deleteTable(org.apache.hadoop.fs.Path tablePath)
Deletes a Table.
|
boolean |
deleteTable(java.lang.String tablePath)
Deletes a Table.
|
TableDescriptor |
getTableDescriptor(org.apache.hadoop.fs.Path tablePath) |
TableDescriptor |
getTableDescriptor(java.lang.String tablePath) |
java.util.Collection<IndexDesc> |
getTableIndexes(org.apache.hadoop.fs.Path tablePath)
Returns a collection of descriptors for secondary indexes for the
specified table that are ready to server queries.
|
java.util.Collection<IndexDesc> |
getTableIndexes(java.lang.String tablePath)
Returns a collection of descriptors for secondary indexes for the
specified table that are ready to server queries.
|
java.util.List<org.apache.hadoop.fs.Path> |
listTables()
List all tables in user's home directory.
|
java.util.List<org.apache.hadoop.fs.Path> |
listTables(org.apache.hadoop.fs.Path folderOrPattern)
List all tables in the specified folder and/or with the matching pattern.
|
java.util.List<org.apache.hadoop.fs.Path> |
listTables(java.lang.String folderOrPattern)
List all tables in the specified folder and/or with the matching pattern.
|
boolean |
tableExists(org.apache.hadoop.fs.Path tablePath) |
boolean |
tableExists(java.lang.String tablePath) |
java.util.List<org.apache.hadoop.fs.Path> listTables() throws DBException
DBException
java.util.List<org.apache.hadoop.fs.Path> listTables(java.lang.String folderOrPattern) throws DBException
folderOrPattern
- the parent folder or patternDBException
java.util.List<org.apache.hadoop.fs.Path> listTables(org.apache.hadoop.fs.Path folderOrPattern) throws DBException
folderOrPattern
- the parent folder or patternDBException
Table createTable(java.lang.String tablePath) throws TableExistsException, DBException
tablePath
- The table path.
The table path can be either absolute or relative to user's home directory.
The absolute path can be specified as "/<tablepath>" for tables in default
cluster or as "/mapr/<clustername>/<tablepath>" for tables
in the specified clusterTableExistsException
- if a table with the specified path already exitsDBException
- if some DBException occursTable createTable(org.apache.hadoop.fs.Path tablePath) throws TableExistsException, DBException
tablePath
- The table path.
The table path can be either absolute or relative to user's home directory.
The absolute path can be specified as "/<tablepath>" for tables in default
cluster or as "/mapr/<clustername>/<tablepath>" for tables
in the specified clusterTableExistsException
- if a table with the specified path already exitsDBException
- if some DBException occursTable createTable(TableDescriptor tableDesc) throws TableExistsException, DBException
tableDesc
- the TableDescriptor containing various attributes of this tableTableExistsException
- if the table already exist at the specified pathDBException
- if an DBException occursTable createTable(TableDescriptor tableDesc, java.lang.String[] splitPoints) throws TableExistsException, DBException
tableDesc
- the TableDescriptor containing various attributes of this tablesplitPoints
- the split points for this tableTableExistsException
DBException
Table createTable(TableDescriptor tableDesc, java.nio.ByteBuffer[] splitPoints) throws TableExistsException, DBException
tableDesc
- the TableDescriptor containing various attributes of this tablesplitPoints
- the split points for this tableTableExistsException
DBException
void alterTable(TableDescriptor tableDesc) throws TableNotFoundException, OpNotPermittedException, DBException
tableDesc
- the TableDescriptor containing various attributes of this tableTableNotFoundException
OpNotPermittedException
- if an attribute is requested to be modified but is not allowedDBException
boolean deleteFamily(java.lang.String tablePath, java.lang.String familyName) throws TableNotFoundException, FamilyNotFoundException, DBException
tablePath
- familyName
- true
if and only if the family is successfully deleted;
false
otherwiseDBException
TableNotFoundException
FamilyNotFoundException
boolean deleteFamily(org.apache.hadoop.fs.Path tablePath, java.lang.String familyName) throws TableNotFoundException, FamilyNotFoundException, DBException
tablePath
- familyName
- true
if and only if the family is successfully deleted;
false
otherwiseDBException
TableNotFoundException
FamilyNotFoundException
void alterFamily(java.lang.String tablePath, java.lang.String familyName, FamilyDescriptor familyDesc) throws TableNotFoundException, FamilyNotFoundException, OpNotPermittedException, DBException
tablePath
- familyName
- familyDesc
- TableNotFoundException
FamilyNotFoundException
OpNotPermittedException
- if an attribute is requested to be modified but is not allowedDBException
void alterFamily(org.apache.hadoop.fs.Path tablePath, java.lang.String familyName, FamilyDescriptor familyDesc) throws TableNotFoundException, FamilyNotFoundException, OpNotPermittedException, DBException
tablePath
- familyName
- familyDesc
- TableNotFoundException
FamilyNotFoundException
OpNotPermittedException
- if an attribute is requested to be modified but is not allowedDBException
boolean tableExists(java.lang.String tablePath) throws DBException
tablePath
- The table path.
The table path can be either absolute or relative to user's home directory.
The absolute path can be specified as "/<tablepath>" for tables in default
cluster or as "/mapr/<clustername>/<tablepath>" for tables
in the specified clustertrue
if the specified path exists and is a tableDBException
boolean tableExists(org.apache.hadoop.fs.Path tablePath) throws DBException
tablePath
- The table path.
The table path can be either absolute or relative to user's home directory.
The absolute path can be specified as "/<tablepath>" for tables in default
cluster or as "/mapr/<clustername>/<tablepath>" for tables
in the specified clustertrue
if the specified path exists and is a tableDBException
TableDescriptor getTableDescriptor(java.lang.String tablePath) throws DBException
tablePath
- The table path.
The table path can be either absolute or relative to user's home directory.
The absolute path can be specified as "/<tablepath>" for tables in default
cluster or as "/mapr/<clustername>/<tablepath>" for tables
in the specified clusterDBException
TableDescriptor getTableDescriptor(org.apache.hadoop.fs.Path tablePath) throws DBException
tablePath
- The table path.
The table path can be either absolute or relative to user's home directory.
The absolute path can be specified as "/<tablepath>" for tables in default
cluster or as "/mapr/<clustername>/<tablepath>" for tables
in the specified clusterDBException
java.util.Collection<IndexDesc> getTableIndexes(java.lang.String tablePath) throws DBException
DBException
java.util.Collection<IndexDesc> getTableIndexes(org.apache.hadoop.fs.Path tablePath) throws DBException
DBException
boolean deleteTable(java.lang.String tablePath) throws DBException
tablePath
- The table path.
The table path can be either absolute or relative to user's home directory.
The absolute path can be specified as "/<tablepath>" for tables in default
cluster or as "/mapr/<clustername>/<tablepath>" for tables
in the specified clustertrue
if and only if the table is successfully deleted;
otherwise, false
AccessDeniedException
- if the user does not have permission to delete
the table.DBException
boolean deleteTable(org.apache.hadoop.fs.Path tablePath) throws DBException
tablePath
- The table path.
The table path can be either absolute or relative to user's home directory.
The absolute path can be specified as "/<tablepath>" for tables in default
cluster or as "/mapr/<clustername>/<tablepath>" for tables
in the specified clustertrue
if and only if the table is successfully deleted;
otherwise, false
AccessDeniedException
- If the user does not have permission to delete
the table.DBException
void close() throws DBException
AutoCloseable.close()
to avoid declaring a checked exception.close
in interface java.lang.AutoCloseable
DBException