[
https://issues.apache.org/jira/browse/HADOOP-9196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13556587#comment-13556587
]
James commented on HADOOP-9196:
-------------------------------
I noticed today that BloomFilter.read() has a similar problem. It allocates
twice the necessary space to read a bit set.
I'm not yet convinced that reading a byte at a time would be too slow. Seems
like passing a buffered DataOutputStream to write() would obviate the I/O
costs. Admittedly, invoking read() once per byte means additional method
dispatches but it seems like the implementation would be I/O bound before ever
becoming CPU bound. Time permitting, I'll run some benchmarks and post the
results.
> Modify BloomFilter.write() to address memory concerns
> -----------------------------------------------------
>
> Key: HADOOP-9196
> URL: https://issues.apache.org/jira/browse/HADOOP-9196
> Project: Hadoop Common
> Issue Type: Improvement
> Reporter: James
> Priority: Minor
>
> It appears that org.apache.hadoop.util.bloom.BloomFilter's write() method
> creates a byte array large enough to fit the entire bit vector into memory
> during serialization. This is unnecessary and may cause out of memory issues
> if the bit vector is sufficiently large and memory is tight.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira