Community

MarkLogic 10 and Data Hub 5.0

Latest MarkLogic releases provide a smarter, simpler, and more secure way to integrate data.

Read Blog →

Company

Stay On Top Of Everything MarkLogic

Be the first to know! News, product information, and events delivered straight to your inbox.

Sign Me Up →

 
Knowledgebase:
Understanding what work the rebalancer will do
28 September 2016 05:37 AM

Introduction

Here we will describe how to see in detail the effect of running the rebalancer, before it is enabled.

Admin UI

The Admin UI lets you check the state of the rebalancer, along with an estimated completion time if running, on the Database Status page. See Checking the Rebalancer Status.

Previewing the rebalancer

xdmp:forest-counts

For a more detailed look at the rebalancing, including how fragments will move between the forests, call xdmp:forest-counts with the 'preview-rebalancer' option.

For example, to get all the values for the forests in the Documents database, running

 xdmp:database-forests (xdmp:database ('Documents')) ! xdmp:forest-counts (., (), ('preview-rebalancer'))

will return a <forest-counts xmlns="http://marklogic.com/xdmp/status/forest"> element for each forest, including information on how many fragments will be moved and their destinations.

HTML table output

The XQuery code below can be run in the query console to output an HTML table with the rebalancing stats from xdmp:forest-counts. Just change the value of $DATABASE from 'Documents' to the name of the database you wish to check: