ambry icon indicating copy to clipboard operation
ambry copied to clipboard

POC for S3 API experiments (Not to be checked in)

Open Arun-LinkedIn opened this issue 2 years ago • 3 comments

Arun-LinkedIn avatar Dec 01 '23 21:12 Arun-LinkedIn

Codecov Report

Attention: 554 lines in your changes are missing coverage. Please review.

Comparison is base (6edfb75) 72.63% compared to head (399af24) 39.76%. Report is 23 commits behind head on master.

Files Patch % Lines
...om/github/ambry/frontend/NamedBlobPostHandler.java 0.00% 228 Missing :warning:
...ava/com/github/ambry/frontend/HeadBlobHandler.java 0.00% 46 Missing :warning:
...om/github/ambry/frontend/NamedBlobListHandler.java 0.00% 44 Missing :warning:
...a/com/github/ambry/router/OperationController.java 2.38% 41 Missing :warning:
...com/github/ambry/frontend/NamedBlobPutHandler.java 0.00% 35 Missing :warning:
...hub/ambry/frontend/FrontendRestRequestService.java 0.00% 25 Missing :warning:
...va/com/github/ambry/frontend/ListBucketResult.java 0.00% 25 Missing :warning:
...c/main/java/com/github/ambry/rest/RequestPath.java 0.00% 20 Missing :warning:
.../main/java/com/github/ambry/frontend/Contents.java 0.00% 16 Missing :warning:
.../ambry/frontend/CompleteMultipartUploadResult.java 0.00% 13 Missing :warning:
... and 10 more
Additional details and impacted files
@@              Coverage Diff              @@
##             master    #2664       +/-   ##
=============================================
- Coverage     72.63%   39.76%   -32.88%     
+ Complexity    11537     5956     -5581     
=============================================
  Files           809      819       +10     
  Lines         65545    66408      +863     
  Branches       7997     8086       +89     
=============================================
- Hits          47611    26404    -21207     
- Misses        15334    37683    +22349     
+ Partials       2600     2321      -279     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Dec 01 '23 21:12 codecov-commenter

I'm thinking of adding a enum of AmazonS3_Action https://docs.aws.amazon.com/AmazonS3/latest/API/API_Operations_Amazon_Simple_Storage_Service.html

For example, followings are related to multiple part upload.

  • CreateMultipartUpload
  • UploadPart
  • CompleteMultipartUpload
  • AbortMultipartUpload
  • ListParts
  • ListMultipartUploads

At the early stage like somewhere at preProcessAndRouteRequest We generate the action type. In our handling code, we don't parse or rely on keywords like "upload", "uploadId" etc.

And we also generate the related parameter per each type. For example, class S3CreateMultipleUploadContext. RestRequest has a field called RestRequestContext. We can set the command context to that variable.

JingQianCloud avatar Jan 09 '24 04:01 JingQianCloud

We ever discussed for S3, do we need dedicated handler for it? I'm thinking inherit namedBlob handler and create s3 handler. In S3 handler, we only overwrite the code which we need change.

JingQianCloud avatar Jan 10 '24 03:01 JingQianCloud