Class ContainerReportPublisher

java.lang.Object
org.apache.hadoop.ozone.container.common.report.ReportPublisher<org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.ContainerReportsProto>
org.apache.hadoop.ozone.container.common.report.ContainerReportPublisher
All Implemented Interfaces:
Runnable

public class ContainerReportPublisher extends ReportPublisher<org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.ContainerReportsProto>
Publishes ContainerReport which will be sent to SCM as part of heartbeat. ContainerReport consist of the following information about each container: - containerID - size - used - keyCount - readCount - writeCount - readBytes - writeBytes - finalHash - LifeCycleState
  • Constructor Details

    • ContainerReportPublisher

      public ContainerReportPublisher()
  • Method Details

    • getReportFrequency

      protected long getReportFrequency()
      Description copied from class: ReportPublisher
      Returns the frequency in which this particular report has to be scheduled.
      Specified by:
      getReportFrequency in class ReportPublisher<org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.ContainerReportsProto>
      Returns:
      report interval in milliseconds
    • getReport

      protected org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.ContainerReportsProto getReport() throws IOException
      Description copied from class: ReportPublisher
      Generate and returns the report which has to be sent as part of heartbeat.
      Specified by:
      getReport in class ReportPublisher<org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.ContainerReportsProto>
      Returns:
      datanode report
      Throws:
      IOException