hemantk-12 commented on code in PR #6012:
URL: https://github.com/apache/ozone/pull/6012#discussion_r1457749200
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyRequest.java:
##########
@@ -174,12 +177,26 @@ protected KeyArgs
resolveBucketAndCheckOpenKeyAcls(KeyArgs keyArgs,
return resolvedArgs;
}
- protected void validateKeyName(OzoneManager ozoneManager, KeyArgs keyArgs,
- String keyName) throws OMException {
+ protected void validateKeyName(OzoneManager ozoneManager, KeyArgs keyArgs)
+ throws OMException {
final boolean checkKeyNameEnabled = ozoneManager.getConfiguration()
.getBoolean(OMConfigKeys.OZONE_OM_KEYNAME_CHARACTER_CHECK_ENABLED_KEY,
OMConfigKeys.OZONE_OM_KEYNAME_CHARACTER_CHECK_ENABLED_DEFAULT);
if (checkKeyNameEnabled) {
+ String keyName = null;
+ if (this instanceof OMKeyCreateRequest) {
Review Comment:
I'm sorry I've asked for this. I thought it would be simpler to get key name
e.g. `keyArgs.getKeyName()`. But seems like it is not as simple as I thought of
and have to put this instance check.
Can you please revert it back to when you were passing `keyName`?
Again sorry for the confusion. I should have paid more attention.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]