InfoCommands (sync)¶
- class aerospike_sdk.sync.info.InfoCommands[source]¶
Bases:
InfoCommandsBaseSynchronous high-level info-command helpers.
Constructed by
info()(no args). Calls PNC’sinfo_blocking/info_on_all_nodes_blockingdirectly — no asyncio loop is involved.- namespace_details(namespace)[source]¶
Per-namespace info;
Nonewhen the namespace is unknown.Returns a
NamespaceDetail: a mapping of every reported key, with typed properties for the fields the SDK consults.- Return type:
- sets(namespace=None)[source]¶
Every set with its counters, ordered by namespace then set name.
Omit
namespacefor every set in every namespace, which is what the baresetsinfo command answers.Counters come from the first node reporting each set, so they describe that node’s share rather than a cluster-wide total;
sets_per_node()keeps each node’s own numbers.- Parameters:
namespace (
Optional[str]) – Restrict to one namespace; omit for all of them.- Return type:
- Returns:
One
SetDetailper set.
Example:
for detail in session.info().sets("customers"): print(detail.name, detail.objects, detail.data_used_bytes)
See also
set(): One set by name.sets_per_node(): Per-node counters instead of merged ones.
- secondary_indexes(namespace=None)[source]¶
All secondary indexes (optionally filtered by namespace).
Returns one
Sindexper index. These are mappings, so existing key access keeps working.
- secondary_index_details(namespace, index_name)[source]¶
Details for one secondary index;
Nonewhen missing.Returns the parsed counters, not the raw
{command: body}envelope.- Return type:
- namespace_details_per_node(namespace)[source]¶
Each node’s own view of
namespace, keyed by node name.The cluster-wide
namespace_details()asks one node; config that has not finished propagating shows up only when every node is asked. Nodes that do not host the namespace are omitted.- Parameters:
namespace (
str) – The name of the namespace.- Return type:
- Returns:
One
NamespaceDetailper node.
Example:
per_node = session.info().namespace_details_per_node("customers") modes = {node: d.strong_consistency for node, d in per_node.items()}
- sets_per_node(namespace)[source]¶
Each node’s own set counters for
namespace, keyed by node name.- Parameters:
namespace (
str) – The name of the namespace.- Return type:
- Returns:
One list of
SetDetailper node, ordered by set name.
Example:
for node, details in session.info().sets_per_node("customers").items(): print(node, sum(d.objects for d in details))
See also
sets(): One merged view across the cluster.
- secondary_indexes_per_node(namespace=None)[source]¶
Each node’s own secondary-index list, keyed by node name.
- Parameters:
- Return type:
- Returns:
One list of
Sindexper node.
See also
secondary_indexes(): One deduplicated list for the cluster.
- secondary_index_details_per_node(namespace, index_name)[source]¶
Each node’s own counters for one index, keyed by node name.
Index build progress is per node, so this is what shows whether a rebuild has finished everywhere. Nodes not reporting the index are omitted.
- Parameters:
- Return type:
- Returns:
One
SindexDetailper node.