bharatviswa504 commented on a change in pull request #1196:
URL: https://github.com/apache/hadoop-ozone/pull/1196#discussion_r456675451
##########
File path:
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyCreateRequest.java
##########
@@ -91,6 +99,19 @@ public OMRequest preExecute(OzoneManager ozoneManager)
throws IOException {
if(checkKeyNameEnabled){
OmUtils.validateKeyName(keyArgs.getKeyName());
}
+
+ String keyPath = keyArgs.getKeyName();
+ if (ozoneManager.getEnableFileSystemPaths()) {
+ // If enabled, disallow keys with trailing /. As in fs semantics
+ // directories end with trailing /.
+ keyPath = validateAndNormalizeKey(
+ ozoneManager.getEnableFileSystemPaths(), keyPath);
+ if (keyPath.endsWith("/")) {
+ throw new OMException("Invalid KeyPath: " + keyPath,
+ OMException.ResultCodes.INVALID_KEY_NAME);
Review comment:
Done
##########
File path:
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/file/OMFileCreateRequest.java
##########
@@ -141,7 +141,6 @@ public OMRequest preExecute(OzoneManager ozoneManager)
throws IOException {
ozoneManager.getPreallocateBlocksMax(),
ozoneManager.isGrpcBlockTokenEnabled(),
ozoneManager.getOMNodeId());
-
Review comment:
Removed it
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]