in playground-internal/statefun-playground-entrypoint/src/main/java/org/apache/flink/statefun/playground/internal/entrypoint/ConfigurationValidator.java [38:58]
private static void validateCustomPayloadSerializerClassName(Configuration configuration) {
MessageFactoryType factoryType =
configuration.get(StatefulFunctionsConfig.USER_MESSAGE_SERIALIZER);
String customPayloadSerializerClassName =
configuration.get(StatefulFunctionsConfig.USER_MESSAGE_CUSTOM_PAYLOAD_SERIALIZER_CLASS);
if (factoryType == MessageFactoryType.WITH_CUSTOM_PAYLOADS) {
if (StringUtils.isNullOrWhitespaceOnly(customPayloadSerializerClassName)) {
throw new StatefulFunctionsInvalidConfigException(
StatefulFunctionsConfig.USER_MESSAGE_CUSTOM_PAYLOAD_SERIALIZER_CLASS,
"custom payload serializer class must be supplied with WITH_CUSTOM_PAYLOADS serializer");
}
} else {
if (customPayloadSerializerClassName != null) {
throw new StatefulFunctionsInvalidConfigException(
StatefulFunctionsConfig.USER_MESSAGE_CUSTOM_PAYLOAD_SERIALIZER_CLASS,
"custom payload serializer class may only be supplied with WITH_CUSTOM_PAYLOADS serializer");
}
}
}