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

Support custom metadata log service implementation #389

Merged
merged 8 commits into from
Jun 23, 2024

Conversation

seankao-az
Copy link
Collaborator

@seankao-az seankao-az commented Jun 20, 2024

Description

  1. Use reflection for FlintMetadataLogServiceBuilder to support custom implementation of FlintMetadataLogService
  2. Read SparkConf for such builder
  3. Make FlintMetadataLogService an abstract class with a constructor using SparkConf
  4. Move interfaces to flint-commons
    1. Moved files: FlintMetadataLog, FlintMetadataLogEntry, FlintMetadataLogService, OptimisticTransaction
    2. Remove unused failLogEntry from FlintMetadataLogEntry (no access to org.opensearch.index namespace). Can add back in next PR when storage is abstracted away from the common FlintMetadataLogEntry

Issues Resolved

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Sean Kao <[email protected]>
Signed-off-by: Sean Kao <[email protected]>
@seankao-az seankao-az marked this pull request as ready for review June 20, 2024 15:14
@seankao-az seankao-az self-assigned this Jun 21, 2024
@seankao-az seankao-az added maintenance Code refactoring 0.5 labels Jun 21, 2024
Copy link
Collaborator

@penghuo penghuo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx!

@seankao-az seankao-az merged commit 0f53448 into opensearch-project:main Jun 23, 2024
4 checks passed
* <p>
* Custom implementations of {@link FlintMetadataLogService} are expected to provide a public
* constructor with the signature {@code public MyCustomService(SparkConf sparkConf)} to be
* instantiated by this builder.
*/
public class FlintMetadataLogServiceBuilder {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should FlintMetadataLogServiceBuilder moved to common as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no this needs access to FlintOpenSearchMetadataLogService

seankao-az added a commit to seankao-az/opensearch-spark that referenced this pull request Aug 9, 2024
…t#389)

* reflection to build metadata log service

Signed-off-by: Sean Kao <[email protected]>

* move common interface to flint-commons

Signed-off-by: Sean Kao <[email protected]>

* remove unused failLogEntry

Signed-off-by: Sean Kao <[email protected]>

* fix test

Signed-off-by: Sean Kao <[email protected]>

* scalafmtAll

Signed-off-by: Sean Kao <[email protected]>

* change service from interface to abstract class

Signed-off-by: Sean Kao <[email protected]>

* Revert "change service to abstract class"

This reverts commit 95b7a9d.

Signed-off-by: Sean Kao <[email protected]>

* add javadoc for metadata log service constructor

Signed-off-by: Sean Kao <[email protected]>

---------

Signed-off-by: Sean Kao <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.5 maintenance Code refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants