-
Notifications
You must be signed in to change notification settings - Fork 467
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
Everything else #971
base: v1.x
Are you sure you want to change the base?
Everything else #971
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
most of the changes are just creating and using interface and updating class. had some minor comments
@@ -64,24 +61,36 @@ class ShardConsumer { | |||
private final long taskBackoffTimeMillis; | |||
private final boolean skipShardSyncAtWorkerInitializationIfLeasesExist; | |||
|
|||
@Getter | |||
//@Getter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we commenting it out and adding separate get function? same for below two commented gets
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a carry over from the brazil testing as the build couldn't find the getter functions. I will verify that maven can properly read the getter, and remove these changes if tests pass.
@@ -373,9 +382,9 @@ public boolean isSkipShardSyncAtWorkerInitializationIfLeasesExist() { | |||
return skipShardSyncAtWorkerInitializationIfLeasesExist; | |||
} | |||
|
|||
private enum TaskOutcome { | |||
/*public enum TaskOutcome { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you have moved this to IShardConsumer, why not just remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a carry over from testing. I will remove it.
if(shardConsumerFactory == null){ | ||
|
||
shardConsumerFactory = new KinesisShardConsumerFactory(); | ||
} | ||
|
||
return shardConsumerFactory.createShardConsumer(shardInfo, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will there be any conflict if only shardConsumerFactory is set to Kinesis variant and all other are of different type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am unsure what you mean by this. The chosen ShardConsumerFactory should create all ShardConsumers so they should all be the same type. Do you mean if the ShardConsumerFactory is the KinesisVariant but other classes like the PeriodicShardSyncManager are the DDB Streams Variant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean if the ShardConsumerFactory is the KinesisVariant but other classes like the PeriodicShardSyncManager are the DDB Streams Variant?
yes, will it cause any issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So a normal KCL application shouldn't have access to anything outside of the standard KCL classes so the shardConsumerFactory and all other classes should be the Kinesis variant. Obviously in an adapter application, using the KinesisShardConsumerFactory with the DDB Streams classes will cause issues but standard KCL applications should never face that issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, integ tests and application tests good.
Description of changes: The remaining changes require to allow for re-compatibility with the DynamoDBStreamsKinesisAdapter. The majority of changes consist of creating interfaces for key classes like the ShardConsumer, renaming these preexisting classes to include the Kinesis prefix (ShardConsumer -> KinesisShardConsumer) to distinguish from any classes that will use the new interfaces (i.e. DynamoDBStreamsShardConsumer), and making several utility classes and functions public so they could be accessed by the adapter or interfaces, such as the InitializationTask
Testing: Testing was done with the StreamsKCLAdapterCheck package which contains Kinesis KCL tests. Changes were also verified with the built in unit tests using mvn test.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.