开发故障排除 - Amazon Kinesis Data Analytics
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

开发故障排除

ApachachachchFlink

默认情况下,在支持 Flame Graphs 的 Apache Flink 版本的 Kinesis Data Analytics 应用程序上启用火焰图表。如 Flink文档中所述,如果你保持图表处于打开状态,F lame Graps可能会影响应用程序的性能。

如果您想为应用程序禁用 Flame Graphs,请创建一个案例以请求为您的应用程序 ARN 禁用它。有关更多信息,请参阅Supp Amazonort 中心

EFO 连接器 1.15.2 中的凭证提供者问题

1.15.2 之前的 Kinesis Data Streams EFO 连接器版本存在一个已知问题FlinkKinesisConsumer即不尊重Credential Provider配置。由于该问题,有效配置被忽略,这会导致使用AUTO凭证提供商。这可能会导致使用 EFO 连接器跨账户访问 Kinesis 时出现问题。

要解决此错误,请使用 EFO 连接器版本 1.15.3 或更高版本。

带有不支持 Kinesis 连接器的应用程序

如果应用程序使用捆绑在应用程序 JAR 或存档 (ZIP) 中的不受支持的 Kinesis Connector 版本(1.15.2 之前的版本),则 Kinesis Data Analytics for Apache Flink 版本 1.15 将自动拒绝应用程序启动或更新

拒绝错误

通过以下方式提交创建/更新应用程序调用时,您将看到以下错误:

An error occurred (InvalidArgumentException) when calling the CreateApplication operation: An unsupported Kinesis connector version has been detected in the application. Please update flink-connector-kinesis to any version equal to or newer than 1.15.2. For more information refer to connector fix: https://issues.apache.org/jira/browse/FLINK-23528

补救步骤

  • 更新应用程序对的依赖关系flink-connector-kinesis。如果您使用 Maven 作为项目的构建工具,请关注更新 Maven 依赖关系 。如果你使用的是 Gradle,请关注更新 Gradle 依赖关系

  • 重新打包应用程序。

  • 将 Go 更新为Amazon S3 存储桶。

  • 使用刚刚上传到 Amazon S3 存储桶的修改后的应用程序重新提交创建/更新应用程序请求。

  • 如果您继续看到相同的错误消息,请重新检查您的应用程序依赖关系。如果问题仍然存在,请创建支持请求。

更新 Maven 依赖关系

  1. 打开项目的pom.xml

  2. 查找项目的依赖关系。它们看起来像:

    <project> ... <dependencies> ... <dependency> <groupId>org.apache.flink</groupId> <artifactId>flink-connector-kinesis</artifactId> </dependency> ... </dependencies> ... </project>
  3. 更新flink-connector-kinesis到等于或高于 1.15.2 的版本。例如:

    <project> ... <dependencies> ... <dependency> <groupId>org.apache.flink</groupId> <artifactId>flink-connector-kinesis</artifactId> <version>1.15.2</version> </dependency> ... </dependencies> ... </project>

更新 Gradle 依赖关系

  1. 打开项目的build.gradle(或build.gradle.kts适用于 Kotlin 应用程序)。

  2. 查找项目的依赖关系。它们看起来像:

    ... dependencies { ... implementation("org.apache.flink:flink-connector-kinesis") ... } ...
  3. 更新flink-connector-kinesis到等于或高于 1.15.2 的版本。例如:

    ... dependencies { ... implementation("org.apache.flink:flink-connector-kinesis:1.15.2") ... } ...

编译错误:“无法解析项目的依赖关系”

要编译适用于 Apache Flink 示例应用程序的 Kinesis Data Analytics,您必须先下载并编译 Apache Flink Kinesis 连接器,然后将其添加到本地 Maven 存储库中。如果尚未将连接器添加到存储库中,则会显示类似下面的编译错误:

Could not resolve dependencies for project your project name: Failure to find org.apache.flink:flink-connector-kinesis_2.11:jar:1.8.2 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced

要解决该错误,您必须下载连接器的 Apache Flink 源代码(位于 https://flink.apache.org/downloads.html 中的版本 1.8.2)。有关如何下载、编译和安装 Apache Flink 源代码的说明,请参阅在之前的 Apache Flink Kinesis Streams 连接器中使用 Apache Flink

无效的选择:“kinesisanalyticsv2”

要使用 Kinesis Data Analytics API 的 v2,你需要最新版本的Amazon Command Line Interface (Amazon CLI)。

有关升级的信息Amazon CLI,请参阅Amazon Command Line Interface用户指南》Amazon Command Line Interface中的安装

UpdateApplication 操作不是在重新加载应用程序代码

如果未指定 S3 对象版本,则该UpdateApplication操作将不会重新加载具有相同文件名的应用程序代码。要重新加载具有相同文件名的应用程序代码,请在 S3 存储桶上启用版本控制,并使用ObjectVersionUpdate参数指定新的对象版本。有关在 S3 存储桶中启用对象版本控制的更多信息,请参阅启用或禁用版本控制