public synchronized boolean isRunning() {
    return endTime == null;
  }
The class is synchronized, as WebUI may access information about a running query.
ql/src/java/org/apache/hadoop/hive/ql/QueryInfo.java