neils-dev commented on code in PR #3397:
URL: https://github.com/apache/ozone/pull/3397#discussion_r870801932
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -756,6 +814,26 @@ public boolean isGrpcBlockTokenEnabled() {
return grpcBlockTokenEnabled;
}
+ /**
+ * Return config value of {@link OMConfigKeys#OZONE_OM_MULTITENANCY_ENABLED}.
+ */
+ public boolean isS3MultiTenancyEnabled() {
+ return isS3MultiTenancyEnabled;
+ }
+
+ /**
+ * Throws OMException if S3 multi-tenancy is not enabled.
+ */
+ public void checkS3MultiTenancyEnabled() throws OMException {
+ if (isS3MultiTenancyEnabled) {
+ return;
+ }
+
Review Comment:
The `FEATURE_NOT_ENABLED` OMException should be logged somewhere, perhaps a
LOG.debug?
This exception looks to propagate up and return to the client in the
`OMResponse` with not Success, exception msg and status` FEATURE_NOT_ENABLED`.
The `OzoneManagerProtocolClientSideTranslatorPB` wraps the error in an
`IOException` for the client. In the case of the s3gateway this most likely
results in an ambiguous `500 http response` with `INTERNAL_ERROR`. It would be
great to capture the `FEATURE_NOT_ENABLED` error in a `debug` log.
--
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]