code: public void retry(Task task) {
      if (GobblinMetrics.isEnabled(task.getTaskState().getWorkunit()) &&
          task.getTaskState().contains(ConfigurationKeys.FORK_BRANCHES_KEY)) {
        // Adjust metrics to clean up numbers from the failed task
        task.getTaskState()
            .adjustJobMetricsOnRetry(task.getTaskState().getPropAsInt(ConfigurationKeys.FORK_BRANCHES_KEY));
      }
  
      // Task retry interval increases linearly with number of retries
      long interval = task.getRetryCount() * this.retryIntervalInSeconds;
      // Schedule the retry of the failed task
      this.taskExecutor.schedule(new TrackingTask(task, interval, TimeUnit.SECONDS), interval, TimeUnit.SECONDS);
      LOG.info(String.format("Scheduled retry of failed task %s to run in %d seconds", task.getTaskId(), interval));
      task.incrementRetryCount();
    }
docs: Retry a failed {@link Task}.
  
  @param task failed {@link Task} to be retried