swamirishi commented on code in PR #9550:
URL: https://github.com/apache/ozone/pull/9550#discussion_r2649990243


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/RDBBatchOperation.java:
##########
@@ -127,12 +131,21 @@ public int hashCode() {
 
     @Override
     public String toString() {
-      return array != null ? bytes2String(array)
-          : bytes2String(asReadOnlyByteBuffer());
+      return slice.toString();

Review Comment:
   ```
   public static void main(String[] args) throws CodecException {
       String value = "test";
       Bytes bytes = new Bytes(value.getBytes(UTF_8));
       System.out.println("To String Heap Value: " + bytes);
       Bytes dbytes = 
newBytes(CodecBufferCodec.get(true).fromPersistedFormat(value.getBytes(UTF_8)));
       System.out.println("To String Direct Value: " + dbytes);
     }
   ```
   
   ```
   2025-12-28 18:25:34,786 [main] INFO  db.CodecBuffer 
(CodecBuffer.java:set(85)) - Successfully set constructor to 
LeakDetector::newCodecBuffer: 
org.apache.hadoop.hdds.utils.db.CodecBuffer$$Lambda$4/1694556038@7085bdee
   To String Heap Value: test
   To String Direct Value: test
   ```



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