Skip to main content

Get-ZrPartitionMap

Shows the partition map — ownership and replica layout — as each node of a store sees it. Run it to confirm every node agrees on the topology and to spot map-version divergence when data appears misplaced.

Syntax

Get-ZrPartitionMap
-StoreName <string>
[-NodeId <string>]
[-TimeoutMs <int>]
[-AsJson]
[-Managers <string[]>] [-Port <int>] [-Token <string>] [-TimeoutSec <int>]

Description

Get-ZrPartitionMap collects the partition-map snapshot from every node of the named store through the Management Service and renders, per node, the topology (map) version and each partition's name, segment, primary owner, and replica nodes. Because every node reports its own view, you can compare the MapVer column across nodes to detect a node that is lagging behind on a topology change.

The output is a rendered console table intended for reading interactively; use -AsJson to emit the raw typed result as indented JSON for scripting. The cmdlet requires an active workspace (see New-ZrWorkspace / Use-ZrWorkspace) or an explicit -Managers list.

Parameters

ParameterTypeRequiredDescription
-StoreNamestringYesName of the store whose partition map to collect.
-NodeIdstringNoRestricts collection to a single node id; when omitted every node in the store is queried.
-TimeoutMsintNoPer-node collection timeout in milliseconds; when omitted the server default is used.
-AsJsonswitchNoEmits the raw typed diagnostics result as indented JSON instead of the formatted table.
-Managersstring[]NoManagement Service endpoints to target; when omitted the active workspace's managers are used.
-PortintNoManagement Service port for bare-host managers. Default 7801.
-TokenstringNoAdmin bearer token for authenticated control-plane calls.
-TimeoutSecintNoPer-request timeout in seconds. Default 30.

Examples

Show the partition ownership and replica layout of the orders store as reported by each of its nodes.

Get-ZrPartitionMap -StoreName orders

Collect the map from a single node and emit it as JSON for scripting.

Get-ZrPartitionMap -StoreName orders -NodeId 10.0.0.11-n0 -AsJson

Reading the output

Each row is one partition as seen by the node in the Node column (the id is green on success, red with an (*N) marker on error, with full error text listed under Errors: below the table):

  • MapVer — the topology version the node has applied. All healthy nodes should show the same value; a node with a lower MapVer has not yet caught up to the latest topology change.
  • Partition — the stable partition name (a code word derived from the partition identity). The same name follows a partition's data lineage across snapshots, so you can track one partition over time.
  • Segment — the segment (S<n>) the row belongs to.
  • Primary — the node that owns (is primary for) the partition.
  • Replicas — the nodes holding replicas; - when there are none. Multi-replica partitions span several rows under the same node.