shameersss1 commented on code in PR #6468:
URL: https://github.com/apache/hadoop/pull/6468#discussion_r1485740055


##########
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java:
##########
@@ -3906,6 +3908,21 @@ public void access(final Path f, final FsAction mode)
   @Retries.RetryTranslated
   public FileStatus getFileStatus(final Path f) throws IOException {
     Path path = qualify(f);
+    if (isTrackMagicCommitsInMemoryEnabled(getConf()) && 
isMagicCommitPath(path)) {
+      // Some downstream apps might call getFileStatus for a magic path to get 
the file size.
+      // when commit data is stored in memory construct the dummy 
S3AFileStatus with correct
+      // file size fetched from the memory.
+      if 
(InMemoryMagicCommitTracker.getTaskAttemptIdToBytesWritten().containsKey(path)) 
{
+        long len = 
InMemoryMagicCommitTracker.getTaskAttemptIdToBytesWritten().get(path);
+        return new S3AFileStatus(len,

Review Comment:
   ack



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to