Skip to main content

Clustron Zaris ClientShell

Clustron Zaris ClientShell is the PowerShell module (Clustron.Zaris.ClientShell) for working with a Zaris distributed key-value store from the command line — connecting to a store, reading and writing items, driving counters and leases, watching keys, and running benchmarks — without writing application code.

What ClientShell is

ClientShell is a binary PowerShell module whose cmdlets all share the Zr noun prefix (for example Connect-ZrStore, Get-ZrItem, Grant-ZrLease). The cmdlets talk directly to the Zaris data-plane endpoints exposed by store nodes. It is aimed at administrators, developers, and operators who need to inspect or manipulate a store interactively or from scripts.

Prerequisites: import the module

Import the module before running any cmdlet:

Import-Module Clustron.Zaris.ClientShell

List the cmdlets it provides:

Get-Command -Module Clustron.Zaris.ClientShell

How you connect

Most cmdlets operate against an ambient, session-wide connection that you open once with Connect-ZrStore. After connecting, the item, counter, lease, and watch cmdlets reuse that connection automatically — you do not repeat the store name or endpoints:

Connect-ZrStore -ConnectionString "zaris://10.0.0.11:7861,10.0.0.12:7861/OrdersStore"

Set-ZrItem -Key "order:1001" -Value "confirmed"
Get-ZrItem -Key "order:1001"

Disconnect-ZrStore

Only one store may be connected per session; use -Force on Connect-ZrStore to replace an existing connection. Check the current state with Get-ZrConnection and probe reachability with Test-ZrConnection.

As an alternative to a session connection, the item cmdlets also accept -ConnectionString (a Zaris connection string such as zaris://host:7861/store) — or -StoreName and -Endpoints — directly for a one-shot (independent) connection. Those parameters are ignored while a Connect-ZrStore session is active.

Cmdlets by purpose

Connection and diagnostics

CmdletDescription
Connect-ZrStoreOpens a session-wide connection to a store
Disconnect-ZrStoreCloses the active session connection
Get-ZrConnectionReports the current connection state
Test-ZrConnectionProbes a store for reachability

Items

CmdletDescription
Set-ZrItemWrites or updates a single item
Set-ZrItemsWrites multiple items in one bulk call
Get-ZrItemReads a single item by key
Get-ZrItemsReads multiple items in one bulk call
Remove-ZrItemDeletes a single item
Remove-ZrItemsDeletes multiple items
Test-ZrItemChecks whether a key exists
Get-ZrItemMetadataReturns metadata for a key
Refresh-ZrItemRefreshes an item's expiration
Set-ZrItemExpirationUpdates an item's expiration

Counters

CmdletDescription
Get-ZrCounterReturns a counter value
Increment-ZrCounterAtomically increments a counter
Decrement-ZrCounterAtomically decrements a counter
Set-ZrCounterSets a counter value

Leases

CmdletDescription
Grant-ZrLeaseAcquires a lease
Refresh-ZrLeaseExtends a lease
Revoke-ZrLeaseReleases a lease
Test-ZrLeaseTests lease validity

Watch

CmdletDescription
Watch-ZrKeyWatches changes for a single key
Watch-ZrPrefixWatches changes for keys under a prefix

Store maintenance

CmdletDescription
Clear-ZrStoreRemoves every item from the connected store (destructive; prompts unless -Force)

Tracing

These cmdlets act on the Management Service at -ManagementUrl rather than a Connect-ZrStore session.

CmdletDescription
Enable-ZrTraceTurns on runtime distributed tracing for a store or one instance, with no restart
Disable-ZrTraceTurns off runtime distributed tracing for a store or one instance

Benchmarking

CmdletDescription
Benchmark-ZrStoreRuns a benchmark workload
Stress-ZrStorePerforms sustained load testing
Test-ZrLatencyMeasures request latency
Test-ZrThroughputMeasures cluster throughput