[ 
https://issues.apache.org/jira/browse/HADOOP-18688?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17714703#comment-17714703
 ] 

Viraj Jasani edited comment on HADOOP-18688 at 4/20/23 6:11 PM:
----------------------------------------------------------------

As far as only audit logs are concerned, it seems we already include num of 
keys in the bulk delete objects request.

e.g.
{code:java}
DEBUG impl.LoggingAuditor (LoggingAuditor.java:beforeExecution(359)) - [47] 
0b1dd2b6-f102-479b-841b-84a6c19fbf3b-00000017 Executing op_delete with 
{object_bulk_delete_request 'test/' size=2, mutating=true}; 
https://audit.example.org/hadoop/1/op_delete/{xyz} {code}
Here, "test/" is the first key and "size=2" represents that the 
bulk_delete_request has 2 keys to delete:
{code:java}
} else if (request instanceof DeleteObjectsRequest) {
  // DeleteObjects: bulk delete
  // use first key as the path
  DeleteObjectsRequest r = (DeleteObjectsRequest) request;
  List<DeleteObjectsRequest.KeyVersion> keys
      = r.getKeys();
  return writing(OBJECT_BULK_DELETE_REQUEST,
      keys.isEmpty() ? null : keys.get(0).getKey(),
      keys.size());
{code}
 

In addition to audit logs, DurationInfo logs also provides detailed info for 
the operation:

e.g. "Starting: DELETE 2 keys", "DELETE 2 keys: duration 0:00.124s", "Deleting 
2 keys: duration 0:00.124s" etc.

 

Or perhaps i misunderstood the purpose of the Jira.


was (Author: vjasani):
As far as only audit logs are concerned, it seems we already include num of 
keys in the bulk delete objects request.

e.g.
{code:java}
DEBUG impl.LoggingAuditor (LoggingAuditor.java:beforeExecution(359)) - [47] 
0b1dd2b6-f102-479b-841b-84a6c19fbf3b-00000017 Executing op_delete with 
{object_bulk_delete_request 'test/' size=2, mutating=true}; 
https://audit.example.org/hadoop/1/op_delete/{xyz} {code}
Here, "test/" is the first key and size represents that the bulk_delete_request 
has 2 keys to delete.

 

In addition to audit logs, DurationInfo logs anyways gives detailed info for 
the operation:

e.g. "Starting: DELETE 2 keys", "DELETE 2 keys: duration 0:00.124s", "Deleting 
2 keys: duration 0:00.124s" etc.

 

Or perhaps i misunderstood the purpose of the Jira.

> s3a audit info to include #of items in a DeleteObjects request
> --------------------------------------------------------------
>
>                 Key: HADOOP-18688
>                 URL: https://issues.apache.org/jira/browse/HADOOP-18688
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs/s3
>    Affects Versions: 3.3.5
>            Reporter: Steve Loughran
>            Priority: Major
>
> it would be good to find out how many files were deleted in a DeleteObjects 
> call



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to