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.
  • Method Details

    • getUsableSpace

      public long getUsableSpace()
    • getId

      public String getId()
      Specified by:
      getId in interface StorageLocationReportMXBean
    • isFailed

      public boolean isFailed()
      Specified by:
      isFailed in interface StorageLocationReportMXBean
    • getCapacity

      public long getCapacity()
      Specified by:
      getCapacity in interface StorageLocationReportMXBean
    • getScmUsed

      public long getScmUsed()
      Specified by:
      getScmUsed in interface StorageLocationReportMXBean
    • getRemaining

      public long getRemaining()
      Specified by:
      getRemaining in interface StorageLocationReportMXBean
    • getCommitted

      public long getCommitted()
      Specified by:
      getCommitted in interface StorageLocationReportMXBean
    • getFreeSpaceToSpare

      public long getFreeSpaceToSpare()
      Specified by:
      getFreeSpaceToSpare in interface StorageLocationReportMXBean
    • getStorageLocation

      public String getStorageLocation()
      Specified by:
      getStorageLocation in interface StorageLocationReportMXBean
    • getStorageTypeName

      public String getStorageTypeName()
      Specified by:
      getStorageTypeName in interface StorageLocationReportMXBean
    • 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 IOException
      Returns 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 IOException
      Returns 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

      public String toString()
      Overrides:
      toString in class Object
    • newBuilder

      public static StorageLocationReport.Builder newBuilder()
      Returns StorageLocation.Builder instance.
      Returns:
      StorageLocation.Builder