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

ASF GitHub Bot commented on HADOOP-19072:
-----------------------------------------

steveloughran commented on code in PR #6543:
URL: https://github.com/apache/hadoop/pull/6543#discussion_r1490982845


##########
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/impl/MkdirOperation.java:
##########
@@ -73,11 +79,13 @@ public MkdirOperation(
       final StoreContext storeContext,
       final Path dir,
       final MkdirCallbacks callbacks,
-      final boolean isMagicPath) {
+      final boolean isMagicPath,

Review Comment:
   actually, these should be the same flag. so rename it performanceCreation 
and in s3aFS set to true if the path is magic or `performanceCreation` is true.
   
   



##########
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/impl/MkdirOperation.java:
##########
@@ -124,7 +132,32 @@ public Boolean execute() throws IOException {
       return true;
     }
 
-    // Walk path to root, ensuring closest ancestor is a directory, not file
+    // if performance creation mode is set, no need to check

Review Comment:
   how about on L116 we only do a HEAD check for the path without /, (maybe 
need new callback), so no LIST probe for a dir via HEAD/LIST
   ```
   S3AFileStatus fileStatus = performanceCreation
       ? probePathStatusOrNull(dir, StatusProbeEnum.Head) 
       ? getPathStatusExpectingDir(dir);
   ```





> S3A: expand optimisations on stores with "fs.s3a.create.performance"
> --------------------------------------------------------------------
>
>                 Key: HADOOP-19072
>                 URL: https://issues.apache.org/jira/browse/HADOOP-19072
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs/s3
>    Affects Versions: 3.4.0
>            Reporter: Steve Loughran
>            Assignee: Viraj Jasani
>            Priority: Major
>              Labels: pull-request-available
>
> on an s3a store with fs.s3a.create.performance set, speed up other operations
> *  mkdir to skip parent directory check: just do a HEAD to see if there's a 
> file at the target location



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

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

Reply via email to