5b4ba54a2d
I'm just gonna paste the description Jarrod sent to the group via email: So if getAttribs ever returns more than one result, then getNodeAttribs will have it's output multiplied by that factor. I'll draw out a table with changes Chris started adding while he was also trying to flatten the recursion. Let's say 'n1' is in groups 'g1,g2,g3', and that we request columns 'c1,c2,c3,c4' Let's also assume the primary key is not simply 'node', allowing the node column to contain duplicates (as in switch table). I don't expect anyone to actually construct something this convoluted in practice, but: node |c1 |c2 |c3 |c4 n1 |v1 | | | g2 | |V2+= | | g2 | |v3 |v4 | g3 | |v5 | |v6 g3 | |v7 |v8 |v9 First, we get n1s record: [ { node => 'n1', c1 => 'v1',} ] We see that c2-c4 are still unsatisfiad, then we check g1, see there is no record, so no action takes place, then getAttribs node=>'g2' returns two records. As a result, we clone our results so far and independently populate them: [ { node => 'n1', c1=> 'v1', c2 => 'v2+=' }, { node => 'n1', c1 => 'v1', c2=> 'v3', c3 => 'v4'}, ] Now, in the first record, we are still looking to fill in c3, c4, and we are also still looking at c2 to complete the '+=' operation. In the second record, we only need c4 now, no other columns will be checked for that record. Then we hit g3. We also get two results back (two was easier, but arbitrarily many are possible, btw). Since both records are still looking to be completed, the two become 4 records (if one of the two records were satisfied before this point, the two would have become three instead): [ { node => 'n1', c1=> 'v1', c2 => 'v2v5',c4=>'v6' }, { node => 'n1', c1 => 'v1', c2=> 'v3', c3 => 'v4',c4=>'v6'}, { node => 'n1', c1=> 'v1', c2 => 'v2v7',c3=>v8,c4=>'v9' }, { node => 'n1', c1 => 'v1', c2=> 'v3', c3 => 'v4',c4=>'v9'}, ] And that would be what getNodesAttribs would return in this case. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7131 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd |
||
---|---|---|
.. | ||
debian | ||
xCAT | ||
db2man | ||
LICENSE.html | ||
Makefile.PL | ||
modifyUtils | ||
perl-xCAT.spec | ||
README |
xCAT - eXtreme Cluster Administration Toolkit xCAT is a toolkit for the deployment and administration of clusters. For documentation on getting started with xCAT you can download the following xCAT 2.0 Cookbooks. Linux Cookbook: http://xcat.svn.sourceforge.net/svnroot/xcat/xcat-core/trunk/perl-xCAT-2.0/xCAT2.0.pdf AIX Cookbook: http://xcat.svn.sourceforge.net/svnroot/xcat/xcat-core/trunk/perl-xCAT-2.0/xCAT2onAIX.pdf The Cookbooks are also available on an installed system in the /opt/xcat/share/doc/ directory. xCAT is made available as OSS under the EPL license: http://www.opensource.org/licenses/eclipse-1.0.php