You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "neils-dev (via GitHub)" <gi...@apache.org> on 2023/02/10 19:05:49 UTC

[GitHub] [ozone] neils-dev commented on a diff in pull request #4186: HDDS-7594. [FSO] Folders created through S3G are created on file system as "files".

neils-dev commented on code in PR #4186:
URL: https://github.com/apache/ozone/pull/4186#discussion_r1103127543


##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/ObjectEndpoint.java:
##########
@@ -196,6 +200,17 @@ public Response put(
 
       // Normal put object
       OzoneBucket bucket = volume.getBucket(bucketName);
+      if (length == 0 &&
+          ozoneConfiguration
+              .getBoolean(OZONE_S3G_FSO_DIRECTORY_CREATION_ENABLED,
+                  OZONE_S3G_FSO_DIRECTORY_CREATION_ENABLED_DEFAULT) &&
+          bucket.getBucketLayout() == BucketLayout.FILE_SYSTEM_OPTIMIZED) {
+        s3GAction = S3GAction.CREATE_DIRECTORY;
+        // create directory
+        getClientProtocol()
+            .createDirectory(volume.getName(), bucketName, keyPath);
+        return Response.ok().status(HttpStatus.SC_OK).build();
+      }

Review Comment:
   Thank @mladjan-gadzic .  Minor change.  This added block above checking the length, FSO layout and handling the fso directory create (L203-213), should be placed after the block below handling the copy header and CopyObject L217-226.  After re-run the CI workflow.



-- 
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: issues-unsubscribe@ozone.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org