code: synchronized void offer(Dag<JobExecutionPlan> dag) throws IOException {
      //Persist the dag
      this.dagStateStore.writeCheckpoint(dag);
      //Add it to the queue of dags
      if (!this.queue.offer(dag)) {
        throw new IOException("Could not add dag" + DagManagerUtils.generateDagId(dag) + "to queue");
      }
    }
docs: Method to submit a {@link Dag} to the {@link DagManager}. The {@link DagManager} first persists the
  submitted dag to the {@link DagStateStore} and then adds the dag to a {@link BlockingQueue} to be picked up
  by one of the {@link DagManagerThread}s.