diff --git a/CHANGES.txt b/CHANGES.txt index 4f3d5940f1..710beb400e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -36,6 +36,9 @@ Trunk (unreleased changes) HADOOP-7059. Remove "unused" warning in native code. (Noah Watkins via eli) + HADOOP-7078. Improve javadocs for RawComparator interface. + (Harsh J Chouraria via todd) + OPTIMIZATIONS BUG FIXES diff --git a/src/java/org/apache/hadoop/io/RawComparator.java b/src/java/org/apache/hadoop/io/RawComparator.java index 11539442c8..a52190db5f 100644 --- a/src/java/org/apache/hadoop/io/RawComparator.java +++ b/src/java/org/apache/hadoop/io/RawComparator.java @@ -36,6 +36,18 @@ @InterfaceStability.Stable public interface RawComparator extends Comparator { + /** + * Compare two objects in binary. + * b1[s1:l1] is the first object, and b2[s2:l2] is the second object. + * + * @param b1 The first byte array. + * @param s1 The position index in b1. The object under comparison's starting index. + * @param l1 The length of the object in b1. + * @param b2 The second byte array. + * @param s2 The position index in b2. The object under comparison's starting index. + * @param l2 The length of the object under comparison in b2. + * @return An integer result of the comparison. + */ public int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2); }