hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/StorageContainerManager.java
@Override
  public SCMHeartbeatResponseProto sendHeartbeat(
      DatanodeDetailsProto datanodeDetails, SCMNodeReport nodeReport,
      ReportState reportState) throws IOException {
    List<SCMCommand> commands =
        getScmNodeManager().sendHeartbeat(datanodeDetails, nodeReport,
            reportState);
    List<SCMCommandResponseProto> cmdResponses = new LinkedList<>();
    for (SCMCommand cmd : commands) {
      cmdResponses.add(getCommandResponse(cmd, datanodeDetails.getUuid()
          .toString()));
    }
    return SCMHeartbeatResponseProto.newBuilder().addAllCommands(cmdResponses)
        .build();
  }
/**
   * Used by data node to send a Heartbeat.
   *
   * @param datanodeDetails - Datanode Details.
   * @param nodeReport - Node Report
   * @param reportState - Container report ready info.
   * @return - SCMHeartbeatResponseProto
   * @throws IOException
   */
Used by data node to send a Heartbeat.
@param datanodeDetails - Datanode Details.
@param nodeReport - Node Report
@param reportState - Container report ready info.
Used by data node to send a Heartbeat . @param datanodeDetails - Datanode Details . @param nodeReport - Node Report @param reportState - Container report ready info .
@Override
  public SCMHeartbeatResponseProto sendHeartbeat(
      DatanodeDetailsProto datanodeDetails, SCMNodeReport nodeReport,
      ReportState reportState) throws IOException {
    List<SCMCommand> commands =
        getScmNodeManager().sendHeartbeat(datanodeDetails, nodeReport,
            reportState);
    List<SCMCommandResponseProto> cmdResponses = new LinkedList<>();
    for (SCMCommand cmd : commands) {
      cmdResponses.add(getCommandResponse(cmd, datanodeDetails.getUuid()
          .toString()));
    }
    return SCMHeartbeatResponseProto.newBuilder().addAllCommands(cmdResponses)
        .build();
  }
@ Override public SCMHeartbeatResponseProto sendHeartbeat ( DatanodeDetailsProto datanodeDetails , SCMNodeReport nodeReport , ReportState reportState ) throws IOException { List < SCMCommand > commands = getScmNodeManager ( ) . sendHeartbeat ( datanodeDetails , nodeReport , reportState ) ; List < SCMCommandResponseProto > cmdResponses = new LinkedList < > ( ) ; for ( SCMCommand cmd : commands ) { cmdResponses . add ( getCommandResponse ( cmd , datanodeDetails . getUuid ( ) . toString ( ) ) ) ; } return SCMHeartbeatResponseProto . newBuilder ( ) . addAllCommands ( cmdResponses ) . build ( ) ; }
Used by data node to send a Heartbeat.
Used by data node to send a Heartbeat .