geserdugarov commented on code in PR #17994:
URL: https://github.com/apache/hudi/pull/17994#discussion_r2731192504
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/configuration/OptionsResolver.java:
##########
@@ -151,13 +152,28 @@ public static boolean
isDefaultHoodieRecordPayloadClazz(Configuration conf) {
return
conf.get(FlinkOptions.PAYLOAD_CLASS_NAME).contains(DefaultHoodieRecordPayload.class.getSimpleName());
}
+ /**
+ * Return value of {@link FlinkOptions#RECORD_KEY_FIELD} if it was set,
+ * or throw exception otherwise.
+ */
+ public static String getRecordKeyStrOrFail(Configuration conf) {
+ final String recordKeyStr = conf.get(FlinkOptions.RECORD_KEY_FIELD);
+ if (null == recordKeyStr) {
Review Comment:
> rename to `getRecordKeysStr` and use `ValidatoinUtils` for check and throw?
Fixed by
https://github.com/apache/hudi/pull/17994/commits/b0ce39af9770b84507923ff757f801df0bb5d6da
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]