-
Notifications
You must be signed in to change notification settings - Fork 9.2k
HADOOP-17548. ABFS: Toggle Store Mkdirs request overwrite parameter #2729
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
| try { | ||
| op.execute(); | ||
| } catch (AzureBlobFileSystemException ex) { | ||
| String existingResource = |
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.
first check if the httpstatus code is 409 and (!isFile), then retrieve the existingResource header.
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.
done
snvijaya
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.
One minor comment posted.
Recommend to change the Title and description as below:
Title: Toggle Store Mkdirs request overwrite parameter
Description:
In HDFS, mkdirs on an existing directory path is supposed to be a success response. To achieve this, the store backend call attempts mkdirs with overwrite=true. But on the backend, additional set properties operations also gets executed (such as LMT update) which is not a HDFS requirement and leads to unnecessary metadata update traffic.
In this PR, an option to have mkdirs executed with overwrite=false is introduced and is controlled over a config. Default is retained to overwrite=true until a related backend deployment is complete.
This PR also addresses a bug where mkdirs on an existing file path was returning success instead of throwing exception.
New config: fs.azure.enable.mkdir.overwrite [true by default]
|
TEST RESULTS HNS Account Location: East US 2 |
snvijaya
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.
+1
…pache#2729) Contributed by Sumangala Patki. (cherry picked from commit fe633d4)
…pache#2729) Contributed by Sumangala Patki.
… parameter (apache#2729) (apache#2781) Contributed by Sumangala Patki. (cherry picked from commit fe633d4) Change-Id: Ibbd82f3cf2d28fa5438c9b1ee6b0e28217dc18df
In HDFS, mkdirs on an existing directory path is supposed to be a success response. To achieve this, the store backend call attempts mkdirs with overwrite=true. But on the backend, additional set properties operations also gets executed (such as LMT update) which is not a HDFS requirement and leads to unnecessary metadata update traffic.
In this PR, an option to have mkdirs executed with overwrite=false is introduced and is controlled over a config. Default is retained to overwrite=true until a related backend deployment is complete.
This PR also addresses a bug where mkdirs on an existing file path was returning success instead of throwing exception.
New config:
fs.azure.enable.mkdir.overwrite[true by default]