mehakmeet commented on a change in pull request #2706: URL: https://github.com/apache/hadoop/pull/2706#discussion_r665556483
########## File path: hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java ########## @@ -3655,7 +3676,14 @@ S3AFileStatus s3GetFileStatus(final Path path, // look for the simple file ObjectMetadata meta = getObjectMetadata(key); LOG.debug("Found exact file: normal file {}", key); - return new S3AFileStatus(meta.getContentLength(), + long contentLength = meta.getContentLength(); + // check if CSE is enabled, then strip padded length. + if (isCSEEnabled + && meta.getUserMetaDataOf(Headers.CRYPTO_CEK_ALGORITHM) != null + && contentLength >= CSE_PADDING_LENGTH) { Review comment: The header isn't present for multipart uploads, so to be consistent, thought we should just subtract the value instead. -- 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. To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org 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