Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Wrap native ES client for API call intercept #193

Closed
dai-chen opened this issue Sep 23, 2019 · 1 comment
Closed

Wrap native ES client for API call intercept #193

dai-chen opened this issue Sep 23, 2019 · 1 comment
Assignees
Labels
maintenance Improves code quality, but not the product

Comments

@dai-chen
Copy link
Member

We added an ES client wrapper ESClient long time ago: https://github.com/opendistro-for-elasticsearch/sql/blob/1d945a8a59fe14f226c019b724722d0d57354259/src/main/java/com/amazon/opendistroforelasticsearch/sql/esdomain/ESClient.java.

We should pass it around and start to use it as a layer between our code and ES. The benefit includes capturing to convert ES exception in one place, providing consistent retry mechanism, avoid static class like LocalClusterState etc.

In future, we should build our ES domain layer around this client, for example, request builder, response and mapping parser (we already have Index/Type/FieldMappings).

@dai-chen dai-chen added the maintenance Improves code quality, but not the product label Sep 23, 2019
@dai-chen dai-chen changed the title Use our own ESClient as native ES client wrapper Wrap native ES client for API call intercept Sep 24, 2019
@dai-chen dai-chen self-assigned this Jul 7, 2020
@dai-chen
Copy link
Member Author

dai-chen commented Jul 7, 2020

We've added a storage layer in our new query engine with Elasticsearch client wrapped: #469.

@dai-chen dai-chen closed this as completed Jul 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
maintenance Improves code quality, but not the product
Projects
None yet
Development

No branches or pull requests

1 participant