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

This commit is contained in:
Andrew Wang 2014-11-20 11:05:42 -08:00
parent acf1e033b0
commit eb4045e765
2 changed files with 4 additions and 0 deletions

View File

@ -394,6 +394,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);
}