Class StorageLocationReport
java.lang.Object
org.apache.hadoop.ozone.container.common.impl.StorageLocationReport
- All Implemented Interfaces:
StorageLocationReportMXBean
@Immutable
public final class StorageLocationReport
extends Object
implements StorageLocationReportMXBean
Storage location stats of datanodes that provide back store for containers.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class for building StorageLocationReport. -
Method Summary
Modifier and TypeMethodDescriptionlonglonglongstatic StorageLocationReportgetFromProtobuf(org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.StorageReportProto report) Returns the StorageLocationReport from the protoBuf message.getId()org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.MetadataStorageReportProtoReturns the MetadataStorageReportProto protoBuf message for the Storage Location report.org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.StorageReportProtoReturns the StorageReportProto protoBuf message for the Storage Location report.longlongorg.apache.hadoop.fs.StorageTypestatic org.apache.hadoop.hdds.protocol.proto.HddsProtos.StorageTypeProtogetStorageTypeProto(org.apache.hadoop.fs.StorageType type) longbooleanisFailed()Returns StorageLocation.Builder instance.toString()
-
Method Details
-
getUsableSpace
public long getUsableSpace() -
getId
- Specified by:
getIdin interfaceStorageLocationReportMXBean
-
isFailed
public boolean isFailed()- Specified by:
isFailedin interfaceStorageLocationReportMXBean
-
getCapacity
public long getCapacity()- Specified by:
getCapacityin interfaceStorageLocationReportMXBean
-
getScmUsed
public long getScmUsed()- Specified by:
getScmUsedin interfaceStorageLocationReportMXBean
-
getRemaining
public long getRemaining()- Specified by:
getRemainingin interfaceStorageLocationReportMXBean
-
getCommitted
public long getCommitted()- Specified by:
getCommittedin interfaceStorageLocationReportMXBean
-
getFreeSpaceToSpare
public long getFreeSpaceToSpare()- Specified by:
getFreeSpaceToSparein interfaceStorageLocationReportMXBean
-
getStorageLocation
- Specified by:
getStorageLocationin interfaceStorageLocationReportMXBean
-
getStorageTypeName
- Specified by:
getStorageTypeNamein interfaceStorageLocationReportMXBean
-
getStorageType
public org.apache.hadoop.fs.StorageType getStorageType() -
getStorageTypeProto
public static org.apache.hadoop.hdds.protocol.proto.HddsProtos.StorageTypeProto getStorageTypeProto(org.apache.hadoop.fs.StorageType type) throws IOException - Throws:
IOException
-
getProtoBufMessage
public org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.StorageReportProto getProtoBufMessage() throws IOExceptionReturns the StorageReportProto protoBuf message for the Storage Location report.- Returns:
- StorageReportProto
- Throws:
IOException- In case, the storage type specified is invalid.
-
getMetadataProtoBufMessage
public org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.MetadataStorageReportProto getMetadataProtoBufMessage() throws IOExceptionReturns the MetadataStorageReportProto protoBuf message for the Storage Location report.- Returns:
- MetadataStorageReportProto
- Throws:
IOException- In case, the storage type specified is invalid.
-
getFromProtobuf
public static StorageLocationReport getFromProtobuf(org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.StorageReportProto report) throws IOException Returns the StorageLocationReport from the protoBuf message.- Parameters:
report- SCMStorageReport- Returns:
- StorageLocationReport
- Throws:
IOException- in case of invalid storage type
-
toString
-
newBuilder
Returns StorageLocation.Builder instance.- Returns:
- StorageLocation.Builder
-