Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.9.0, 0.10.0, 0.11.0, 0.12.0, 0.13.0, 0.14.0
-
None
-
None
Description
I raised this issue on the mailing list:
http://mail-archives.apache.org/mod_mbox/crunch-user/201607.mbox/%3CCANBdsh01qaQRCNdQdtqytP%2BWAhT_NVGHyQAdDS8H%2BPPMfi9bkw%40mail.gmail.com%3E
HFileUtils was changed in such a way that it makes a copy of the KeyValue byte array in the compare() method of the KeyValueComparator. The change was made with the following commit:
The change causes HFileUtils.writeToHFilesForIncrementalLoad to be dramatically slower in at least some cases.
The code changed from using the KeyValue(byte[], int, int) constructor to using KeyValue.create(). KeyValue.create() does a byte array copy. The fix is likely as simple as changing the code back to using the KeyValue constructor.
I will do some testing an attach a PR for the fix.