runzhiwang opened a new pull request #1053: URL: https://github.com/apache/hadoop-ozone/pull/1053
## What changes were proposed in this pull request? **What's the problem ?** Serialization between UUID and String: UUID.toString (I have improved this) and UUID.fromString, not only cost cpu, because encode and decode String and UUID.fromString both cost cpu, but also make the proto bigger, because uuid is just a number which is 16Byte, covet it to string will need 32Byte. **How to fix ?** Actually, JDK implement UUID with two long number: `mostSigBits` and `leastSigBits`. When `UUID.fromString`, JDK get `mostSigBits` and `leastSigBits` from String, and new a object of UUID. So we can convert UUID to 2 long number in proto, which make serialization and de serialization UUID more faster, and make proto smaller.   ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-3763 ## How was this patch tested? Existed tests. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
