Package com.mapr.fs.tables
Class MapRAdmin
java.lang.Object
com.mapr.fs.tables.MapRAdmin
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteColumnPermission(org.apache.hadoop.fs.Path table, String column, String permission) Deletes a permission from a column family or qualifier.voiddeleteTablePermission(org.apache.hadoop.fs.Path table, String permission) Removes a permission from the MapR tablecom.mapr.fs.proto.Dbserver.ColumnFamilyAttrgetColumnFamily(org.apache.hadoop.fs.Path table, String cfName, boolean wantAce) getFamilyPermissions(org.apache.hadoop.fs.Path table) Returns the list of column family permission including those set on the qualifiers.longgetNumRows(String tablePath) Deprecated.Use maprdb client's MetaTable APIslonggetNumRows(org.apache.hadoop.fs.Path tablePath) Deprecated.Use maprdb client's MetaTable APIslonggetNumRows(org.apache.hadoop.fs.Path tablePath, String indexFid) Deprecated.Use maprdb client's MetaTable APIsgetTableExternalIndexes(org.apache.hadoop.fs.Path tablePath, boolean refreshNow) Returns a collection of index descriptors for the specified table.getTablePermissions(org.apache.hadoop.fs.Path table) Returns all ACEs set on the table as aMap.voidsetFamilyPermissions(org.apache.hadoop.fs.Path table, String family, CFPermissions cfPermissions) Sets permissions on a column family.voidsetTablePermissions(org.apache.hadoop.fs.Path table, Map<String, String> permissions) Sets the permissions ACEs on the MapR table.voidSplit a tablet or all the tablets of a table.
-
Constructor Details
-
MapRAdmin
-
-
Method Details
-
getFamilyPermissions
Returns the list of column family permission including those set on the qualifiers. See alsoCFPermissions.- Parameters:
tablePath-- Returns:
- Throws:
IOException
-
setFamilyPermissions
public void setFamilyPermissions(org.apache.hadoop.fs.Path table, String family, CFPermissions cfPermissions) throws IOException Sets permissions on a column family. SeeCFPermissionsfor details.- Parameters:
tablePath-family-cfPermissions-- Throws:
IOException
-
deleteColumnPermission
public void deleteColumnPermission(org.apache.hadoop.fs.Path table, String column, String permission) throws IOException Deletes a permission from a column family or qualifier.- Parameters:
tablePath-column-permission-- Throws:
IOException
-
getTablePermissions
Returns all ACEs set on the table as aMap. Key of this map is the permission name while the value is the ACE for that permission.- Parameters:
tablePath-- Returns:
- Throws:
IOException
-
setTablePermissions
public void setTablePermissions(org.apache.hadoop.fs.Path table, Map<String, String> permissions) throws IOExceptionSets the permissions ACEs on the MapR table.- Parameters:
tablePath-permissions-- Throws:
IOException
-
deleteTablePermission
public void deleteTablePermission(org.apache.hadoop.fs.Path table, String permission) throws IOException Removes a permission from the MapR table- Parameters:
tablePath-permission-- Throws:
IOException
-
split
Split a tablet or all the tablets of a table.- Parameters:
tableNameOrRegionName- String specifying either a table path with optional tablet FID separated by ",". If a tablet FID is not specified, all tablets of the table are split.- Throws:
IOException
-
getNumRows
Deprecated.Use maprdb client's MetaTable APIsReturns the estimated number of rows for a given table- Parameters:
tablePath- Path of the table- Returns:
- Number of rows
- Throws:
IOException
-
getNumRows
Deprecated.Use maprdb client's MetaTable APIsReturns the estimated number of rows for a given table as long- Parameters:
tablePath- Path of the table- Returns:
- Number of rows
- Throws:
IOException
-
getNumRows
Deprecated.Use maprdb client's MetaTable APIsReturns the estimated number of rows for a given primary or index table as a long value- Parameters:
tablePath- Path of the primary tableindexFid- FID of the index table, ifnullrow count of the primary table is returned- Returns:
- Estimated number of rows or primary or index table
- Throws:
IOException
-
getColumnFamily
public com.mapr.fs.proto.Dbserver.ColumnFamilyAttr getColumnFamily(org.apache.hadoop.fs.Path table, String cfName, boolean wantAce) throws IOException - Throws:
IOException
-
getTableExternalIndexes
public Collection<ExtIndexDesc> getTableExternalIndexes(org.apache.hadoop.fs.Path tablePath, boolean refreshNow) throws IOException Returns a collection of index descriptors for the specified table.- Throws:
IOException
-