private static boolean isWhitespace(int c) {
    if (c == -1) {
      return false;
    }
    return Character.isWhitespace((char) c);
  }
Gets the task id if we are running as a Hadoop job. Gets a random number otherwise.
ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java