All Implemented Interfaces:
Comparable<BaseRecord>, PBRecord

public class MountTablePBImpl extends MountTable implements PBRecord
Protobuf implementation of the MountTable record.
  • Constructor Details

    • MountTablePBImpl

      public MountTablePBImpl()
    • MountTablePBImpl

      public MountTablePBImpl(org.apache.hadoop.hdfs.federation.protocol.proto.HdfsServerFederationProtos.MountTableRecordProto proto)
  • Method Details

    • getProto

      public org.apache.hadoop.hdfs.federation.protocol.proto.HdfsServerFederationProtos.MountTableRecordProto getProto()
      Description copied from interface: PBRecord
      Get the protocol for the record.
      Specified by:
      getProto in interface PBRecord
      Returns:
      The protocol for this record.
    • setProto

      public void setProto(org.apache.hadoop.thirdparty.protobuf.Message proto)
      Description copied from interface: PBRecord
      Set the protocol for the record.
      Specified by:
      setProto in interface PBRecord
      Parameters:
      proto - Protocol for this record.
    • readInstance

      public void readInstance(String base64String) throws IOException
      Description copied from interface: PBRecord
      Populate this record with serialized data.
      Specified by:
      readInstance in interface PBRecord
      Parameters:
      base64String - Serialized data in base64.
      Throws:
      IOException - If it cannot read the data.
    • getSourcePath

      public String getSourcePath()
      Description copied from class: MountTable
      Get source path in the federated namespace.
      Specified by:
      getSourcePath in class MountTable
      Returns:
      Source path in the federated namespace.
    • setSourcePath

      public void setSourcePath(String path)
      Description copied from class: MountTable
      Set source path in the federated namespace.
      Specified by:
      setSourcePath in class MountTable
      Parameters:
      path - Source path in the federated namespace.
    • getDestinations

      public List<RemoteLocation> getDestinations()
      Description copied from class: MountTable
      Get a list of destinations (namespace + path) present for this entry.
      Specified by:
      getDestinations in class MountTable
      Returns:
      List of RemoteLocation destinations. Null if no destinations.
    • setDestinations

      public void setDestinations(List<RemoteLocation> dests)
      Description copied from class: MountTable
      Set the destination paths.
      Specified by:
      setDestinations in class MountTable
      Parameters:
      dests - Destination paths.
    • addDestination

      public boolean addDestination(String nsId, String path)
      Description copied from class: MountTable
      Add a new destination to this mount table entry.
      Specified by:
      addDestination in class MountTable
      Parameters:
      nsId - Name service identifier.
      path - Path in the remote name service.
      Returns:
      If the destination was added.
    • setDateModified

      public void setDateModified(long time)
      Description copied from class: BaseRecord
      Set the modification time for the record.
      Specified by:
      setDateModified in class BaseRecord
      Parameters:
      time - Modification time of the record.
    • getDateModified

      public long getDateModified()
      Description copied from class: BaseRecord
      Get the modification time for the record.
      Specified by:
      getDateModified in class BaseRecord
      Returns:
      Modification time of the record.
    • setDateCreated

      public void setDateCreated(long time)
      Description copied from class: BaseRecord
      Set the creation time for the record.
      Specified by:
      setDateCreated in class BaseRecord
      Parameters:
      time - Creation time of the record.
    • getDateCreated

      public long getDateCreated()
      Description copied from class: BaseRecord
      Get the creation time for the record.
      Specified by:
      getDateCreated in class BaseRecord
      Returns:
      Creation time of the record
    • isReadOnly

      public boolean isReadOnly()
      Description copied from class: MountTable
      Check if the entry is read only.
      Specified by:
      isReadOnly in class MountTable
      Returns:
      If the entry is read only.
    • setReadOnly

      public void setReadOnly(boolean ro)
      Description copied from class: MountTable
      Set an entry to be read only.
      Specified by:
      setReadOnly in class MountTable
      Parameters:
      ro - If the entry is read only.
    • getDestOrder

      public DestinationOrder getDestOrder()
      Description copied from class: MountTable
      Get the order of the destinations for this mount table entry.
      Specified by:
      getDestOrder in class MountTable
      Returns:
      Order of the destinations.
    • setDestOrder

      public void setDestOrder(DestinationOrder order)
      Description copied from class: MountTable
      Set the order of the destinations for this mount table entry.
      Specified by:
      setDestOrder in class MountTable
      Parameters:
      order - Order of the destinations.
    • isFaultTolerant

      public boolean isFaultTolerant()
      Description copied from class: MountTable
      Check if the mount point supports a failed destination.
      Specified by:
      isFaultTolerant in class MountTable
      Returns:
      If it supports failures.
    • setFaultTolerant

      public void setFaultTolerant(boolean faultTolerant)
      Description copied from class: MountTable
      Set if the mount point supports failed destinations.
      Specified by:
      setFaultTolerant in class MountTable
      Parameters:
      faultTolerant - If it supports failures.
    • getOwnerName

      public String getOwnerName()
      Description copied from class: MountTable
      Get owner name of this mount table entry.
      Specified by:
      getOwnerName in class MountTable
      Returns:
      Owner name
    • setOwnerName

      public void setOwnerName(String owner)
      Description copied from class: MountTable
      Set owner name of this mount table entry.
      Specified by:
      setOwnerName in class MountTable
      Parameters:
      owner - Owner name for mount table entry
    • getGroupName

      public String getGroupName()
      Description copied from class: MountTable
      Get group name of this mount table entry.
      Specified by:
      getGroupName in class MountTable
      Returns:
      Group name
    • setGroupName

      public void setGroupName(String group)
      Description copied from class: MountTable
      Set group name of this mount table entry.
      Specified by:
      setGroupName in class MountTable
      Parameters:
      group - Group name for mount table entry
    • getMode

      public org.apache.hadoop.fs.permission.FsPermission getMode()
      Description copied from class: MountTable
      Get permission of this mount table entry.
      Specified by:
      getMode in class MountTable
      Returns:
      FsPermission permission mode
    • setMode

      public void setMode(org.apache.hadoop.fs.permission.FsPermission mode)
      Description copied from class: MountTable
      Set permission for this mount table entry.
      Specified by:
      setMode in class MountTable
      Parameters:
      mode - Permission for mount table entry
    • getQuota

      public RouterQuotaUsage getQuota()
      Description copied from class: MountTable
      Get quota of this mount table entry.
      Specified by:
      getQuota in class MountTable
      Returns:
      RouterQuotaUsage quota usage
    • setQuota

      public void setQuota(RouterQuotaUsage quota)
      Description copied from class: MountTable
      Set quota for this mount table entry.
      Specified by:
      setQuota in class MountTable
      Parameters:
      quota - QuotaUsage for mount table entry