pyrakoon.protocol.admin

Arakoon administrative call implementations

class pyrakoon.protocol.admin.OptimizeDB[source]

Bases: pyrakoon.protocol.Message

“optimize_db” message

TAG = 2986278949
ARGS = ()
RETURN_TYPE = <pyrakoon.protocol.Unit object>
DOC = u'\nSend a "optimize_db" command to the server\n\nThis method will trigger optimization of the store on the node this\ncommand is sent to.\n\n:note: This only works on slave nodes\n'
class pyrakoon.protocol.admin.DefragDB[source]

Bases: pyrakoon.protocol.Message

“defrag_db” message

TAG = 2986278950
ARGS = ()
RETURN_TYPE = <pyrakoon.protocol.Unit object>
DOC = u'\nSend a "defrag_db" command to the server\n\nThis method will trigger defragmentation of the store on the node this\ncomamand is sent to.\n\n:note: This only works on slave nodes\n'
class pyrakoon.protocol.admin.DropMaster[source]

Bases: pyrakoon.protocol.Message

“drop_master” message

TAG = 2986278960
ARGS = ()
RETURN_TYPE = <pyrakoon.protocol.Unit object>
DOC = u'\nSend a "drop_master" command to the server\n\nThis method instructs a node to drop its master role, if possible.\nWhen the call returns successfully, the node was no longer master, but\ncould have gained the master role already in-between.\n\n:note: This doesn\'t work in a single-node environment\n'
class pyrakoon.protocol.admin.CollapseTlogs(count)[source]

Bases: pyrakoon.protocol.Message

“collapse_tlogs” message

TAG = 2986278932
ARGS = (('count', <pyrakoon.protocol.SignedInteger object at 0x7f462c744750>),)
RETURN_TYPE = None
DOC = u'\nSend a "collapse_tlogs" command to the server\n\nThis method instructs a node to collapse its *TLOG* collection by\nconstructing a *head* database and removing superfluous *TLOG* files.\n\nThe number of *TLOG* files to keep should be passed as a parameter.\n\n:param count: Number of *TLOG* files to keep\n:type count: :class:`int`\n:return: For every *TLOG*, the time it took to collapse it\n:rtype: `[int]`\n'
count

attrgetter(attr, ...) –> attrgetter object

Return a callable object that fetches the given attribute(s) from its operand. After f = attrgetter(‘name’), the call f(r) returns r.name. After g = attrgetter(‘name’, ‘date’), the call g(r) returns (r.name, r.date). After h = attrgetter(‘name.first’, ‘name.last’), the call h(r) returns (r.name.first, r.name.last).

receive()[source]
class pyrakoon.protocol.admin.FlushStore[source]

Bases: pyrakoon.protocol.Message

“flush_store” message

TAG = 2986278978
ARGS = ()
RETURN_TYPE = <pyrakoon.protocol.Unit object>
DOC = u'\nSend a "flush_store" command to the server\n\nThis method instructs a node to flush its store to disk.\n'