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
Labels
maintenance
Improves code quality, but not the product
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
).The text was updated successfully, but these errors were encountered: