Skip to content
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

[Backport 0.5] Abstract service for accessing Flint index metadata #575

Merged
merged 1 commit into from
Aug 17, 2024

Conversation

opensearch-trigger-bot[bot]
Copy link

Backport f5ad574 from #495.

* fix missed renames

* rename for log entry properties
* correct typo planTransformer

Signed-off-by: Sean Kao <seankao@amazon.com>

* add FlintIndexMetadataService

* interface class for FlintIndexMetadataService
  * move FlintMetadata and FlintVersion to flint-commons
* remove ser/de from FlintMetadata; move to OS impl for
  FlintIndexMetadataService
* remove schema parser in FlintMetadata builder to remove dependency to
  opensearch
* FlintSparkIndex generate not only schema json but also map
* FlintMetadataSuite divided into two: one for builder and one for
  ser/de, which is merged to FlintOpenSearchIndexMetadataServiceSuite

Signed-off-by: Sean Kao <seankao@amazon.com>

* move get metadata functions to new service

* Remove getIndexMetadata and getAllIndexMetadata from FlintClient
* Implement the two for OpenSearch
  * TODO: sanitize index name
* Add builder for FlintIndexMetadataService and options
* Refactor caller of FlintClient.get(All)IndexMetadata with
  FlintIndexMetadataService
* TODO: test suite for getIndexMetadata and getAllIndexMetadata (might
  overlap with FlintOpenSearchClientSuite)

Signed-off-by: Sean Kao <seankao@amazon.com>

* update index metadata

* remove updateIndex from FlintClient
* implement updateIndexMetadata for FlintOpenSearchIndexMetadataService
* updateIndexMetadata upon create index in FlintSpark
  * for OS client + OS index metadata service, the call for update is
    redundant
  * it's for when some other index metadata service implementation is
    provided
* TODO: Suite for updateIndexMetadata (now shared with
  FlintOpenSearchClientSuite)

Signed-off-by: Sean Kao <seankao@amazon.com>

* empty implementation for OS deleteIndexMetadata

Signed-off-by: Sean Kao <seankao@amazon.com>

* sanitize index name

Signed-off-by: Sean Kao <seankao@amazon.com>

* fix new FlintOption missing from FlintSparkConf

Signed-off-by: Sean Kao <seankao@amazon.com>

* fix FlintOpenSearchClientSuite

Signed-off-by: Sean Kao <seankao@amazon.com>

* delete file (missed in resolving conflict)

Signed-off-by: Sean Kao <seankao@amazon.com>

* Use service builder in OpenSearchCluster

Signed-off-by: Sean Kao <seankao@amazon.com>

* fix service builder class

* fix FlintOptions for custom class spark properties
* remove SparkConf from builder argument

Signed-off-by: Sean Kao <seankao@amazon.com>

* fix IT

Signed-off-by: Sean Kao <seankao@amazon.com>

* add test suites

Signed-off-by: Sean Kao <seankao@amazon.com>

* sanitize index name for opensearch metadata log

Signed-off-by: Sean Kao <seankao@amazon.com>

* remove spark-warehouse files

Signed-off-by: Sean Kao <seankao@amazon.com>

* exclude _meta field for createIndex in OpenSearch

Signed-off-by: Sean Kao <seankao@amazon.com>

* catch client creation exception

Signed-off-by: Sean Kao <seankao@amazon.com>

* Fetch metadata for OpenSearch table

* OpenSearchCluster move to java file because scala object cannot be
  mocked in mockito

Signed-off-by: Sean Kao <seankao@amazon.com>

* update doc with spark config

Signed-off-by: Sean Kao <seankao@amazon.com>

---------

Signed-off-by: Sean Kao <seankao@amazon.com>
(cherry picked from commit f5ad574)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@seankao-az seankao-az merged commit 3126515 into 0.5 Aug 17, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant