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)
添加回答
舉報