private void markRecoveryFailed(RecoveryStatus.ErrorCode errorMessage){
  if (!isLeader.get()) {
    log.warn("This node is not the recovery leader");
    throw new IllegalStateException("This node is not the recovery leader");
  }
  RecoveryStatus recoveryStatus=queryNodeRecoveryStatus();
  if (recoveryStatus.getErrorCode() != null) {
    log.debug("Have already marked.");
    return;
  }
  recoveryStatus.setErrorCode(errorMessage);
  recoveryStatus.setEndTime(new Date());
  recoveryStatus.setStatus(RecoveryStatus.Status.FAILED);
  persistNodeRecoveryStatus(recoveryStatus);
  poweroff(getHibernateNodes());
}

private void markRecoveryFailed ( RecoveryStatus . ErrorCode errorMessage ) { if ( ! isLeader . get ( ) ) { log . warn ( "This node is not the recovery leader" ) ; throw new IllegalStateException ( "This node is not the recovery leader" ) ; } RecoveryStatus recoveryStatus = queryNodeRecoveryStatus ( ) ; if ( recoveryStatus . getErrorCode ( ) != null ) { log . debug ( "Have already marked." ) ; return ; } recoveryStatus . setErrorCode ( errorMessage ) ; recoveryStatus . setEndTime ( new Date ( ) ) ; recoveryStatus . setStatus ( RecoveryStatus . Status . FAILED ) ; persistNodeRecoveryStatus ( recoveryStatus ) ; poweroff ( getHibernateNodes ( ) ) ; }
mark recovery status as failed and set error message and end time
