Enhance Point In Time support with APIs to list active point-in-time searches#218
Enhance Point In Time support with APIs to list active point-in-time searches#218reta merged 1 commit intoopensearch-project:mainfrom
Conversation
79455ad to
61b6cd3
Compare
| @@ -5,7 +5,7 @@ | |||
| * you may not use this file except in compliance with the License. | |||
There was a problem hiding this comment.
What's the reason why this file is still called Elasticsearch...?
There was a problem hiding this comment.
We copied this code :-) (from Spring Data Elasticsearch)
There was a problem hiding this comment.
IANAL, but it's APLv2, so you can fork/rename it as you wish, you just cannot remote the license from the file
There was a problem hiding this comment.
I mean we this is way more than just one class, and we have an issue #24 to think about addressing that at large (from you :-))
| ); | ||
|
|
||
| final long started = System.nanoTime(); | ||
| while ((System.nanoTime() - started) < TimeUnit.SECONDS.toNanos(120)) { |
There was a problem hiding this comment.
It might be nice to bring in the Awaitility project and use that here.
This code would look something like:
await().atMost(Duration.ofSeconds(120))
.until(() -> operations.listPointInTime().isEmpty());
There was a problem hiding this comment.
Yeah, I was thinking if bringing the whole new dependency is really justified at this moment (for one single test), seems like too much.
2b6ce95 to
faaed4b
Compare
| @Override | ||
| public List<PitInfo> listPointInTime() { | ||
| return execute(client -> client.getAllPits(RequestOptions.DEFAULT)) | ||
| .getPitInfos().stream().map(pit -> new PitInfo(pit.getPitId(), pit.getCreationTime(), null)) |
There was a problem hiding this comment.
f9dba57 to
0e2de94
Compare
…searches Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
…searches (opensearch-project#218) Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
…searches (opensearch-project#218) Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
…searches (opensearch-project#218) Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
…searches (opensearch-project#218) Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
…searches (opensearch-project#218) Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
…searches (opensearch-project#218) Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
Description
Enhance Point In Time support with APIs to list active point-in-time searches
Issues Resolved
Part of #85
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.