-
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
Store error message for streaming job execution in Flint metadata log #433
Store error message for streaming job execution in Flint metadata log #433
Conversation
Signed-off-by: Chen Dai <[email protected]>
Signed-off-by: Chen Dai <[email protected]>
Signed-off-by: Chen Dai <[email protected]>
flint-core/src/main/java/org/opensearch/flint/core/logging/ExceptionMessages.java
Show resolved
Hide resolved
return String.format("%s: serviceName=[%s], statusCode=[%d]", | ||
S3ErrorPrefix, e.getServiceName(), e.getStatusCode()); |
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 curious, is it possible to extend https://github.com/opensearch-project/opensearch-spark/blob/main/flint-core/src/main/java/org/opensearch/flint/core/logging/OperationMessage.java to support redaction?
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.
Will have a look.
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.
I don't see this is relevant directly and it seems binding to Log4j API. May reconsider when we refactor the entire extractRootCause
and processQueryException
after #435. Thanks!
Description
This PR enhances the Flint Spark Index monitor by storing the error messages in the Flint index metadata log. Previously, error messages were not captured in the metadata log, which made it difficult to diagnose issues when they occurred. Specifically, this PR converts the
ErrorMessages
utility class to Java code and introduces a new method to extract, redact, and truncate error messages.TODO
FlintSparkIndexMonitor
is moved out of Flint core, or the logic below is moved to core):opensearch-spark/spark-sql-application/src/main/scala/org/apache/spark/sql/FlintJobExecutor.scala
Line 454 in f7aaa41
StreamingQueryListener
provides exceptions, which can help remove this limitation.Example
Create a Flint index:
Change index setting to block write for the index:
Check error message in metadata log (empty before the changes)
Issues Resolved
#405
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.