From 38ab39aa61133fc6c3d3fa34757c46133ffc884f Mon Sep 17 00:00:00 2001 From: Todd Lipcon Date: Sun, 26 Dec 2010 20:06:27 +0000 Subject: [PATCH] HADOOP-7078. Improve javadocs for RawComparator interface. Contributed by Harsh J Chouraria. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1052933 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 3 +++ src/java/org/apache/hadoop/io/RawComparator.java | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 4f3d5940f13..710beb400e7 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 11539442c85..a52190db5f4 100644 --- a/src/java/org/apache/hadoop/io/RawComparator.java +++ b/src/java/org/apache/hadoop/io/RawComparator.java @@ -36,6 +36,18 @@ import org.apache.hadoop.io.serializer.DeserializerComparator; @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); }