apurtell commented on a change in pull request #3691:
URL: https://github.com/apache/hbase/pull/3691#discussion_r718669225
##########
File path:
hbase-common/src/main/java/org/apache/hadoop/hbase/util/UnsafeAccess.java
##########
@@ -471,4 +471,57 @@ public static byte toByte(ByteBuffer buf, int offset) {
public static byte toByte(Object ref, long offset) {
return theUnsafe.getByte(ref, offset);
}
+
+ /**
+ * Zero fill a byte buffer as efficiently as possible.
+ * @param buf the byte buffer
+ */
+ public static void clear(final ByteBuffer buf) {
Review comment:
This is used in the LZMA codec to optimize reuse of cached arrays that
need to be cleared first.
--
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]