-
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
Pre-validate checkpoint location write permission #414
Pre-validate checkpoint location write permission #414
Conversation
Signed-off-by: Chen Dai <[email protected]>
Signed-off-by: Chen Dai <[email protected]>
Signed-off-by: Chen Dai <[email protected]>
import org.apache.spark.sql.execution.streaming.CheckpointFileManager | ||
import org.apache.spark.sql.execution.streaming.CheckpointFileManager.RenameHelperMethods |
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.
nit: can we merge the import?
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 find a way to do this in Scala. Please show me if you know how to do this. Thanks!
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.
Based on the class structure of CheckpointFileManager
, it appears that the only option to avoid another import is to call CheckpointFileManager.RenameHelperMethods
...spark-integration/src/main/scala/org/opensearch/flint/spark/FlintSparkValidationHelper.scala
Show resolved
Hide resolved
Signed-off-by: Chen Dai <[email protected]>
Description
This PR enhances the pre-validation process for checkpoint locations by adding a write permission check. Previously, only read permissions were verified. With this update, a temporary file is created at the specified location to verify write permissions.
The side effect of this change include:
Testing
Tested with an S3 bucket by first revoking the
PutObject
permission:Attempted to create a skipping index with checkpoint location option:
Observed the expected error message:
Granted the
PutObject
permission and create the index successfully. Here is the checkpoint folder looks like:Issues Resolved
#404
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.