-
Notifications
You must be signed in to change notification settings - Fork 35
Conversation
…duler and IntervalScheduler classes. - This is needed for converting Anomaly Detection API's to integrate with RestActions.
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 don't see concern for the code itself. btw, have we synced up with the team about why this change is necessary and what's the impact on other clients?
Thanks @weicongs-amazon for taking a look. I did have a brief chat with @skkosuri-amzn and he agree's with the change (I'll wait for him to review the PR). |
startTime = input.readInstant(); | ||
interval = input.readInt(); | ||
unit = input.readEnum(ChronoUnit.class); | ||
intervalInMillis = input.readLong(); |
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 write/read this instead of constructing based off interval and unit?
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.
Great question, this constructor is needed when the input is a stream. This stream is the TCP communication between nodes and helps us serialize and de-serialize information.
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.
Had an offline chat with @dbbaughe. Sure makes sense. I'll make the change.
Thanks @saratvemulapalli for the changes. Looks good. You plan to add UT to exercise writeTo and readFrom? |
Sure thanks for taking a look. I'll add some UTs. |
Making Schedule interface Writeable and relevant changes for CronScheduler and IntervalScheduler classes.
Issue
opendistro-for-elasticsearch/anomaly-detection#195
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.