errose28 commented on code in PR #3411:
URL: https://github.com/apache/ozone/pull/3411#discussion_r879713369


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/TrashOzoneFileSystem.java:
##########
@@ -577,6 +580,7 @@ boolean processKeyPath(List<String> keyPathList) {
       try {
         omRequest = OzoneManagerProtocolProtos.OMRequest.newBuilder()
             .setClientId(CLIENT_ID.toString())
+            .setVersion(ClientVersion.CURRENT_VERSION)

Review Comment:
   Also while looking at this code, I do not think 
`TrashOzoneFileSystem#submitRequest` should be manually invoking `preExecute`. 
The call should go to 
`OzoneManagerProtocolServerSideTranslatorPB#processRequest` which will invoke 
`preExecute`, so it looks like the current implementation is calling 
`preExecute` twice.



##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/TrashOzoneFileSystem.java:
##########
@@ -577,6 +580,7 @@ boolean processKeyPath(List<String> keyPathList) {
       try {
         omRequest = OzoneManagerProtocolProtos.OMRequest.newBuilder()
             .setClientId(CLIENT_ID.toString())
+            .setVersion(ClientVersion.CURRENT_VERSION)

Review Comment:
   Can we refactor this class to use a common request builder method like the 
client side uses in 
`OzoneManagerProtocolClientSideTranslatorPB#createOMRequest`? This way we only 
need to specify common fields like client ID, user info, and client version in 
one place.



-- 
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]

Reply via email to