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
| Parameter | Type | Required | Description |
|---|---|---|---|
-StoreName | string | Yes | Name of the store whose partition map to collect. |
-NodeId | string | No | Restricts collection to a single node id; when omitted every node in the store is queried. |
-TimeoutMs | int | No | Per-node collection timeout in milliseconds; when omitted the server default is used. |
-AsJson | switch | No | Emits the raw typed diagnostics result as indented JSON instead of the formatted table. |
-Managers | string[] | No | Management Service endpoints to target; when omitted the active workspace's managers are used. |
-Port | int | No | Management Service port for bare-host managers. Default 7801. |
-Token | string | No | Admin bearer token for authenticated control-plane calls. |
-TimeoutSec | int | No | Per-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 lowerMapVerhas 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.