Created
January 28, 2016 22:54
-
-
Save ableasdale/3bcb218e875efde3c1cc to your computer and use it in GitHub Desktop.
Rebalancer Preview
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| element table { attribute border {1}, | |
| element tr { element th {"Source"}, element th {"Active"}, element th {"Deleted"}, element th {"Rebalancing"}, element th {"Total to be moved"}}, | |
| for $f in xdmp:document-get("/path/to/result.xml")/result/*:forest-counts | |
| return | |
| element tr { element td {$f/*:forest-name/fn:string(.)} , element td {fn:sum ($f//*:active-fragment-count)}, | |
| element td {fn:sum ($f//*:deleted-fragment-count)}, | |
| element td { | |
| fn:string-join( | |
| for $c in $f//*:rebalance-fragment-count[*:fragment-count != 0] return ($c/*:rebalance-destination || ": " || $c/*:fragment-count), " | ")}, | |
| element td {fn:sum($f//*:rebalance-fragment-count[*:fragment-count != 0]/*:fragment-count)}} | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment