Class MapRAdmin


  • public class MapRAdmin
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void deleteColumnPermission​(org.apache.hadoop.fs.Path table, java.lang.String column, java.lang.String permission)
      Deletes a permission from a column family or qualifier.
      void deleteTablePermission​(org.apache.hadoop.fs.Path table, java.lang.String permission)
      Removes a permission from the MapR table
      com.mapr.fs.proto.Dbserver.ColumnFamilyAttr getColumnFamily​(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.
      long getNumRows​(java.lang.String tablePath)
      Deprecated.
      Use maprdb client's MetaTable APIs
      long getNumRows​(org.apache.hadoop.fs.Path tablePath)
      Deprecated.
      Use maprdb client's MetaTable APIs
      long getNumRows​(org.apache.hadoop.fs.Path tablePath, java.lang.String indexFid)
      Deprecated.
      Use maprdb client's MetaTable APIs
      java.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 a Map.
      void setFamilyPermissions​(org.apache.hadoop.fs.Path table, java.lang.String family, CFPermissions cfPermissions)
      Sets permissions on a column family.
      void setTablePermissions​(org.apache.hadoop.fs.Path table, java.util.Map<java.lang.String,​java.lang.String> permissions)
      Sets the permissions ACEs on the MapR table.
      void split​(org.apache.hadoop.fs.Path tablePath, java.lang.String fid)
      Split a tablet or all the tablets of a table.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 also CFPermissions.
        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.IOException
        Sets permissions on a column family. See CFPermissions for 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.IOException
        Deletes 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.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:
        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.IOException
        Sets 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.IOException
        Removes 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.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:
        java.io.IOException
      • getNumRows

        public long getNumRows​(java.lang.String tablePath)
                        throws java.io.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:
        java.io.IOException
      • getNumRows

        public long getNumRows​(org.apache.hadoop.fs.Path tablePath)
                        throws java.io.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:
        java.io.IOException
      • getNumRows

        public long getNumRows​(org.apache.hadoop.fs.Path tablePath,
                               java.lang.String indexFid)
                        throws java.io.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:
        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