-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add sourceQuery in metadata cache #988
Add sourceQuery in metadata cache #988
Conversation
Signed-off-by: Sean Kao <[email protected]>
"metadataCacheVersion", | ||
FlintMetadataCache.metadataCacheVersion), | ||
Entry("lastRefreshTime", testLastRefreshCompleteTime)) | ||
properties should not contain key("refreshInterval") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change because it's actually what this case is supposed to test. Test for other fields is covered in other cases
Signed-off-by: Sean Kao <[email protected]>
Signed-off-by: Sean Kao <[email protected]>
...ala/org/opensearch/flint/spark/metadatacache/FlintOpenSearchMetadataCacheWriterITSuite.scala
Show resolved
Hide resolved
*/ | ||
private def buildPropertiesMap(metadata: FlintMetadata): util.Map[String, AnyRef] = { | ||
val metadataCacheProperties = FlintMetadataCache(metadata).toMap | ||
private def mergeMapping( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just wonder is it easier to do merge at existingMapping._meta.properties
in place directly?
Signed-off-by: Sean Kao <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
* add sourceQuery in metadata cache Signed-off-by: Sean Kao <[email protected]> * preserve index mapping content when updating cache Signed-off-by: Sean Kao <[email protected]> * syntax and comment Signed-off-by: Sean Kao <[email protected]> * merge index mapping in place Signed-off-by: Sean Kao <[email protected]> --------- Signed-off-by: Sean Kao <[email protected]>
Description
For MV index, add a query string field into metadata cache.
In addition, preserves content in index mapping when updating the cache.
Before:
FlintOpenSearchMetadataCacheWriter
tries to serialize theFlintMetadata
by itself, ignoring what's currently inside index mapping.After: No longer tries to serialize
FlintMetadata
into the json string used for update index mapping. Instead, read the current index mapping, and add the required cache fields into it.Related Issues
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.