brianfrankcooper/YCSB — pull request #192 by fomy (2014-10-26 02:06:52+00:00)
Title: Adding supports for variable-sized keys, additionally a Generalized Extreme Value Distribution generator

As reported in a paper (Workload Analysis of a Large-Scale Key-Value Store) at SIGMETRIC'2012, the key size is Generalized Extreme Value distribution in Facebook.
I hence implemented a new IntegerGenerator for Generalized Extreme Value distribution (see com.yahoo.ycsb.generator.ExtremeValueGenerator).
The comparisons of the theoretical distribution and the generated distribution are shown in the attached files.
![extreme_cdf](https://cloud.githubusercontent.com/assets/3140231/4781631/20f3346c-5cb3-11e4-975d-1eeaec53f33f.png)
![extreme_density](https://cloud.githubusercontent.com/assets/3140231/4781632/2143447a-5cb3-11e4-8ce3-4f94072180cb.png)

To support variable-sized keys, I added a persistent array of key lengths.
The array records the lengths of all keys, one byte for each key.
The length of the first key (namely "1") is in the first slot, second in the second slot, and so on.
The array would be initialized in Load phase, and persisted into a file named "keylengths.array".
In Run phase, the file is read back to re-construct the array.
It will grow up if there are insert transactions.
In each operation, buildVariableKeyName() is called to construct the key according to the key length and the key number.

Additionally, since the keylengths.array file records the size of the current key space, we can execute several Run phases after a single Load phase without the need of manually updating the 'recordcount' in the workload file.

Best regards
Min Fu