@Override
  public synchronized void markComplete(String msg) {
    setState(State.COMPLETE);
    setStatus(msg);
    if (tasks.getLast() != null) {
      tasks.getLast().markComplete(msg);
    }
    delegate.markComplete(msg);
  }
Add a new task to the group, and before that might complete the last task in the group
@param description      the description of the new task
@param withCompleteLast whether to complete the last task in the group
@return the added new task
hbase-server/src/main/java/org/apache/hadoop/hbase/monitoring/TaskGroup.java