commonlib/src/main/java/com/streamsets/pipeline/lib/util/AvroTypeUtil.java
public static Schema parseSchema(String schema) {
    Schema.Parser parser = new Schema.Parser();
    parser.setValidate(true);

    // We sadly can't use this method directly because it was added after 1.7.3 and we have to stay
    // compatible with 1.7.3 as this version ships with mapr (and thus we end up using it). This code is
    // however compiled against 1.7.7 and hence we don't have to do reflection here.
    try {
      parser.setValidateDefaults(true);
    } catch (NoSuchMethodError e) {
      LOG.debug("Running old Avro version that doesn't have 'setValidateDefaults' method", e);
    }

    return parser.parse(schema);
  }
public static Schema parseSchema(String schema) {
    Schema.Parser parser = new Schema.Parser();
    parser.setValidate(true);

    // We sadly can't use this method directly because it was added after 1.7.3 and we have to stay
    // compatible with 1.7.3 as this version ships with mapr (and thus we end up using it). This code is
    // however compiled against 1.7.7 and hence we don't have to do reflection here.
    try {
      parser.setValidateDefaults(true);
    } catch (NoSuchMethodError e) {
      LOG.debug("Running old Avro version that doesn't have 'setValidateDefaults' method", e);
    }

    return parser.parse(schema);
  }
Parse JSON representation of Avro schema to Avro's Schema JAVA object