Class MapRAdmin

java.lang.Object
com.mapr.fs.tables.MapRAdmin

public class MapRAdmin extends Object
  • Constructor Details

  • Method Details

    • getFamilyPermissions

      public List<CFPermissions> getFamilyPermissions(org.apache.hadoop.fs.Path table) throws IOException
      Returns the list of column family permission including those set on the qualifiers. See also CFPermissions.
      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. See CFPermissions for 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

      public Map<String,String> getTablePermissions(org.apache.hadoop.fs.Path table) throws IOException
      Returns all ACEs set on the table as a Map. 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 IOException
      Sets 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

      public void split(org.apache.hadoop.fs.Path tablePath, String fid) throws IOException
      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

      public long getNumRows(String tablePath) throws IOException
      Deprecated.
      Use maprdb client's MetaTable APIs
      Returns the estimated number of rows for a given table
      Parameters:
      tablePath - Path of the table
      Returns:
      Number of rows
      Throws:
      IOException
    • getNumRows

      public long getNumRows(org.apache.hadoop.fs.Path tablePath) throws IOException
      Deprecated.
      Use maprdb client's MetaTable APIs
      Returns the estimated number of rows for a given table as long
      Parameters:
      tablePath - Path of the table
      Returns:
      Number of rows
      Throws:
      IOException
    • getNumRows

      public long getNumRows(org.apache.hadoop.fs.Path tablePath, String indexFid) throws IOException
      Deprecated.
      Use maprdb client's MetaTable APIs
      Returns the estimated number of rows for a given primary or index table as a long value
      Parameters:
      tablePath - Path of the primary table
      indexFid - FID of the index table, if null row 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