code: private void dispatchCommitActions(List<CommitTaskAction> commitActions)
        throws IOException {
      if (!commitActions.isEmpty()) {
        TaskAttemptID[] wasCommitting;
        try {
          wasCommitting = commitPermissionClient
              .getAndSetCommitting(commitActions);
        } catch (IOException e) {
          LOG.error("Commit permission client is faulty - killing this JT");
          try {
            close(false);
          } catch (InterruptedException e1) {
            throw new IOException(e1);
          }
          throw e;
        }
        int i = 0;
        for (CommitTaskAction action : commitActions) {
          TaskAttemptID oldCommitting = wasCommitting[i];
          if (oldCommitting != null) {
            // Fail old committing task attempt
            failTask(oldCommitting, "Unknown committing attempt", false);
          }
          // Commit new task
          TaskAttemptID newToCommit = action.getTaskID();
          if (!newToCommit.equals(oldCommitting)) {
            String trackerName = taskLookupTable.getAssignedTracker(newToCommit);
            taskLauncher.commitTask(trackerName,
                resourceTracker.getTrackerAddr(trackerName), action);
          } else {
            LOG.warn("Repeated try to commit same attempt id. Ignoring");
          }
          // iterator next
          ++i;
        }
      }
    }
docs: Executes actions that can be executed after asking commit permission
  authority
  @param actions list of actions to execute
  @throws IOException