jbewing commented on code in PR #5347:
URL: https://github.com/apache/hbase/pull/5347#discussion_r1294010245
##########
hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteBufferUtils.java:
##########
@@ -778,6 +778,30 @@ public static int findCommonPrefix(ByteBuffer left, int
leftOffset, int leftLeng
return result;
}
+ /**
+ * Find length of common prefix in two arrays.
+ * @param left ByteBuffer to be compared.
+ * @param leftOffset Offset in left ByteBuffer.
+ * @param leftLength Length of left ByteBuffer.
+ * @param right Array to be compared
+ * @param rightOffset Offset in right Array.
+ * @param rightLength Length of right Array.
+ */
+ public static int findCommonPrefix(ByteBuffer left, int leftOffset, int
leftLength, byte[] right,
+ int rightOffset, int rightLength) {
+ int length = Math.min(leftLength, rightLength);
+ int result = 0;
+
+ while (
Review Comment:
I created this JIRA for the follow-up task:
[HBASE-28025](https://issues.apache.org/jira/browse/HBASE-28025)
--
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]