Errors During Delete or Rename of Files
The MultiObjectDeleteException
error may occur when deleting or renaming
files:
Exception in thread "main" com.amazonaws.services.s3.model.MultiObjectDeleteException: Status Code: 0, AWS Service: null, AWS Request ID: null, AWS Error Code: null, AWS Error Message: One or more objects could not be deleted, S3 Extended Request ID: null at com.amazonaws.services.s3.AmazonS3Client.deleteObjects(AmazonS3Client.java:1745)
This error happens when you are trying to delete multiple objects but one of the objects cannot be deleted. Typically, this is due to the fact that the caller lacks the permission to delete these objects. This error should not occur just because the objects are missing.
To resolve the issue, consult the log to see the specifics of which objects could not be deleted. Determine whether or not you have the permission to do so.
If the operation is failing for reasons other than the caller lacking permissions:
Try setting
fs.s3a.multiobjectdelete.enable
to "false".Consult HADOOP-11572 for up-to-date advice.