public static <T> T deserializePlan(InputStream in, Class<T> planClass) {
    Kryo kryo = borrowKryo();
    T result = null;
    try {
      result = deserializePlan(kryo, in, planClass);
    } finally {
      releaseKryo(kryo);
    }
    return result;
  }
Deserializes the plan.

@param in        The stream to read from.
@param planClass class of plan
@return The plan, such as QueryPlan, MapredWork, etc.
ql/src/java/org/apache/hadoop/hive/ql/exec/SerializationUtilities.java