Solutions

MarkLogic Data Hub Service

Fast data integration + improved data governance and security, with no infrastructure to buy or manage.

Learn More

Learn

Stay On Top Of Everything MarkLogic

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

Sign Me Up

Community

Stay On Top Of Everything MarkLogic

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

Sign Me Up

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:

Uses

In database replication with the bucket and legacy policies, the replica-cluster forest order should match the master-cluster forest order, to avoid rebalancing if/when replication is broken. See Database Replication and Rebalancing, replication and forest reordering.

The above technique can be used to check if the replica database will rebalance after replication is broken.

This check can also be used after administrative work on forests to see if there is any resultant rebalancing.

References



Attachments 
 
 rebalance.xquery (3.84 KB)
(0 vote(s))
Helpful
Not helpful

Comments (0)