Package org.apache.hadoop.ozone.container.common.report
package org.apache.hadoop.ozone.container.common.report
Datanode Reports: As part of heartbeat, datanode has to share its current
state with SCM. The state of datanode is split into multiple reports which
are sent along with heartbeat in a configured frequency.
This package contains code which is responsible for sending reports from
datanode to SCM.
ReportPublisherFactory: Given a report this constructs corresponding
ReportPublisher.
ReportManager: Manages and initializes all the available ReportPublishers.
ReportPublisher: Abstract class responsible for scheduling the reports
based on the configured interval. All the ReportPublishers should extend
ReportPublisher
How to add new report:
- Create a new ReportPublisher class which extends
ReportPublisher. - Add a mapping Report to ReportPublisher entry in ReportPublisherFactory.
- In DatanodeStateMachine add the report to ReportManager instance.
DatanodeStateMachine ReportManager ReportPublisher SCM
| | | |
| | | |
| construct | | |
|----------------->| | |
| | | |
| init | | |
|----------------->| | |
| | init | |
| |------------->| |
| | | |
+--------+------------------+--------------+--------------------+------+
|loop | | | | |
| | | publish | | |
| |<-----------------+--------------| | |
| | | report | | |
| | | | | |
| | | | | |
| | heartbeat(rpc) | | | |
| |------------------+--------------+------------------->| |
| | | | | |
| | | | | |
+--------+------------------+--------------+--------------------+------+
| | | |
| | | |
| | | |
| shutdown | | |
|----------------->| | |
| | | |
| | | |
- - - -
-
ClassDescriptionPublishes CommandStatusReport which will be sent to SCM as part of heartbeat.Publishes ContainerReport which will be sent to SCM as part of heartbeat.IncrementalReportSender is an interface to send ICRs.Publishes NodeReport which will be sent to SCM as part of heartbeat.Publishes Pipeline which will be sent to SCM as part of heartbeat.ReportManager is responsible for managing all the
ReportPublisherand also providesScheduledExecutorServiceto ReportPublisher which should be used for scheduling the reports.Builder to constructReportManager.ReportPublisher<T extends com.google.protobuf.Message>Abstract class responsible for scheduling the reports based on the configured interval.Factory class to constructReportPublisherfor a report.