pyrakoon.client.admin

Administrative client interface

class pyrakoon.client.admin.ClientMixin[source]

Mixin providing client actions for node administration

This can be mixed into any class implementing pyrakoon.client.AbstractClient.

optimize_db()[source]

Send a “optimize_db” command to the server

This method will trigger optimization of the store on the node this command is sent to.

Note:This only works on slave nodes
defrag_db()[source]

Send a “defrag_db” command to the server

This method will trigger defragmentation of the store on the node this comamand is sent to.

Note:This only works on slave nodes
drop_master()[source]

Send a “drop_master” command to the server

This method instructs a node to drop its master role, if possible. When the call returns successfully, the node was no longer master, but could have gained the master role already in-between.

Note:This doesn’t work in a single-node environment
collapse_tlogs(count)[source]

Send a “collapse_tlogs” command to the server

This method instructs a node to collapse its TLOG collection by constructing a head database and removing superfluous TLOG files.

The number of TLOG files to keep should be passed as a parameter.

Parameters:count (int) – Number of TLOG files to keep
Returns:For every TLOG, the time it took to collapse it
Return type:[int]
flush_store()[source]

Send a “flush_store” command to the server

This method instructs a node to flush its store to disk.