-
Notifications
You must be signed in to change notification settings - Fork 41
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
Enhance Point In Time support with APIs to list active point-in-time searches #218
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reason why this file is still called Elasticsearch...
?
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.
We copied this code :-) (from Spring Data Elasticsearch)
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 :-))
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 do have a memory of a 🐠
); | ||
|
||
final long started = System.nanoTime(); | ||
while ((System.nanoTime() - started) < TimeUnit.SECONDS.toNanos(120)) { |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.