Support for remote path in reindex api#31290
Support for remote path in reindex api#31290vladimirdolzhenko merged 5 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/es-distributed |
nik9000
left a comment
There was a problem hiding this comment.
I left two minor things but otherwise it looks good to me.
| public class RestReindexAction extends AbstractBaseReindexRestHandler<ReindexRequest, ReindexAction> { | ||
| static final ObjectParser<ReindexRequest, Void> PARSER = new ObjectParser<>("reindex"); | ||
| private static final Pattern HOST_PATTERN = Pattern.compile("(?<scheme>[^:]+)://(?<host>[^:]+):(?<port>\\d+)"); | ||
| private static final Pattern HOST_PATTERN = Pattern.compile("(?<scheme>[^:]+)://(?<host>[^:]+):(?<port>\\d+)(?<pathPrefix>(/.*)?)"); |
There was a problem hiding this comment.
Is (?<pathPrefix>/.*)? good enough?
There was a problem hiding this comment.
@nik9000 thanks, you're absolutely right
| public RemoteInfo(String scheme, String host, int port, BytesReference query, String username, String password, | ||
| Map<String, String> headers, TimeValue socketTimeout, TimeValue connectTimeout) { | ||
| Map<String, String> headers, TimeValue socketTimeout, TimeValue connectTimeout) { | ||
| this(scheme, host, port, null, query, username, password, headers, socketTimeout, connectTimeout); |
There was a problem hiding this comment.
Generally I'd prefer not to add method overrides for this unless we have a zillion uses of the old method. Would you be ok with fixing all of the call sites? Maybe in a followup PR?
There was a problem hiding this comment.
@nik9000 I totally agree with you - there are 11 are call sites - that stopped me to add extra parameter to any of that call site + 10 args... maybe worth to introduce some kind of RemoteInfo.Builder for that purpose ?
|
test this please |
nik9000
left a comment
There was a problem hiding this comment.
LGTM.
Thanks for fixing this!
|
Thank @nik9000 for the review |
* master: Add get stored script and delete stored script to high level REST API - post backport fix Add get stored script and delete stored script to high level REST API (#31355) Core: Combine Action and GenericAction (#31405) Fix reference to XContentBuilder.string() (#31337) Avoid sending duplicate remote failed shard requests (#31313) Fix defaults in GeoShapeFieldMapper output (#31302) RestAPI: Reject forcemerge requests with a body (#30792) Packaging: Remove windows bin files from the tar distribution (#30596) Docs: Use the default distribution to test docs (#31251) [DOCS] Adds testing for security APIs (#31345) Clarify that IP range data can be specified in CIDR notation. (#31374) Use system context for cluster state update tasks (#31241) Percentile/Ranks should return null instead of NaN when empty (#30460) REST high-level client: add validate query API (#31077) Move language analyzers from server to analysis-common module. (#31300) [Test] Fix :example-plugins:rest-handler on Windows Expose lucene's RemoveDuplicatesTokenFilter (#31275) Reload secure settings for plugins (#31383) Remove some cases in FieldTypeLookupTests that are no longer relevant. (#31381) Ensure we don't use a remote profile if cluster name matches (#31331) [TEST] Double write alias fault (#30942) [DOCS] Fix version in SQL JDBC Maven template [DOCS] Improve install and setup section for SQL JDBC SQL: Fix rest endpoint names in node stats (#31371) Support for remote path in reindex api - post backport fix Closes #22913 [ML] Put ML filter API response should contain the filter (#31362) Support for remote path in reindex api (#31290) Add byte array pooling to nio http transport (#31349) Remove trial status info from start trial doc (#31365) [DOCS] Adds links to release notes and highlights add is-write-index flag to aliases (#30942) Add rollover-creation-date setting to rolled over index (#31144) [ML] Hold ML filter items in sorted set (#31338) [Tests] Fix edge case in ScriptedMetricAggregatorTests (#31357)
Support for remote path in reindex api
Closes #22913