use of org.apache.hudi.avro.MercifulJsonConverter in project hudi by apache.
the class SchemaTestUtil method generateAvroRecordFromJson.
public static GenericRecord generateAvroRecordFromJson(Schema schema, int recordNumber, String instantTime, String fileId, boolean populateMetaFields) throws IOException {
SampleTestRecord record = new SampleTestRecord(instantTime, recordNumber, fileId, populateMetaFields);
MercifulJsonConverter converter = new MercifulJsonConverter();
return converter.convert(record.toJsonString(), schema);
}
Aggregations