In o.a.h.io.Text - the clear method currently just resets length to 0,
while not doing anything about the bytes internally.
Curious to know the thoughts behind the decision (to let the internal
bytes to be reused for future appends vs. memory leaks due to not
clearing them ) ? Thanks.
$ svn diff
Index: src/java/org/apache/hadoop/io/Text.java
===================================================================
--- src/java/org/apache/hadoop/io/Text.java (revision 894545)
+++ src/java/org/apache/hadoop/io/Text.java (working copy)
@@ -224,6 +224,7 @@
*/
public void clear() {
length = 0;
+ bytes = EMPTY_BYTES;
}