hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/commandhandler/ContainerReportHandler.java
@Override
  public void handle(SCMCommand command, OzoneContainer container,
      StateContext context, SCMConnectionManager connectionManager) {
    LOG.debug("Processing Container Report.");
    invocationCount++;
    long startTime = Time.monotonicNow();
    try {
      ContainerReportsRequestProto contianerReport =
          container.getContainerReport();

      // TODO : We send this report to all SCMs.Check if it is enough only to
      // send to the leader once we have RAFT enabled SCMs.
      for (EndpointStateMachine endPoint : connectionManager.getValues()) {
        endPoint.getEndPoint().sendContainerReport(contianerReport);
      }
    } catch (IOException ex) {
      LOG.error("Unable to process the Container Report command.", ex);
    } finally {
      long endTime = Time.monotonicNow();
      totalTime += endTime - startTime;
    }
  }
/**
   * Handles a given SCM command.
   *
   * @param command - SCM Command
   * @param container - Ozone Container.
   * @param context - Current Context.
   * @param connectionManager - The SCMs that we are talking to.
   */
Handles a given SCM command.
@param command - SCM Command
@param container - Ozone Container.
@param context - Current Context.
@param connectionManager - The SCMs that we are talking to.
Handles a given SCM command . @param command - SCM Command @param container - Ozone Container . @param context - Current Context . @param connectionManager - The SCMs that we are talking to .
@Override
  public void handle(SCMCommand command, OzoneContainer container,
      StateContext context, SCMConnectionManager connectionManager) {
    LOG.debug("Processing Container Report.");
    invocationCount++;
    long startTime = Time.monotonicNow();
    try {
      ContainerReportsRequestProto contianerReport =
          container.getContainerReport();
      for (EndpointStateMachine endPoint : connectionManager.getValues()) {
        endPoint.getEndPoint().sendContainerReport(contianerReport);
      }
    } catch (IOException ex) {
      LOG.error("Unable to process the Container Report command.", ex);
    } finally {
      long endTime = Time.monotonicNow();
      totalTime += endTime - startTime;
    }
  }
@ Override public void handle ( SCMCommand command , OzoneContainer container , StateContext context , SCMConnectionManager connectionManager ) { LOG . debug ( "Processing Container Report." ) ; invocationCount ++ ; long startTime = Time . monotonicNow ( ) ; try { ContainerReportsRequestProto contianerReport = container . getContainerReport ( ) ; for ( EndpointStateMachine endPoint : connectionManager . getValues ( ) ) { endPoint . getEndPoint ( ) . sendContainerReport ( contianerReport ) ; } } catch ( IOException ex ) { LOG . error ( "Unable to process the Container Report command." , ex ) ; } finally { long endTime = Time . monotonicNow ( ) ; totalTime += endTime - startTime ; } }
Handles a given SCM command.
Handles a given SCM command .
// TODO : We send this report to all SCMs.Check if it is enough only to // send to the leader once we have RAFT enabled SCMs.