Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(kinesisanalytics-flink): support Apache Flink 1.20 #31349

Merged
merged 4 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/@aws-cdk/aws-kinesisanalytics-flink-alpha/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const flinkApp = new flink.Application(this, 'Application', {
},
},
// ...
runtime: flink.Runtime.FLINK_1_19,
runtime: flink.Runtime.FLINK_1_20,
code: flink.ApplicationCode.fromBucket(bucket, 'my-app.jar'),
});
```
Expand All @@ -59,7 +59,7 @@ snapshotting, monitoring, and parallelism.
declare const bucket: s3.Bucket;
const flinkApp = new flink.Application(this, 'Application', {
code: flink.ApplicationCode.fromBucket(bucket, 'my-app.jar'),
runtime: flink.Runtime.FLINK_1_19,
runtime: flink.Runtime.FLINK_1_20,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update row 83 as well for consistency?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Updated.

checkpointingEnabled: true, // default is true
checkpointInterval: Duration.seconds(30), // default is 1 minute
minPauseBetweenCheckpoints: Duration.seconds(10), // default is 5 seconds
Expand All @@ -80,7 +80,7 @@ declare const bucket: s3.Bucket;
declare const vpc: ec2.Vpc;
const flinkApp = new flink.Application(this, 'Application', {
code: flink.ApplicationCode.fromBucket(bucket, 'my-app.jar'),
runtime: flink.Runtime.FLINK_1_19,
runtime: flink.Runtime.FLINK_1_20,
vpc,
});
```
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ export class Runtime {
/** Flink Version 1.19 */
public static readonly FLINK_1_19 = Runtime.of('FLINK-1_19');

/** Flink Version 1.20 */
public static readonly FLINK_1_20 = Runtime.of('FLINK-1_20');

/** Create a new Runtime with with an arbitrary Flink version string */
public static of(value: string) {
return new Runtime(value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,32 @@ describe('Application', () => {
stack = new core.Stack();
bucket = new s3.Bucket(stack, 'CodeBucket');
requiredProps = {
runtime: flink.Runtime.FLINK_1_19,
runtime: flink.Runtime.FLINK_1_20,
code: flink.ApplicationCode.fromBucket(bucket, 'my-app.jar'),
};
});

test('default Flink Application', () => {
const flinkRuntimes = [
flink.Runtime.FLINK_1_6,
flink.Runtime.FLINK_1_8,
flink.Runtime.FLINK_1_11,
flink.Runtime.FLINK_1_13,
flink.Runtime.FLINK_1_15,
flink.Runtime.FLINK_1_18,
flink.Runtime.FLINK_1_19,
flink.Runtime.FLINK_1_20,
];

test.each(flinkRuntimes)('Flink Application with %s', (runtime) => {
Copy link
Contributor Author

@mazyu36 mazyu36 Sep 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Improved to test all runtimes

new flink.Application(stack, 'FlinkApplication', {
runtime: flink.Runtime.FLINK_1_19,
runtime,
code: flink.ApplicationCode.fromBucket(bucket, 'my-app.jar'),
applicationName: 'MyFlinkApplication',
});

Template.fromStack(stack).hasResourceProperties('AWS::KinesisAnalyticsV2::Application', {
ApplicationName: 'MyFlinkApplication',
RuntimeEnvironment: 'FLINK-1_19',
RuntimeEnvironment: runtime.value,
ServiceExecutionRole: {
'Fn::GetAtt': [
'FlinkApplicationRole2F7BCBF6',
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading