Skip to content

What's the different between CreateFile and CreateKey? #5308

Answered by sadanand48
iceboundx asked this question in FAQ
Discussion options

You must be logged in to vote

I looked into the code and could find a difference, The CreateFileRequest has an extra field 'recursive' . The effect of this is that if recursive is true, the parent directory of the file would be created even if it doesn't exist.

This is not true for createKey as it doesn't have a recursive param that the client can set, parent dirs are created for createKey depending on the value of ozone.om.enable.filesystem.paths . This can be set to either true/false in LEGACY buckets. If true, parent dir is created , else parent dir is not created for createKey. For other bucket types, this config doesn't take any effect (for FSO it's always true and OBS false)

I wrote a simple unit test when ozone…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by sadanand48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
FAQ
Labels
None yet
2 participants