public void setPlan(QueryPlan plan) {
    this.plan = plan;
    // only set runtimeContext if the plan is not null
    // we don't want to nullify runtimeContext if this method is called with plan=null, which is the case when e.g.
    // driver.releasePlan() tries to release resources/objects that are known to be heavy
    if (plan != null) {
      this.runtimeContext = Utilities.getFirstTezTask(plan.getRootTasks())
          .map(TezTask::getRuntimeContext)
          .orElse(null);
      this.queryProperties = plan.getQueryProperties();
    }
  }
Context for the procedure managed by the Driver.
ql/src/java/org/apache/hadoop/hive/ql/DriverContext.java