public static Schema getSchemaFor(URL url) {
    InputStream in = null;
    try {
      in = url.openStream();
      return getSchemaFor(in);
    } catch (Exception e) {
      throw new RuntimeException("Failed to parse Avro schema", e);
    } finally {
      if (in != null) {
        try {
          in.close();
        } catch (IOException e) {
          // Ignore
        }
      }
    }
  }
Determine if we're being executed from within an MR job or as part
of a select * statement.  The signals for this varies between Hive versions.
@param job that contains things that are or are not set in a job
@return Are we in a job or not?
serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroSerdeUtils.java