-
Notifications
You must be signed in to change notification settings - Fork 24.6k
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
Rest HL client: Add watcher stats API #35185
Rest HL client: Add watcher stats API #35185
Conversation
Pinging @elastic/es-core-infra |
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.
mostly nits, good work
String endpoint = builder.build(); | ||
Request request = new Request(HttpGet.METHOD_NAME, endpoint); | ||
RequestConverters.Params parameters = new RequestConverters.Params(request); | ||
StringBuilder metric = new StringBuilder(); |
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.
two spaces between StringBuilder
and metric
new RequestConverters.EndpointBuilder() | ||
.addPathPartAsIs("_xpack") | ||
.addPathPartAsIs("watcher") | ||
.addPathPartAsIs("stats"); |
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.
addPathPartAsIs now takes a variadic
* under the License. | ||
*/ | ||
|
||
|
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.
extra emtpy line
*/ | ||
public class WatcherStatsRequest implements Validatable { | ||
|
||
private boolean includeCurrentWatches; |
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.
if there is no reason to make these mutable, lets make these final and have 2 constructors, a default one where we set them both to (im going to guess false, but thats up to you), and a 2 arg constructor where we ensure both are set.
return watcherMetaData; | ||
} | ||
|
||
|
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.
empty lines
|
||
@Override | ||
public int hashCode() { | ||
|
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.
empty line
...est-high-level/src/test/java/org/elasticsearch/client/watcher/WatcherStatsResponseTests.java
Show resolved
Hide resolved
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.
Relates #29827