@Test public void testWrongRecordKeyField() { SimpleKeyGenerator keyGenerator = new SimpleKeyGenerator(getWrongRecordKeyFieldProps()); Assertions.assertThrows(HoodieKeyException.class, () -> keyGenerator.getRecordKey(getRecord())); Assertions.assertThrows(HoodieKeyException.class, () -> keyGenerator.buildFieldPositionMapIfNeeded(KeyGeneratorTestUtilities.structType)); }
@Override public String getRecordKey(GenericRecord record) { return KeyGenUtils.getRecordKey(record, getRecordKeyFields().get(0)); }
SimpleKeyGenerator extends BuiltinKeyGenerator { @Override public String getRecordKey(GenericRecord record) { return KeyGenUtils.getRecordKey(record, getRecordKeyFields().get(0)); } }
SimpleKeyGenerator extends BuiltinKeyGenerator { @Override public String getRecordKey(GenericRecord record) { return KeyGenUtils.getRecordKey(record, getRecordKeyFields().get(0)); } SimpleKeyGenerator(TypedProperties props);   SimpleKeyGenerator(TypedProperties props, String partitionPathField);   SimpleKeyGenerator(TypedProperties props, String recordKeyField, String partitionPathField); }
SimpleKeyGenerator extends BuiltinKeyGenerator { @Override public String getRecordKey(GenericRecord record) { return KeyGenUtils.getRecordKey(record, getRecordKeyFields().get(0)); } SimpleKeyGenerator(TypedProperties props);   SimpleKeyGenerator(TypedProperties props, String partitionPathField);   SimpleKeyGenerator(TypedProperties props, String recordKeyField, String partitionPathField); @Override String getRecordKey(GenericRecord record); @Override String getPartitionPath(GenericRecord record); @Override String getRecordKey(Row row); @Override String getPartitionPath(Row row); }
SimpleKeyGenerator extends BuiltinKeyGenerator { @Override public String getRecordKey(GenericRecord record) { return KeyGenUtils.getRecordKey(record, getRecordKeyFields().get(0)); } SimpleKeyGenerator(TypedProperties props);   SimpleKeyGenerator(TypedProperties props, String partitionPathField);   SimpleKeyGenerator(TypedProperties props, String recordKeyField, String partitionPathField); @Override String getRecordKey(GenericRecord record); @Override String getPartitionPath(GenericRecord record); @Override String getRecordKey(Row row); @Override String getPartitionPath(Row row);  }