HADOOP-11323. WritableComparator#compare keeps reference to byte array. Contributed by Wilfred Spiegelenburg.

(cherry picked from commit eb4045e765)
This commit is contained in:
Andrew Wang 2014-11-20 11:05:42 -08:00
parent 4b99bde929
commit 85bdc3a013
2 changed files with 4 additions and 0 deletions

View File

@ -36,6 +36,9 @@ Release 2.7.0 - UNRELEASED
OPTIMIZATIONS
HADOOP-11323. WritableComparator#compare keeps reference to byte array.
(Wilfred Spiegelenburg via wang)
BUG FIXES
HADOOP-11236. NFS: Fix javadoc warning in RpcProgram.java (Abhiraj Butala via harsh)

View File

@ -160,6 +160,7 @@ public class WritableComparator implements RawComparator, Configurable {
buffer.reset(b2, s2, l2); // parse key2
key2.readFields(buffer);
buffer.reset(null, 0, 0); // clean up reference
} catch (IOException e) {
throw new RuntimeException(e);
}