@API.Internal public class AdminImpl extends Object implements Admin
| Constructor and Description |
|---|
AdminImpl() |
AdminImpl(org.apache.hadoop.conf.Configuration conf) |
AdminImpl(com.mapr.fs.MapRFileSystem maprfs) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFamily(org.apache.hadoop.fs.Path tablePath,
FamilyDescriptor familyDesc) |
void |
alterFamily(org.apache.hadoop.fs.Path tablePath,
String familyName,
FamilyDescriptor familyDesc) |
void |
alterFamily(String tablePath,
String familyName,
FamilyDescriptor familyDesc) |
void |
alterTable(TableDescriptor desc)
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(String tablePath,
boolean openTable) |
Table |
createTable(TableDescriptor tableDesc)
Creates a Json table using the specified TableDescriptor.
|
Table |
createTable(TableDescriptor tableDesc,
boolean openTable) |
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.
|
Table |
createTable(TableDescriptor tableDesc,
org.ojai.Value[] splitPoints) |
static void |
createTableForCopy(String replicaPath,
String srcPath,
List<String> cfList,
boolean isBulkload)
Deprecated.
|
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) |
public AdminImpl()
throws DBException
DBExceptionpublic AdminImpl(org.apache.hadoop.conf.Configuration conf)
throws DBException
DBExceptionpublic AdminImpl(com.mapr.fs.MapRFileSystem maprfs)
throws DBException
DBExceptionpublic void close()
throws DBException
AdminAutoCloseable.close() to avoid declaring a checked exception.close in interface Adminclose in interface AutoCloseableDBExceptionpublic List<org.apache.hadoop.fs.Path> listTables() throws DBException
AdminlistTables in interface AdminDBExceptionpublic List<org.apache.hadoop.fs.Path> listTables(String folderOrPattern) throws DBException
AdminlistTables in interface AdminfolderOrPattern - the parent folder or patternDBExceptionpublic List<org.apache.hadoop.fs.Path> listTables(org.apache.hadoop.fs.Path folderOrPattern) throws DBException
AdminlistTables in interface AdminfolderOrPattern - the parent folder or patternDBExceptionpublic Table createTable(String tablePath) throws TableExistsException, DBException
AdmincreateTable in interface AdmintablePath - 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 occurspublic Table createTable(org.apache.hadoop.fs.Path tablePath) throws DBException
AdmincreateTable in interface AdmintablePath - 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 occurspublic Table createTable(TableDescriptor tableDesc) throws TableExistsException, DBException
AdmincreateTable in interface AdmintableDesc - the TableDescriptor containing various attributes of this tableTableExistsException - if the table already exist at the specified pathDBException - if an DBException occurspublic Table createTable(TableDescriptor tableDesc, org.ojai.Value[] splitPoints) throws TableExistsException, DBException
TableExistsExceptionDBExceptionpublic Table createTable(TableDescriptor tableDesc, String[] splitPoints) throws TableExistsException, DBException
AdmincreateTable in interface AdmintableDesc - the TableDescriptor containing various attributes of this tablesplitPoints - the split points for this tableTableExistsExceptionDBExceptionpublic Table createTable(TableDescriptor tableDesc, ByteBuffer[] splitPoints) throws TableExistsException, DBException
AdmincreateTable in interface AdmintableDesc - the TableDescriptor containing various attributes of this tablesplitPoints - the split points for this tableTableExistsExceptionDBException@API.Internal public Table createTable(String tablePath, boolean openTable) throws TableExistsException, DBException
TableExistsExceptionDBException@API.Internal public Table createTable(TableDescriptor tableDesc, boolean openTable) throws TableExistsException, DBException
TableExistsExceptionDBExceptionpublic void alterTable(TableDescriptor desc) throws TableNotFoundException, DBException
AdminalterTable in interface Admindesc - the TableDescriptor containing various attributes of this tableTableNotFoundExceptionOpNotPermittedException - if an attribute is requested to be modified but is not allowedDBExceptionpublic void addFamily(org.apache.hadoop.fs.Path tablePath,
FamilyDescriptor familyDesc)
throws TableNotFoundException,
FamilyExistsException,
DBException
public boolean deleteFamily(String tablePath, String familyName) throws TableNotFoundException, FamilyNotFoundException, DBException
AdmindeleteFamily in interface Admintrue if and only if the family is successfully deleted;
false otherwiseDBExceptionTableNotFoundExceptionFamilyNotFoundExceptionpublic boolean deleteFamily(org.apache.hadoop.fs.Path tablePath,
String familyName)
throws TableNotFoundException,
FamilyNotFoundException,
DBException
AdmindeleteFamily in interface Admintrue if and only if the family is successfully deleted;
false otherwiseDBExceptionTableNotFoundExceptionFamilyNotFoundExceptionpublic void alterFamily(String tablePath, String familyName, FamilyDescriptor familyDesc) throws TableNotFoundException, FamilyNotFoundException, OpNotPermittedException, DBException
alterFamily in interface AdminTableNotFoundExceptionFamilyNotFoundExceptionOpNotPermittedException - if an attribute is requested to be modified but is not allowedDBExceptionpublic void alterFamily(org.apache.hadoop.fs.Path tablePath,
String familyName,
FamilyDescriptor familyDesc)
throws TableNotFoundException,
FamilyNotFoundException,
DBException
alterFamily in interface AdminTableNotFoundExceptionFamilyNotFoundExceptionOpNotPermittedException - if an attribute is requested to be modified but is not allowedDBExceptionpublic boolean tableExists(String tablePath) throws DBException
tableExists in interface AdmintablePath - 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 tableDBExceptionpublic boolean tableExists(org.apache.hadoop.fs.Path tablePath)
throws DBException
tableExists in interface AdmintablePath - 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 tableDBExceptionpublic TableDescriptor getTableDescriptor(String tablePath) throws DBException
getTableDescriptor in interface AdmintablePath - 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 clusterDBExceptionpublic TableDescriptor getTableDescriptor(org.apache.hadoop.fs.Path tablePath) throws DBException
getTableDescriptor in interface AdmintablePath - 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 clusterDBExceptionpublic boolean deleteTable(String tablePath) throws DBException
AdmindeleteTable in interface AdmintablePath - 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.DBExceptionpublic boolean deleteTable(org.apache.hadoop.fs.Path tablePath)
throws DBException
AdmindeleteTable in interface AdmintablePath - 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.DBException@Deprecated public static void createTableForCopy(String replicaPath, String srcPath, List<String> cfList, boolean isBulkload) throws DBException
DBExceptionCopyright © 2016 Mapr Technologies, Inc.. All rights reserved.