* We choose not to store the coordinates themselves, since storing the
* Hilbert index is sufficient to recover the coordinate values. So let's
* use a dummy column.
*/
final byte[][] qualifiers = {"NICE".getBytes(Charsets.ISO_8859_1),};
MultiDimensionalSpec spec = new MultiDimensionalSpec(Ints.asList(30, 10, 25));
// Add some data.
Random rnd = new Random(TestUtils.SEED);
int[][] data = generateData(spec, 1 << 16, rnd);
SpaceFillingCurve sfc = new CompactHilbertCurve(spec);
logger.log(Level.INFO, "Populating table with up to {0} rows.", data.length);
populateTable(family, qualifiers, spec, data, sfc, table);
int cacheSize = 1 << 8;
logger.log(Level.INFO, "Building cache of size {0}.", cacheSize);
// The cache is optional.
Map<Pow2LengthBitSetRange, NodeValue<BigIntegerContent>> rolledupMap = createRolledupCache(
table, spec, sfc, cacheSize);
logger.log(Level.INFO, "Constructed cache of actual size {0}.", rolledupMap.size());
for (int trial = 0; trial < 1; ++trial) {
logger.log(Level.INFO, "trial={0}", trial);
int[] maxLengthPerDimension = new int[spec.getBitsPerDimension().size()];
for (boolean useCache : new boolean[] {false, true}) {
int m = useCache ? 256 : 32;
/*
* For testing purposes limit the range size to m values for each
* dimension to speed up query computation. In practice, query volume