Skip to content

Commit cd49302

Browse files
Address review comments
1 parent a0f3808 commit cd49302

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

client/rest-high-level/src/main/java/org/elasticsearch/client/MachineLearningClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,8 +459,8 @@ public void updateJobAsync(UpdateJobRequest request, RequestOptions options, Act
459459
* <p>
460460
* For additional info
461461
* see <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html">ML PUT datafeed documentation</a>
462-
*
463-
* @param request The PutDatafeedRequest containing the {@link org.elasticsearch.client.ml.datafeed.DatafeedConfig} settings
462+
*
463+
* @param request The PutDatafeedRequest containing the {@link org.elasticsearch.client.ml.datafeed.DatafeedConfig} settings
464464
* @param options Additional request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
465465
* @return PutDatafeedResponse with enclosed {@link org.elasticsearch.client.ml.datafeed.DatafeedConfig} object
466466
* @throws IOException when there is a serialization issue sending the request or receiving the response

client/rest-high-level/src/main/java/org/elasticsearch/client/ml/datafeed/DatafeedConfig.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,10 @@ private static Map<String, Object> asMap(BytesReference bytesReference) {
217217
* The lists of indices and types are compared for equality but they are not
218218
* sorted first so this test could fail simply because the indices and types
219219
* lists are in different orders.
220+
*
221+
* Also note this could be a heavy operation when a query or aggregations
222+
* are set as we need to convert the bytes references into maps to correctly
223+
* compare them.
220224
*/
221225
@Override
222226
public boolean equals(Object other) {
@@ -243,6 +247,11 @@ public boolean equals(Object other) {
243247
&& Objects.equals(this.chunkingConfig, that.chunkingConfig);
244248
}
245249

250+
/**
251+
* Note this could be a heavy operation when a query or aggregations
252+
* are set as we need to convert the bytes references into maps to
253+
* compute a stable hash code.
254+
*/
246255
@Override
247256
public int hashCode() {
248257
return Objects.hash(id, jobId, frequency, queryDelay, indices, types, asMap(query), scrollSize, asMap(aggregations), scriptFields,

client/rest-high-level/src/main/java/org/elasticsearch/client/ml/datafeed/DatafeedUpdate.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,10 @@ private static Map<String, Object> asMap(BytesReference bytesReference) {
205205
* The lists of indices and types are compared for equality but they are not
206206
* sorted first so this test could fail simply because the indices and types
207207
* lists are in different orders.
208+
*
209+
* Also note this could be a heavy operation when a query or aggregations
210+
* are set as we need to convert the bytes references into maps to correctly
211+
* compare them.
208212
*/
209213
@Override
210214
public boolean equals(Object other) {
@@ -231,6 +235,11 @@ public boolean equals(Object other) {
231235
&& Objects.equals(this.chunkingConfig, that.chunkingConfig);
232236
}
233237

238+
/**
239+
* Note this could be a heavy operation when a query or aggregations
240+
* are set as we need to convert the bytes references into maps to
241+
* compute a stable hash code.
242+
*/
234243
@Override
235244
public int hashCode() {
236245
return Objects.hash(id, jobId, frequency, queryDelay, indices, types, asMap(query), scrollSize, asMap(aggregations), scriptFields,

0 commit comments

Comments
 (0)