@InterfaceAudience.Private
  public static long getWarn() {
    return counts.get(WARN);
  }
A log4J2 Appender that simply counts logging events in four levels:
fatal, error, warn and info. The class name can be used in log4j2.properties
ql/src/java/org/apache/hadoop/hive/ql/log/HiveEventCounter.java