Class VolumeManagerImpl

java.lang.Object
org.apache.hadoop.ozone.om.VolumeManagerImpl
All Implemented Interfaces:
IOzoneAcl, VolumeManager

public class VolumeManagerImpl extends Object implements VolumeManager
Volume Manager implementation.
  • Constructor Summary

    Constructors
    Constructor
    Description
    VolumeManagerImpl(org.apache.hadoop.ozone.om.OMMetadataManager metadataManager)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    checkAccess(org.apache.hadoop.ozone.security.acl.OzoneObj ozObject, org.apache.hadoop.ozone.security.acl.RequestContext context)
    Check access for given ozoneObject.
    List<org.apache.hadoop.ozone.OzoneAcl>
    getAcl(org.apache.hadoop.ozone.security.acl.OzoneObj obj)
    Returns list of ACLs for given Ozone object.
    org.apache.hadoop.ozone.om.helpers.OmVolumeArgs
    Gets the volume information.
    List<org.apache.hadoop.ozone.om.helpers.OmVolumeArgs>
    listVolumes(String userName, String prefix, String startKey, int maxKeys)
    Returns a list of volumes owned by a given user; if user is null, returns all volumes.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • VolumeManagerImpl

      public VolumeManagerImpl(org.apache.hadoop.ozone.om.OMMetadataManager metadataManager)
  • Method Details

    • getVolumeInfo

      public org.apache.hadoop.ozone.om.helpers.OmVolumeArgs getVolumeInfo(String volume) throws IOException
      Description copied from interface: VolumeManager
      Gets the volume information.
      Specified by:
      getVolumeInfo in interface VolumeManager
      Parameters:
      volume - - Volume name.
      Returns:
      VolumeArgs or exception is thrown.
      Throws:
      IOException
    • listVolumes

      public List<org.apache.hadoop.ozone.om.helpers.OmVolumeArgs> listVolumes(String userName, String prefix, String startKey, int maxKeys) throws IOException
      Description copied from interface: VolumeManager
      Returns a list of volumes owned by a given user; if user is null, returns all volumes.
      Specified by:
      listVolumes in interface VolumeManager
      Parameters:
      userName - volume owner
      prefix - the volume prefix used to filter the listing result.
      startKey - the start volume name determines where to start listing from, this key is excluded from the result.
      maxKeys - the maximum number of volumes to return.
      Returns:
      a list of OmVolumeArgs
      Throws:
      IOException
    • getAcl

      public List<org.apache.hadoop.ozone.OzoneAcl> getAcl(org.apache.hadoop.ozone.security.acl.OzoneObj obj) throws IOException
      Description copied from interface: IOzoneAcl
      Returns list of ACLs for given Ozone object.
      Specified by:
      getAcl in interface IOzoneAcl
      Parameters:
      obj - Ozone object.
      Throws:
      IOException - if there is error.
    • checkAccess

      public boolean checkAccess(org.apache.hadoop.ozone.security.acl.OzoneObj ozObject, org.apache.hadoop.ozone.security.acl.RequestContext context) throws org.apache.hadoop.ozone.om.exceptions.OMException
      Description copied from interface: IOzoneAcl
      Check access for given ozoneObject.
      Specified by:
      checkAccess in interface IOzoneAcl
      Parameters:
      ozObject - object for which access needs to be checked.
      context - Context object encapsulating all user related information.
      Returns:
      true if user has access else false.
      Throws:
      org.apache.hadoop.ozone.om.exceptions.OMException