Class MountTablePBImpl
java.lang.Object
org.apache.hadoop.hdfs.server.federation.store.records.BaseRecord
org.apache.hadoop.hdfs.server.federation.store.records.MountTable
org.apache.hadoop.hdfs.server.federation.store.records.impl.pb.MountTablePBImpl
- All Implemented Interfaces:
Comparable<BaseRecord>,PBRecord
Protobuf implementation of the MountTable record.
-
Field Summary
Fields inherited from class org.apache.hadoop.hdfs.server.federation.store.records.MountTable
ERROR_MSG_ALL_DEST_MUST_START_WITH_BACK_SLASH, ERROR_MSG_INVALID_DEST_NS, ERROR_MSG_INVALID_DEST_PATH, ERROR_MSG_MUST_START_WITH_BACK_SLASH, ERROR_MSG_NO_DEST_PATH_SPECIFIED, ERROR_MSG_NO_SOURCE_PATH, PATH_COMPARATOR, SOURCE_COMPARATORFields inherited from class org.apache.hadoop.hdfs.server.federation.store.records.BaseRecord
ERROR_MSG_CREATION_TIME_NEGATIVE, ERROR_MSG_MODIFICATION_TIME_NEGATIVE -
Constructor Summary
ConstructorsConstructorDescriptionMountTablePBImpl(org.apache.hadoop.hdfs.federation.protocol.proto.HdfsServerFederationProtos.MountTableRecordProto proto) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddDestination(String nsId, String path) Add a new destination to this mount table entry.longGet the creation time for the record.longGet the modification time for the record.Get a list of destinations (namespace + path) present for this entry.Get the order of the destinations for this mount table entry.Get group name of this mount table entry.org.apache.hadoop.fs.permission.FsPermissiongetMode()Get permission of this mount table entry.Get owner name of this mount table entry.org.apache.hadoop.hdfs.federation.protocol.proto.HdfsServerFederationProtos.MountTableRecordProtogetProto()Get the protocol for the record.getQuota()Get quota of this mount table entry.Get source path in the federated namespace.booleanCheck if the mount point supports a failed destination.booleanCheck if the entry is read only.voidreadInstance(String base64String) Populate this record with serialized data.voidsetDateCreated(long time) Set the creation time for the record.voidsetDateModified(long time) Set the modification time for the record.voidsetDestinations(List<RemoteLocation> dests) Set the destination paths.voidsetDestOrder(DestinationOrder order) Set the order of the destinations for this mount table entry.voidsetFaultTolerant(boolean faultTolerant) Set if the mount point supports failed destinations.voidsetGroupName(String group) Set group name of this mount table entry.voidsetMode(org.apache.hadoop.fs.permission.FsPermission mode) Set permission for this mount table entry.voidsetOwnerName(String owner) Set owner name of this mount table entry.voidsetProto(org.apache.hadoop.thirdparty.protobuf.Message proto) Set the protocol for the record.voidsetQuota(RouterQuotaUsage quota) Set quota for this mount table entry.voidsetReadOnly(boolean ro) Set an entry to be read only.voidsetSourcePath(String path) Set source path in the federated namespace.Methods inherited from class org.apache.hadoop.hdfs.server.federation.store.records.MountTable
equals, getDefaultLocation, getExpirationMs, getPrimaryKeys, hashCode, isAll, like, newInstance, newInstance, newInstance, toString, validateMethods inherited from class org.apache.hadoop.hdfs.server.federation.store.records.BaseRecord
checkExpired, compareTo, generateMashupKey, getDeletionMs, getPrimaryKey, hasOtherFields, init, isExpired, shouldBeDeleted
-
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:PBRecordGet the protocol for the record. -
setProto
public void setProto(org.apache.hadoop.thirdparty.protobuf.Message proto) Description copied from interface:PBRecordSet the protocol for the record. -
readInstance
Description copied from interface:PBRecordPopulate this record with serialized data.- Specified by:
readInstancein interfacePBRecord- Parameters:
base64String- Serialized data in base64.- Throws:
IOException- If it cannot read the data.
-
getSourcePath
Description copied from class:MountTableGet source path in the federated namespace.- Specified by:
getSourcePathin classMountTable- Returns:
- Source path in the federated namespace.
-
setSourcePath
Description copied from class:MountTableSet source path in the federated namespace.- Specified by:
setSourcePathin classMountTable- Parameters:
path- Source path in the federated namespace.
-
getDestinations
Description copied from class:MountTableGet a list of destinations (namespace + path) present for this entry.- Specified by:
getDestinationsin classMountTable- Returns:
- List of RemoteLocation destinations. Null if no destinations.
-
setDestinations
Description copied from class:MountTableSet the destination paths.- Specified by:
setDestinationsin classMountTable- Parameters:
dests- Destination paths.
-
addDestination
Description copied from class:MountTableAdd a new destination to this mount table entry.- Specified by:
addDestinationin classMountTable- 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:BaseRecordSet the modification time for the record.- Specified by:
setDateModifiedin classBaseRecord- Parameters:
time- Modification time of the record.
-
getDateModified
public long getDateModified()Description copied from class:BaseRecordGet the modification time for the record.- Specified by:
getDateModifiedin classBaseRecord- Returns:
- Modification time of the record.
-
setDateCreated
public void setDateCreated(long time) Description copied from class:BaseRecordSet the creation time for the record.- Specified by:
setDateCreatedin classBaseRecord- Parameters:
time- Creation time of the record.
-
getDateCreated
public long getDateCreated()Description copied from class:BaseRecordGet the creation time for the record.- Specified by:
getDateCreatedin classBaseRecord- Returns:
- Creation time of the record
-
isReadOnly
public boolean isReadOnly()Description copied from class:MountTableCheck if the entry is read only.- Specified by:
isReadOnlyin classMountTable- Returns:
- If the entry is read only.
-
setReadOnly
public void setReadOnly(boolean ro) Description copied from class:MountTableSet an entry to be read only.- Specified by:
setReadOnlyin classMountTable- Parameters:
ro- If the entry is read only.
-
getDestOrder
Description copied from class:MountTableGet the order of the destinations for this mount table entry.- Specified by:
getDestOrderin classMountTable- Returns:
- Order of the destinations.
-
setDestOrder
Description copied from class:MountTableSet the order of the destinations for this mount table entry.- Specified by:
setDestOrderin classMountTable- Parameters:
order- Order of the destinations.
-
isFaultTolerant
public boolean isFaultTolerant()Description copied from class:MountTableCheck if the mount point supports a failed destination.- Specified by:
isFaultTolerantin classMountTable- Returns:
- If it supports failures.
-
setFaultTolerant
public void setFaultTolerant(boolean faultTolerant) Description copied from class:MountTableSet if the mount point supports failed destinations.- Specified by:
setFaultTolerantin classMountTable- Parameters:
faultTolerant- If it supports failures.
-
getOwnerName
Description copied from class:MountTableGet owner name of this mount table entry.- Specified by:
getOwnerNamein classMountTable- Returns:
- Owner name
-
setOwnerName
Description copied from class:MountTableSet owner name of this mount table entry.- Specified by:
setOwnerNamein classMountTable- Parameters:
owner- Owner name for mount table entry
-
getGroupName
Description copied from class:MountTableGet group name of this mount table entry.- Specified by:
getGroupNamein classMountTable- Returns:
- Group name
-
setGroupName
Description copied from class:MountTableSet group name of this mount table entry.- Specified by:
setGroupNamein classMountTable- Parameters:
group- Group name for mount table entry
-
getMode
public org.apache.hadoop.fs.permission.FsPermission getMode()Description copied from class:MountTableGet permission of this mount table entry.- Specified by:
getModein classMountTable- Returns:
- FsPermission permission mode
-
setMode
public void setMode(org.apache.hadoop.fs.permission.FsPermission mode) Description copied from class:MountTableSet permission for this mount table entry.- Specified by:
setModein classMountTable- Parameters:
mode- Permission for mount table entry
-
getQuota
Description copied from class:MountTableGet quota of this mount table entry.- Specified by:
getQuotain classMountTable- Returns:
- RouterQuotaUsage quota usage
-
setQuota
Description copied from class:MountTableSet quota for this mount table entry.- Specified by:
setQuotain classMountTable- Parameters:
quota- QuotaUsage for mount table entry
-