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
DBException
List<org.apache.hadoop.fs.Path> listTables(String folderOrPattern) throws DBException
folderOrPattern
- the parent folder or patternDBException
List<org.apache.hadoop.fs.Path> listTables(org.apache.hadoop.fs.Path folderOrPattern) throws DBException
folderOrPattern
- the parent folder or patternDBException
Table 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 tableTableExistsException
DBException
Table createTable(TableDescriptor tableDesc, 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(String tablePath, 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, String familyName) throws TableNotFoundException, FamilyNotFoundException, DBException
tablePath
- familyName
- true
if and only if the family is successfully deleted;
false
otherwiseDBException
TableNotFoundException
FamilyNotFoundException
void alterFamily(String tablePath, 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, 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(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(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
boolean 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, 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 AutoCloseable
DBException
Copyright © 2016 Mapr Technologies, Inc.. All rights reserved.