-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
HLRC: ML PUT Calendar #33362
HLRC: ML PUT Calendar #33362
Conversation
Pinging @elastic/es-core-infra |
Pinging @elastic/ml-core |
696b67e
to
50ba8aa
Compare
retest this please |
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.
Some minor things and consistencies.
*/ | ||
public Calendar(String id, List<String> jobIds, @Nullable String description) { | ||
this.id = Objects.requireNonNull(id, ID.getPreferredName() + " must not be null"); | ||
this.jobIds = Objects.requireNonNull(jobIds, JOB_IDS.getPreferredName() + " must not be null"); |
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 would think that the this.jobIds
should be made immutable here, or at least create a new ArrayList
from the passed in list.
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.
Good point
return true; | ||
} | ||
|
||
if (!(obj instanceof Calendar)) { |
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.
For consistency, please use obj == null || getClass() != obj.getClass()
for equality check.
return true; | ||
} | ||
|
||
if (!(obj instanceof ScheduledEvent)) { |
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.
See comment on the Calender#equals
method.
|
||
@Override | ||
protected boolean supportsUnknownFields() { | ||
return false; |
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 should be true
. This is just a wrapper for the Calendar
class whose parser ignores unknown fields.
|
||
@Override | ||
protected boolean supportsUnknownFields() { | ||
return false; |
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 should be true
|
||
@Override | ||
protected boolean supportsUnknownFields() { | ||
return false; |
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.
true
as well here.
<1> Create a request with the given Calendar | ||
|
||
|
||
[[java-rest-high-snapshot-ml-put-calendar-response]] |
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 is this java-rest-high-snapshot...
?
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.
Good catch. I based this on another doc which in turn must have been copied form the snapshot restore API. There were a a number of ML docs that had the same mis-naming
a3d49b5
to
c8ff4ec
Compare
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
c8ff4ec
to
647b817
Compare
* master: Add script to cache dependencies (elastic#33726) [DOCS] Moves security reference to docs folder (elastic#33643) Cleanup assertions in global checkpoint listeners (elastic#33722) [CCR] Move ccr tests in core module back to ccr module (elastic#33711) HLRC: ML PUT Calendar (elastic#33362) [Tests] Fix randomization in StringTermsIT (elastic#33678) Pin TLS1.2 in SSLConfigurationReloaderTests
For #29827