Skip to main content

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

ParameterTypeRequiredDescription
-NodeIdstringNoNodeId to query; returns all nodes when omitted. Position 0.
-StoreNamestringNoLimit results to a specific store name.
-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

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