Get-ZrNodeRole
Gets the current cluster role (primary/replica) and partition ownership of Zaris nodes. Use it to inspect how partitions are distributed and which node is primary for each partition.
Syntax
Get-ZrNodeRole
[-NodeId <string>]
[-StoreName <string>]
[-Managers <string[]>] [-Port <int>] [-Token <string>] [-TimeoutSec <int>]
Description
Get-ZrNodeRole reports each node's role and the partitions it owns by reading the role.json file for each node via the Management Service. Query a single node with -NodeId, or scope the results to one store with -StoreName; when both are omitted, every node is returned. Results are gathered from each resolved manager. Requires an active workspace or an explicit -Managers.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
-NodeId | string | No | NodeId to query; returns all nodes when omitted. Position 0. |
-StoreName | string | No | Limit results to a specific store name. |
-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
List the role and partition ownership of every node in the orders store.
Get-ZrNodeRole -StoreName orders
Query the role of a single node.
Get-ZrNodeRole -NodeId orders-n0