Hi , there

If I add some log information printing the valid child cuboid in the 
generateChildren method, then rerun the CuboidSchedulerTest and 
I can see the following info:
          Spanning for 8D Cuboids 
======valid cuboid: 447
======valid cuboid: 503
======valid cuboid: 383
Spanning result for 511(111111111): 
[504(111111000),447(110111111),383(101111111),503(111110111)]

Quite strange is that 504 maybe an invalid cuboid, however, it is still 
actioned as a valid child cuboid. How could that be ? 

I can see that the 447, 383 and 503 is valid. 

Best,
Sun.



[email protected]
 
From: [email protected]
Date: 2015-04-16 16:09
To: dev
Subject: Re: Re: CuboidScheduler method of findSmallerSiblings
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]
>

Reply via email to