-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
Add high-level REST client API for _freeze
and _unfreeze
#35723
Conversation
This change adds support for `_freeze` and `_unfreeze` to the HLRC Relates to elastic#34352
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.
client/rest-high-level/src/main/java/org/elasticsearch/client/IndicesRequestConverters.java
Outdated
Show resolved
Hide resolved
client/rest-high-level/src/main/java/org/elasticsearch/client/ShardAcknowledgedResponse.java
Outdated
Show resolved
Hide resolved
client/rest-high-level/src/main/java/org/elasticsearch/client/FreezeIndexRequest.java
Outdated
Show resolved
Hide resolved
client/rest-high-level/src/main/java/org/elasticsearch/client/ShardAcknowledgedResponse.java
Outdated
Show resolved
Hide resolved
client/rest-high-level/src/main/java/org/elasticsearch/client/ShardAcknowledgedResponse.java
Outdated
Show resolved
Hide resolved
client/rest-high-level/src/main/java/org/elasticsearch/client/UnfreezeIndexRequest.java
Outdated
Show resolved
Hide resolved
client/rest-high-level/src/main/java/org/elasticsearch/client/FreezeIndexRequest.java
Outdated
Show resolved
Hide resolved
@@ -403,4 +403,20 @@ static Request analyze(AnalyzeRequest request) throws IOException { | |||
req.setEntity(RequestConverters.createEntity(request, RequestConverters.REQUEST_BODY_CONTENT_TYPE)); | |||
return req; | |||
} | |||
|
|||
static Request freezeIndex(FreezeIndexRequest freezeIndexRequest) { |
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.
just double checking that these should be added with all the other OSS API, I think it makes sense but let's be sure.
Does it make sense to add unit testing for these to IndicesRequestConvertersTests
?
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.
everything is OSS in this package the serverside might not be
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 think that its fine that indices type things can be in the IndicesClient, regardless of their status of commercial/noncommercial.
@javanna I addressed your comments |
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.
Agree on the need for docs and the minor comments below.
client/rest-high-level/src/main/java/org/elasticsearch/client/FreezeIndexRequest.java
Outdated
Show resolved
Hide resolved
client/rest-high-level/src/main/java/org/elasticsearch/client/FreezeIndexRequest.java
Outdated
Show resolved
Hide resolved
client/rest-high-level/src/main/java/org/elasticsearch/client/IndicesClient.java
Show resolved
Hide resolved
@@ -403,4 +403,20 @@ static Request analyze(AnalyzeRequest request) throws IOException { | |||
req.setEntity(RequestConverters.createEntity(request, RequestConverters.REQUEST_BODY_CONTENT_TYPE)); | |||
return req; | |||
} | |||
|
|||
static Request freezeIndex(FreezeIndexRequest freezeIndexRequest) { |
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 think that its fine that indices type things can be in the IndicesClient, regardless of their status of commercial/noncommercial.
client/rest-high-level/src/main/java/org/elasticsearch/client/IndicesClient.java
Outdated
Show resolved
Hide resolved
client/rest-high-level/src/main/java/org/elasticsearch/client/UnfreezeIndexRequest.java
Outdated
Show resolved
Hide resolved
client/rest-high-level/src/main/java/org/elasticsearch/client/core/AcknowledgedRequest.java
Outdated
Show resolved
Hide resolved
where are the docs missing? |
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.
Nits on the docs, and pls move the requests into o.e.c.indices
client/rest-high-level/src/main/java/org/elasticsearch/client/IndicesClient.java
Outdated
Show resolved
Hide resolved
@hub-cap I pushed new commits |
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
This change adds support for
_freeze
and_unfreeze
to the HLRCRelates to #34352