hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/ScmTestMock.java
@Override
  public StorageContainerDatanodeProtocolProtos.SCMHeartbeatResponseProto
      sendHeartbeat(DatanodeDetailsProto datanodeDetailsProto,
                    SCMNodeReport nodeReport, ReportState scmReportState)
      throws IOException {
    rpcCount.incrementAndGet();
    heartbeatCount.incrementAndGet();
    this.reportState = scmReportState;
    sleepIfNeeded();
    List<SCMCommandResponseProto>
        cmdResponses = new LinkedList<>();
    return SCMHeartbeatResponseProto.newBuilder().addAllCommands(cmdResponses)
        .build();
  }
/**
   * Used by data node to send a Heartbeat.
   *
   * @param datanodeDetailsProto - DatanodeDetailsProto.
   * @param nodeReport - node report.
   * @return - SCMHeartbeatResponseProto
   * @throws IOException
   */
Used by data node to send a Heartbeat.
Used by data node to send a Heartbeat .
@Override
  public StorageContainerDatanodeProtocolProtos.SCMHeartbeatResponseProto
      sendHeartbeat(DatanodeDetailsProto datanodeDetailsProto,
                    SCMNodeReport nodeReport, ReportState scmReportState)
      throws IOException {
    rpcCount.incrementAndGet();
    heartbeatCount.incrementAndGet();
    this.reportState = scmReportState;
    sleepIfNeeded();
    List<SCMCommandResponseProto>
        cmdResponses = new LinkedList<>();
    return SCMHeartbeatResponseProto.newBuilder().addAllCommands(cmdResponses)
        .build();
  }
@ Override public StorageContainerDatanodeProtocolProtos . SCMHeartbeatResponseProto sendHeartbeat ( DatanodeDetailsProto datanodeDetailsProto , SCMNodeReport nodeReport , ReportState scmReportState ) throws IOException { rpcCount . incrementAndGet ( ) ; heartbeatCount . incrementAndGet ( ) ; this . reportState = scmReportState ; sleepIfNeeded ( ) ; List < SCMCommandResponseProto > cmdResponses = new LinkedList < > ( ) ; return SCMHeartbeatResponseProto . newBuilder ( ) . addAllCommands ( cmdResponses ) . build ( ) ; }
Used by data node to send a Heartbeat.
Used by data node to send a Heartbeat .