Package com.mapr.fs.tables
Class MapRAdmin
- java.lang.Object
-
- com.mapr.fs.tables.MapRAdmin
-
public class MapRAdmin extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description MapRAdmin(MapRFileSystem fs)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voiddeleteColumnPermission(org.apache.hadoop.fs.Path table, java.lang.String column, java.lang.String permission)Deletes a permission from a column family or qualifier.voiddeleteTablePermission(org.apache.hadoop.fs.Path table, java.lang.String permission)Removes a permission from the MapR tablecom.mapr.fs.proto.Dbserver.ColumnFamilyAttrgetColumnFamily(org.apache.hadoop.fs.Path table, java.lang.String cfName, boolean wantAce)java.util.List<CFPermissions>getFamilyPermissions(org.apache.hadoop.fs.Path table)Returns the list of column family permission including those set on the qualifiers.longgetNumRows(java.lang.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, java.lang.String indexFid)Deprecated.Use maprdb client's MetaTable APIsjava.util.Collection<ExtIndexDesc>getTableExternalIndexes(org.apache.hadoop.fs.Path tablePath, boolean refreshNow)Returns a collection of index descriptors for the specified table.java.util.Map<java.lang.String,java.lang.String>getTablePermissions(org.apache.hadoop.fs.Path table)Returns all ACEs set on the table as aMap.voidsetFamilyPermissions(org.apache.hadoop.fs.Path table, java.lang.String family, CFPermissions cfPermissions)Sets permissions on a column family.voidsetTablePermissions(org.apache.hadoop.fs.Path table, java.util.Map<java.lang.String,java.lang.String> permissions)Sets the permissions ACEs on the MapR table.voidsplit(org.apache.hadoop.fs.Path tablePath, java.lang.String fid)Split a tablet or all the tablets of a table.
-
-
-
Constructor Detail
-
MapRAdmin
public MapRAdmin(MapRFileSystem fs)
-
-
Method Detail
-
getFamilyPermissions
public java.util.List<CFPermissions> getFamilyPermissions(org.apache.hadoop.fs.Path table) throws java.io.IOException
Returns the list of column family permission including those set on the qualifiers. See alsoCFPermissions.- Parameters:
tablePath-- Returns:
- Throws:
java.io.IOException
-
setFamilyPermissions
public void setFamilyPermissions(org.apache.hadoop.fs.Path table, java.lang.String family, CFPermissions cfPermissions) throws java.io.IOExceptionSets permissions on a column family. SeeCFPermissionsfor details.- Parameters:
tablePath-family-cfPermissions-- Throws:
java.io.IOException
-
deleteColumnPermission
public void deleteColumnPermission(org.apache.hadoop.fs.Path table, java.lang.String column, java.lang.String permission) throws java.io.IOExceptionDeletes a permission from a column family or qualifier.- Parameters:
tablePath-column-permission-- Throws:
java.io.IOException
-
getTablePermissions
public java.util.Map<java.lang.String,java.lang.String> getTablePermissions(org.apache.hadoop.fs.Path table) throws java.io.IOExceptionReturns 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:
java.io.IOException
-
setTablePermissions
public void setTablePermissions(org.apache.hadoop.fs.Path table, java.util.Map<java.lang.String,java.lang.String> permissions) throws java.io.IOExceptionSets the permissions ACEs on the MapR table.- Parameters:
tablePath-permissions-- Throws:
java.io.IOException
-
deleteTablePermission
public void deleteTablePermission(org.apache.hadoop.fs.Path table, java.lang.String permission) throws java.io.IOExceptionRemoves a permission from the MapR table- Parameters:
tablePath-permission-- Throws:
java.io.IOException
-
split
public void split(org.apache.hadoop.fs.Path tablePath, java.lang.String fid) throws java.io.IOExceptionSplit 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:
java.io.IOException
-
getNumRows
public long getNumRows(java.lang.String tablePath) throws java.io.IOExceptionDeprecated.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:
java.io.IOException
-
getNumRows
public long getNumRows(org.apache.hadoop.fs.Path tablePath) throws java.io.IOExceptionDeprecated.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:
java.io.IOException
-
getNumRows
public long getNumRows(org.apache.hadoop.fs.Path tablePath, java.lang.String indexFid) throws java.io.IOExceptionDeprecated.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:
java.io.IOException
-
getColumnFamily
public com.mapr.fs.proto.Dbserver.ColumnFamilyAttr getColumnFamily(org.apache.hadoop.fs.Path table, java.lang.String cfName, boolean wantAce) throws java.io.IOException- Throws:
java.io.IOException
-
getTableExternalIndexes
public java.util.Collection<ExtIndexDesc> getTableExternalIndexes(org.apache.hadoop.fs.Path tablePath, boolean refreshNow) throws java.io.IOException
Returns a collection of index descriptors for the specified table.- Throws:
java.io.IOException
-
-