Hi , Luke
Found the junit test of *CuboidSchedulerTest* and ran the test sucessfully.
Still no good luck catching the underlying shema.
For example, the testFindSmallerSibling2 got results of :
Spanning for 8D Cuboids
Spanning result for 511(111111111):
[504(111111000),447(110111111),383(101111111),503(111110111)]
9 RowKeyCols SHALL do a 0-8D cube build. But, why the top 511 would generate
thus 4 children ? Had not understand the generateChildren method, which
is listed as below. Can any experts explain this according to the
test_kylin_cube_with_seller_desc ?
private Collection<Long> generateChildren(long cuboid) {
Collection<Long> result = new HashSet<Long>();
// generate zero tail cuboid -- the one with all 1 in the first
// aggregation group and all 0 for the rest bits
generateZeroTailBase(cuboid, result);
RowKeyDesc rowkey = cubeDef.getRowkey();
long cuboidWithoutMandatory = cuboid & ~rowkey.getMandatoryColumnMask();
for (AggrGroupMask mask : rowkey.getAggrGroupMasks()) {
if (belongTo(cuboidWithoutMandatory, mask) == false)
continue;
long[] groupOneBitMasks = mask.groupOneBitMasks;
for (int i = 0; i < groupOneBitMasks.length; i++) {
long oneBit = groupOneBitMasks[i];
if ((cuboid & oneBit) == 0)
continue;
long child = cuboid ^ oneBit;
if (Cuboid.isValid(cubeDef, child)) {
result.add(child);
}
}
if ((cuboidWithoutMandatory & mask.uniqueMask) > 0)
break;
}
return result;
}
[email protected]
From: Luke Han
Date: 2015-04-16 10:09
To: [email protected]
Subject: Re: CuboidScheduler method of findSmallerSiblings
you already got the point by yourself:) we do not have such demo yet, why
not you draft it and contribute back:)
Thanks.
Best Regards!
---------------------
Luke Han
2015-04-16 9:42 GMT+08:00 [email protected] <[email protected]>:
> Hi, all
>
> Digging into the code of kylin cube incremental build, found
> *CuboidScheduler*
>
> One question: what does the mothod of findSmallerSiblings got ? Looks like
> it is doing a BFS research over the spanning tree ?
>
> Is there any real demo for the spanning tree ? A graph sort of ?
>
> Thanks,
> Sun.
>
>
>
> [email protected]
>