public interface Admin extends AutoCloseable
| Modifier and Type | Method and Description |
|---|---|
void |
alterFamily(org.apache.hadoop.fs.Path tablePath,
String familyName,
FamilyDescriptor familyDesc) |
void |
alterFamily(String tablePath,
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(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,
ByteBuffer[] splitPoints)
Creates a pre-split JSON table using the specified TableDescriptor and the split points
as the tablet boundaries.
|
Table |
createTable(TableDescriptor tableDesc,
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,
String familyName)
Deletes a family from a Json table.
|
boolean |
deleteFamily(String tablePath,
String familyName)
Deletes a family from a Json table.
|
boolean |
deleteTable(org.apache.hadoop.fs.Path tablePath)
Deletes a Table.
|
boolean |
deleteTable(String tablePath)
Deletes a Table.
|
TableDescriptor |
getTableDescriptor(org.apache.hadoop.fs.Path tablePath) |
TableDescriptor |
getTableDescriptor(String tablePath) |
List<org.apache.hadoop.fs.Path> |
listTables()
List all tables in user's home directory.
|
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.
|
List<org.apache.hadoop.fs.Path> |
listTables(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(String tablePath) |
List<org.apache.hadoop.fs.Path> listTables() throws DBException
DBExceptionList<org.apache.hadoop.fs.Path> listTables(String folderOrPattern) throws DBException
folderOrPattern - the parent folder or patternDBExceptionList<org.apache.hadoop.fs.Path> listTables(org.apache.hadoop.fs.Path folderOrPattern) throws DBException
folderOrPattern - the parent folder or patternDBExceptionTable createTable(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, String[] splitPoints) throws TableExistsException, DBException
tableDesc - the TableDescriptor containing various attributes of this tablesplitPoints - the split points for this tableTableExistsExceptionDBExceptionTable createTable(TableDescriptor tableDesc, ByteBuffer[] splitPoints) throws TableExistsException, DBException
tableDesc - the TableDescriptor containing various attributes of this tablesplitPoints - the split points for this tableTableExistsExceptionDBExceptionvoid alterTable(TableDescriptor tableDesc) throws TableNotFoundException, OpNotPermittedException, DBException
tableDesc - the TableDescriptor containing various attributes of this tableTableNotFoundExceptionOpNotPermittedException - if an attribute is requested to be modified but is not allowedDBExceptionboolean deleteFamily(String tablePath, String familyName) throws TableNotFoundException, FamilyNotFoundException, DBException
tablePath - familyName - true if and only if the family is successfully deleted;
false otherwiseDBExceptionTableNotFoundExceptionFamilyNotFoundExceptionboolean deleteFamily(org.apache.hadoop.fs.Path tablePath,
String familyName)
throws TableNotFoundException,
FamilyNotFoundException,
DBException
tablePath - familyName - true if and only if the family is successfully deleted;
false otherwiseDBExceptionTableNotFoundExceptionFamilyNotFoundExceptionvoid alterFamily(String tablePath, String familyName, FamilyDescriptor familyDesc) throws TableNotFoundException, FamilyNotFoundException, OpNotPermittedException, DBException
tablePath - familyName - familyDesc - TableNotFoundExceptionFamilyNotFoundExceptionOpNotPermittedException - if an attribute is requested to be modified but is not allowedDBExceptionvoid alterFamily(org.apache.hadoop.fs.Path tablePath,
String familyName,
FamilyDescriptor familyDesc)
throws TableNotFoundException,
FamilyNotFoundException,
OpNotPermittedException,
DBException
tablePath - familyName - familyDesc - TableNotFoundExceptionFamilyNotFoundExceptionOpNotPermittedException - if an attribute is requested to be modified but is not allowedDBExceptionboolean tableExists(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 tableDBExceptionboolean 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 tableDBExceptionTableDescriptor getTableDescriptor(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 clusterDBExceptionTableDescriptor 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 clusterDBExceptionboolean deleteTable(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, falseAccessDeniedException - if the user does not have permission to delete
the table.DBExceptionboolean 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, falseAccessDeniedException - If the user does not have permission to delete
the table.DBExceptionvoid close()
throws DBException
AutoCloseable.close() to avoid declaring a checked exception.close in interface AutoCloseableDBExceptionCopyright © 2018 Mapr Technologies, Inc.. All rights reserved.