-
Notifications
You must be signed in to change notification settings - Fork 587
HDDS-4209. S3A Filesystem does not work with Ozone S3. #1418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
elek
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks to identify problem and to work on this @bharatviswa504
It seems to be a workaround which fixes s3a but I have two comments:
- In general I would prefer to keep the fs/object-store separation. I think it makes the abstraction harder to follow/maintain if we start to use fs related om calls from s3, which supposed to use the object-store endpoints.
For example in case of an fs related change, s3 behavior will be changed.
- In this specific case, intermediate directories will be created even if OZONE_OM_ENABLE_FILESYSTEM_PATHS is not enabled. I created HDDS-4238 to make it more visible:
Without this patch it passes, but with the patch it fails.
- I think it's a safer approach to fix the normalization (in case of OZONE_OM_ENABLE_FILESYSTEM_PATHS enabled), to avoid the removal of
/from the end if the file size is zero.
Good point. Might be we need to have a flag/param in createDirectory to say create intermediate directories or not. In this way, we can use this flag from the client in proto along with the normalization flag(current config in code) to create intermediate directories or not. Example: It Will be set to true only from S3G, and when create directory comes to OM, it uses a normalization flag to create intermediate directories, else just create an entry without any intermediate directories.
My reasoning to take this approach is once HDDS-2939 comes in Ozone Let me know your thoughts on how to proceed? |
Thanks for working on this @bharatviswa504 and reviewing it @elek. My 2 cents. Overall, I am OK with this approach. In my mind, the s3g is a component whose principal responsibility is to support s3 use cases on Ozone as much as possible (hopefully 100%). The s3g belongs to Ozone world, and would be the right place to make changes for anything that needs knowledge of Ozone API internals for supporting s3 related APIs. If we retain the trailing "/" for files that are of "0" byte, we would need to think about how to support the use case of creating a zero byte file, and appending to it. I don't think we should add more configs to solve this problem. I would rather have 95% support of s3 in the short term than add more complexity and "states" OM APIs can be in based on config values. |
Thanks to explain it @bharatviswa504 I re-read the HDDS-2939 spec, and it's not clear how the 100% compatibility (in case Can I create both (cc @rakeshadr, @linyiqun)
This is still a problem. I think it's easier to fix with adjusting normalization to handle this case. HDDS-2939 seems to have bigger problems which should be solved before the merge, until that we can quickly fix this problem. But if you have any other proposed solution for the mentioned problem ( |
|
/pending In this specific case, intermediate directories will be created even if OZONE_OM_ENABLE_FILESYSTEM_PATHS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Marking this issue as un-mergeable as requested.
Please use /ready comment when it's resolved.
Please note that the PR will be closed after 21 days of inactivity from now. (But can be re-opened anytime later...)
In this specific case, intermediate directories will be created even if OZONE_OM_ENABLE_FILESYSTEM_PATHS
|
Closing this for now, as we donot support S3A FileSystem in filesystem path enabled mode. |
* HDDS-1577. Add default pipeline placement policy implementation. (apache#1366) (cherry picked from commit b640a5f6d53830aee4b9c2a7d17bf57c987962cd) * HDDS-1571. Create an interface for pipeline placement policy to support network topologies. (apache#1395) (cherry picked from commit 753fc6703a39154ed6013e44dbae572391748906) * HDDS-2089: Add createPipeline CLI. (apache#1418) (cherry picked from commit 326b5acd4a63fe46821919322867f5daff30750c) * HDDS-1569 Support creating multiple pipelines with same datanode. Contributed by Li Cheng. This closes apache#28 * HDDS-1572 Implement a Pipeline scrubber to clean up non-OPEN pipeline. (apache#237) * Rebase Fix * HDDS-2650 Fix createPipeline CLI. (apache#340) * HDDS-2035 Implement datanode level CLI to reveal pipeline relation. (apache#348) * Revert "HDDS-2650 Fix createPipeline CLI. (apache#340)" This reverts commit 7c71710. * HDDS-2650 Fix createPipeline CLI and make it message based. (apache#370) * HDDS-1574 Average out pipeline allocation on datanodes and add metrcs/test (apache#291) * Resolve rebase conflict. * HDDS-2756. Handle pipeline creation failure in different way when it exceeds pipeline limit Closes apache#401 * HDDS-2115 Add acceptance test for createPipeline CLI and datanode list CLI (apache#375) * HDDS-2115 Add acceptance test for createPipeline CLI and datanode list CLI. * HDDS-2772 Better management for pipeline creation limitation. (apache#410) * HDDS-2913 Update config names and CLI for multi-raft feature. (apache#462) * HDDS-2924. Fix Pipeline#nodeIdsHash collision issue. (apache#478) * HDDS-2923 Add fall-back protection for rack awareness in pipeline creation. (apache#516) * HDDS-3007 Fix CI test failure for TestSCMNodeManager. (apache#550) Co-authored-by: Sammi Chen <[email protected]> Co-authored-by: Xiaoyu Yao <[email protected]>
What changes were proposed in this pull request?
When Key is 0 bytes, and ending with "/" call createDirectory API. In this way below scenario can work from S3A.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-4209
How was this patch tested?
Tested it on a cluster
[root@bvoz-1 ~]# oapi create-bucket --bucket sept11-1
{
"Location": "https://bvoz-1.bvoz.root.hwx.site:9879/sept11-1"
}
[root@bvoz-1 ~]# hdfs dfs -put /etc/hadoop/conf/ozone-site.xml s3a://sept11-1/dir1/dir2/dir3/key1
[root@bvoz-1 ~]# hdfs dfs -ls -R s3a://sept11-1/
log4j:WARN No appenders could be found for logger (org.apache.hadoop.util.Shell).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
drwxrwxrwx - root root 0 2020-09-11 23:28 s3a://sept11-1/dir1
drwxrwxrwx - root root 0 2020-09-11 23:28 s3a://sept11-1/dir1/dir2
drwxrwxrwx - root root 0 2020-09-11 23:28 s3a://sept11-1/dir1/dir2/dir3
-rw-rw-rw- 1 root root 2271 2020-09-11 23:28 s3a://sept11-1/dir1/dir2/dir3/key1