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


##########
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:
   When you say it is not working. Maybe you are not loading the rocksdb libs 
before this. I forgot there was static codeblock loading the rocksdb lib.
   This should work:
   ```
   public static void main(String[] args) throws CodecException {
       ManagedRocksObjectUtils.loadRocksDBLibrary();
       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);
     }
   
   ```
   



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