Fix NPE in KinesisSupervisor#setupRecordSupplier. (#13859)

* Fix NPE in KinesisSupervisor#setupRecordSupplier.

PR #13539 refactored record supplier creation and introduced a bug:
this method would throw NPE when recordsPerFetch was not provided
by the user. recordsPerFetch isn't needed in this context at all,
since the supervisor-side supplier doesn't fetch records. So this
patch sets it to zero.

* Remove unused imports.
This commit is contained in:
Gian Merlino 2023-02-27 19:55:28 -08:00 committed by GitHub
parent e2461c21c4
commit aeb1187a7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -197,7 +197,7 @@ public class KinesisSupervisor extends SeekableStreamSupervisor<String, String,
ioConfig.getAwsAssumedRoleArn(),
ioConfig.getAwsExternalId()
),
ioConfig.getRecordsPerFetch(),
0, // no records-per-fetch, it is not used
ioConfig.getFetchDelayMillis(),
0, // skip starting background fetch, it is not used
ioConfig.isDeaggregate(),