2 回答

TA贡献1789条经验 获得超8个赞

TA贡献1836条经验 获得超5个赞
XOR
该问题与验证检查中的条件有关。如您所见,该validateConsumerConfiguration
方法在 if 语句中执行 XOR 验证。因此,您只能指定选中的两个参数之一。
要设置自定义 URL,您需要删除AWSConfigConstants.AWS_REGION属性并仅使用链接。
// Set the given URL
consumerConfig.put(AWSConfigConstants.AWS_ENDPOINT, URL);
// Remove the region
consumerConfig.remove(AWSConfigConstants.AWS_REGION);
此解决方案,修复了与以下 StackTrace 相关的错误:
java.lang.IllegalArgumentException: For FlinkKinesisConsumer either AWS region ('aws.region') or AWS endpoint ('aws.endpoint') must be set in the config.
at org.apache.flink.streaming.connectors.kinesis.util.KinesisConfigUtil.validateConsumerConfiguration(KinesisConfigUtil.java:92)
添加回答
举报