@Test public void testGetDataRecord() { SampleData.assertEqualRecords( SampleData.metadataRecord11, CollapserUtils.getDataRecord(SampleData.envMetadataRecord11)); SampleData.assertEqualRecords( SampleData.textRecord, CollapserUtils.getDataRecord(SampleData.envTextRecord)); }
public static IndexedRecord getDataRecord(IndexedRecord record) { Schema schema = record.getSchema(); if (schema.getField(FIELD_DATA) == null) { return null; } return (IndexedRecord) record.get(schema.getField(FIELD_DATA).pos()); }
CollapserUtils { public static IndexedRecord getDataRecord(IndexedRecord record) { Schema schema = record.getSchema(); if (schema.getField(FIELD_DATA) == null) { return null; } return (IndexedRecord) record.get(schema.getField(FIELD_DATA).pos()); } }
CollapserUtils { public static IndexedRecord getDataRecord(IndexedRecord record) { Schema schema = record.getSchema(); if (schema.getField(FIELD_DATA) == null) { return null; } return (IndexedRecord) record.get(schema.getField(FIELD_DATA).pos()); } private  CollapserUtils(); }
CollapserUtils { public static IndexedRecord getDataRecord(IndexedRecord record) { Schema schema = record.getSchema(); if (schema.getField(FIELD_DATA) == null) { return null; } return (IndexedRecord) record.get(schema.getField(FIELD_DATA).pos()); } private  CollapserUtils(); static boolean haveEqualSchema(Collection<IndexedRecord> records); static boolean isEnvelopeSchema(Schema schema); static String getOriginValue(IndexedRecord record); static IndexedRecord getDataRecord(IndexedRecord record); @SuppressWarnings("unchecked") static T getNestedFieldValue(IndexedRecord record, String fieldName); static int getNumberOfFilledFields(IndexedRecord record, List<String> fields); static void sortByFilledDataFields(List<T> records, final List<String> fields); static T merge(T base, T update); }
CollapserUtils { public static IndexedRecord getDataRecord(IndexedRecord record) { Schema schema = record.getSchema(); if (schema.getField(FIELD_DATA) == null) { return null; } return (IndexedRecord) record.get(schema.getField(FIELD_DATA).pos()); } private  CollapserUtils(); static boolean haveEqualSchema(Collection<IndexedRecord> records); static boolean isEnvelopeSchema(Schema schema); static String getOriginValue(IndexedRecord record); static IndexedRecord getDataRecord(IndexedRecord record); @SuppressWarnings("unchecked") static T getNestedFieldValue(IndexedRecord record, String fieldName); static int getNumberOfFilledFields(IndexedRecord record, List<String> fields); static void sortByFilledDataFields(List<T> records, final List<String> fields); static T merge(T base, T update);  }