szetszwo commented on code in PR #8503:
URL: https://github.com/apache/ozone/pull/8503#discussion_r2106238919


##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/SnapshotDiffJob.java:
##########
@@ -316,12 +316,17 @@ public Class<SnapshotDiffJob> getTypeClass() {
 
     @Override
     public byte[] toPersistedFormatImpl(SnapshotDiffJob object) throws 
IOException {
-      return MAPPER.writeValueAsBytes(object);
+      return object.toProtoBuf().toByteArray();

Review Comment:
   @yuxian0908 , thanks for working on this!
   
   We should add a test to verify if the old and the new implementations return 
the same bytes; see `TestPipelineIDCodec` and `OldPipelineIDCodecForTesting` as 
example.



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