prashantpogde commented on code in PR #3985:
URL: https://github.com/apache/ozone/pull/3985#discussion_r1035223759
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/protocolPB/OzoneManagerProtocolServerSideTranslatorPB.java:
##########
@@ -143,67 +147,67 @@ public OMResponse submitRequest(RpcController controller,
throw new ServiceException(e);
}
- OMResponse response =
- dispatcher.processRequest(validatedRequest, this::processRequest,
- request.getCmdType(), request.getTraceID());
-
+ OMResponse response = dispatcher.processRequest(validatedRequest,
+ this::processRequest,
+ request.getCmdType(),
+ request.getTraceID());
+
return requestValidations.validateResponse(request, response);
}
- private OMResponse processRequest(OMRequest request) throws
- ServiceException {
+ private OMResponse processRequest(OMRequest request) throws ServiceException
{
OMClientRequest omClientRequest = null;
-
boolean s3Auth = false;
+
try {
+ if (request.getCmdType() == CreateSnapshot) {
Review Comment:
Its looks little odd to have a snapshot specific hook here. Either
- you can make it a separate function that does getCmdType based processing
e.g. (add the snapshotId for snapshot create request), or
- you can pass the unique snapshot Id all the way from the client.
--
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]