-
Notifications
You must be signed in to change notification settings - Fork 113
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
Alias index transform #1049
base: main
Are you sure you want to change the base?
Alias index transform #1049
Conversation
Signed-off-by: n-dohrmann <[email protected]>
Signed-off-by: n-dohrmann <[email protected]>
Signed-off-by: n-dohrmann <[email protected]>
Signed-off-by: n-dohrmann <[email protected]>
Signed-off-by: n-dohrmann <[email protected]>
…anagement into alias_index_transform
Signed-off-by: n-dohrmann <[email protected]>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1049 +/- ##
=============================================
- Coverage 74.81% 62.64% -12.18%
+ Complexity 2810 2339 -471
=============================================
Files 367 367
Lines 16518 16527 +9
Branches 2362 2366 +4
=============================================
- Hits 12358 10353 -2005
- Misses 2857 5020 +2163
+ Partials 1303 1154 -149 ☔ View full report in Codecov by Sentry. |
@@ -63,6 +65,20 @@ class TransformIndexer( | |||
throw TransformIndexException("Failed to create the target index") | |||
} | |||
} | |||
val writeIndexMetadata = clusterService.state().metadata.indicesLookup[targetIndex]!!.writeIndex |
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.
This line should inside the below if block?
if (clusterService.state().metadata.hasAlias(targetIndex)) { | ||
// return error if no write index with the alias | ||
if (writeIndexMetadata == null) { | ||
throw TransformIndexException("Target index alias has no write index") |
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.
target_index [$targetIndex] is an alias but doesn't have write index
val putMappingReq = PutMappingRequest(writeIndexMetadata?.index?.name).source(targetFieldMappings) | ||
val mapResp: AcknowledgedResponse = client.admin().indices().suspendUntil { | ||
putMapping(putMappingReq) | ||
} | ||
if (!mapResp.isAcknowledged) { | ||
logger.error("Target index mapping request failed") | ||
} |
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.
Also move this inside to above if block?
Signed-off-by: n-dohrmann <[email protected]>
Signed-off-by: n-dohrmann <[email protected]>
Signed-off-by: n-dohrmann <[email protected]>
Signed-off-by: n-dohrmann <[email protected]>
Signed-off-by: n-dohrmann <[email protected]>
Signed-off-by: n-dohrmann <[email protected]>
…anagement into alias_index_transform
Signed-off-by: n-dohrmann <[email protected]>
Signed-off-by: n-dohrmann <[email protected]>
Signed-off-by: n-dohrmann <[email protected]>
Signed-off-by: n-dohrmann <[email protected]>
Signed-off-by: n-dohrmann <[email protected]>
Signed-off-by: n-dohrmann <[email protected]>
Signed-off-by: n-dohrmann <[email protected]>
Issue #, if available:
#656
Description of changes:
Adding to
createTargetIndex
method in theTransformIndexer
module - want to support using aliases for variable target indices on transform jobs.CheckList:
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.