peterxcli commented on code in PR #9363:
URL: https://github.com/apache/ozone/pull/9363#discussion_r3275569537


##########
hadoop-ozone/interface-client/src/main/proto/OmClientProtocol.proto:
##########
@@ -917,6 +917,35 @@ message SnapshotDiffJobProto {
   optional double keysProcessedPct = 13;
 }
 
+/**
+ * Per request type entities to hold arguments
+ * captured for CompletedRequestInfo
+ */
+message RenameKeyOperationArgs {
+    optional string toKeyName = 1;
+}
+
+message CreateFileOperationArgs {
+    optional bool isRecursive = 1;
+    optional bool isOverwrite = 2;
+}
+
+/**
+ * CompletedRequestInfo table entry
+ */
+message CompletedRequestInfo {
+
+  optional int64 trxLogIndex = 1;
+  optional Type cmdType = 2; // Type of the command
+  optional string volumeName = 3;
+  optional string bucketName = 4;
+  optional string keyName = 5;
+  optional uint64 creationTime = 6;
+
+  optional RenameKeyOperationArgs  renameKeyArgs = 7;
+  optional CreateFileOperationArgs createFileArgs = 8;
+}

Review Comment:
   if change the proto to use onof for operationArgs
   ```suggestion
   message CompletedRequestInfo {
   
     optional int64 trxLogIndex = 1;
     optional Type cmdType = 2; // Type of the command
     optional string volumeName = 3;
     optional string bucketName = 4;
     optional string keyName = 5;
     optional uint64 creationTime = 6;
   
     oneof operationArgs {
       RenameKeyOperationArgs renameKeyArgs = 7;
       CreateFileOperationArgs createFileArgs = 8;
     }
   }
   ```
   then I think large portion of the code in OmCompletedRequestInfo can be 
remove, especially the entire ‎`OperationArgs` class hierarchy can go



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