sadanand48 commented on PR #6914:
URL: https://github.com/apache/ozone/pull/6914#issuecomment-2219790297

   The current approach looks good and I'm okay if we go with it, but since we 
use proto for encoding and decoding , we could also leverage protobuf's 
[getDescriptor](https://protobuf.dev/reference/java/api-docs/com/google/protobuf/Descriptors)
 to print the schema . Something like this would print 1 level of schema for 
the message, All we have to do is find the proto object for each valueType. We 
probably would need to define toProtoBuf() method for each message type to 
convert to proto which would be extra work.  Please check if this is easier or 
else the current patch looks good.
   ```java
       OzoneManagerProtocolProtos.KeyInfo keyInfo = 
OzoneManagerProtocolProtos.KeyInfo.newBuilder()
           .getDefaultInstanceForType();
       System.out.println(keyInfo.getDescriptorForType().toProto());
   ```


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