mehakmeet commented on pull request #2706:
URL: https://github.com/apache/hadoop/pull/2706#issuecomment-783802582


   How, exactly do we get the content length without doing a head call? isn’t 
content length in the metadata as well?
   Also on that note, I figured something in the aws-sdk while doing a put 
request we have this in S3CryptoModuleBase.java:
   ```
   // Record the original, unencrypted content-length so it can be accessed
           // later
           final long plaintextLength = plaintextLength(request, metadata);
           if (plaintextLength >= 0) {
               metadata.addUserMetadata(Headers.UNENCRYPTED_CONTENT_LENGTH,
                                        Long.toString(plaintextLength));
               // Put the ciphertext length in the metadata
               metadata.setContentLength(ciphertextLength(plaintextLength));
           }
           request.setMetadata(metadata);
   ```
   Every put request in AmazonS3EncryptionClientV2, is wrapped like this. but 
it seems this isn’t the issue, in LIST ops, we don’t use these, right? so, how 
do we get file length in LIST calls?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
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