public boolean checkFatalErrors(Counters ctrs, StringBuilder errMsg) {
    if (ctrs == null) {
      // hadoop might return null if it cannot locate the job.
      // we may still be able to retrieve the job status - so ignore
      return false;
    }
    // check for number of created files
    Counters.Counter cntr = ctrs.findCounter(HiveConf.getVar(job, ConfVars.HIVE_COUNTER_GROUP),
        Operator.HIVE_COUNTER_CREATED_FILES);
    long numFiles = cntr != null ? cntr.getValue() : 0;
    long upperLimit = HiveConf.getLongVar(job, HiveConf.ConfVars.MAX_CREATED_FILES);
    if (numFiles > upperLimit) {
      errMsg.append("total number of created files now is " + numFiles + ", which exceeds ").append(upperLimit);
      return true;
    }
    return this.callBackObj.checkFatalErrors(ctrs, errMsg);
  }
In Hive, when the user control-c's the command line, any running jobs spawned from that command
line are best-effort killed.

This static constructor registers a shutdown thread to iterate over all the running job kill
URLs and do a get on them.
ql/src/java/org/apache/hadoop/hive/ql/exec/mr/HadoopJobExecHelper.java