hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/states/endpoint/HeartbeatEndpointTask.java
@Override
  public EndpointStateMachine.EndPointStates call() throws Exception {
    rpcEndpoint.lock();
    try {
      Preconditions.checkState(this.datanodeDetailsProto != null);

      SCMHeartbeatResponseProto reponse = rpcEndpoint.getEndPoint()
          .sendHeartbeat(datanodeDetailsProto, this.context.getNodeReport(),
              this.context.getContainerReportState());
      processResponse(reponse, datanodeDetailsProto);
      rpcEndpoint.setLastSuccessfulHeartbeat(ZonedDateTime.now());
      rpcEndpoint.zeroMissedCount();
    } catch (IOException ex) {
      rpcEndpoint.logIfNeeded(ex);
    } finally {
      rpcEndpoint.unlock();
    }
    return rpcEndpoint.getState();
  }
/**
   * Computes a result, or throws an exception if unable to do so.
   *
   * @return computed result
   * @throws Exception if unable to compute a result
   */
Computes a result, or throws an exception if unable to do so.
@return computed result
@throws Exception if unable to compute a result
Computes a result or throws an exception if unable to do so . @return computed result @throws Exception if unable to compute a result
@Override
  public EndpointStateMachine.EndPointStates call() throws Exception {
    rpcEndpoint.lock();
    try {
      Preconditions.checkState(this.datanodeDetailsProto != null);
      SCMHeartbeatResponseProto reponse = rpcEndpoint.getEndPoint()
          .sendHeartbeat(datanodeDetailsProto, this.context.getNodeReport(),
              this.context.getContainerReportState());
      processResponse(reponse, datanodeDetailsProto);
      rpcEndpoint.setLastSuccessfulHeartbeat(ZonedDateTime.now());
      rpcEndpoint.zeroMissedCount();
    } catch (IOException ex) {
      rpcEndpoint.logIfNeeded(ex);
    } finally {
      rpcEndpoint.unlock();
    }
    return rpcEndpoint.getState();
  }
@ Override public EndpointStateMachine . EndPointStates call ( ) throws Exception { rpcEndpoint . lock ( ) ; try { Preconditions . checkState ( this . datanodeDetailsProto != null ) ; SCMHeartbeatResponseProto reponse = rpcEndpoint . getEndPoint ( ) . sendHeartbeat ( datanodeDetailsProto , this . context . getNodeReport ( ) , this . context . getContainerReportState ( ) ) ; processResponse ( reponse , datanodeDetailsProto ) ; rpcEndpoint . setLastSuccessfulHeartbeat ( ZonedDateTime . now ( ) ) ; rpcEndpoint . zeroMissedCount ( ) ; } catch ( IOException ex ) { rpcEndpoint . logIfNeeded ( ex ) ; } finally { rpcEndpoint . unlock ( ) ; } return rpcEndpoint . getState ( ) ; }
Computes a result, or throws an exception if unable to do so.
Computes a result or throws an exception if unable to do so .