Liking cljdoc? Tell your friends :D

jepsen.nemesis


bisectclj

(bisect coll)

Given a sequence, cuts it in half; smaller half first.

Given a sequence, cuts it in half; smaller half first.
raw docstring

bridgeclj

(bridge nodes)

A grudge which cuts the network in half, but preserves a node in the middle which has uninterrupted bidirectional connectivity to both components.

A grudge which cuts the network in half, but preserves a node in the middle
which has uninterrupted bidirectional connectivity to both components.
raw docstring

clock-scramblerclj

(clock-scrambler dt)

Randomizes the system clock of all nodes within a dt-second window.

Randomizes the system clock of all nodes within a dt-second window.
raw docstring

complete-grudgeclj

(complete-grudge components)

Takes a collection of components (collections of nodes), and computes a grudge such that no node can talk to any nodes outside its partition.

Takes a collection of components (collections of nodes), and computes a
grudge such that no node can talk to any nodes outside its partition.
raw docstring

composeclj

(compose nemeses)

Takes a map of fs to nemeses and returns a single nemesis which, depending on (:f op), routes to the appropriate child nemesis. fs should be a function which takes (:f op) and returns either nil, if that nemesis should not handle that :f, or a new :f, which replaces the op's :f, and the resulting op is passed to the given nemesis. For instance:

(compose {#{:start :stop} (partition-random-halves)
          #{:kill}        (process-killer)})

This routes :kill ops to process killer, and :start/:stop to the partitioner. What if we had two partitioners which both take :start/:stop?

(compose {{:split-start :start
           :split-stop  :stop} (partition-random-halves)
          {:ring-start  :start
           :ring-stop2  :stop} (partition-majorities-ring)})

We turn :split-start into :start, and pass that op to partition-random-halves.

Takes a map of fs to nemeses and returns a single nemesis which, depending
on (:f op), routes to the appropriate child nemesis. `fs` should be a
function which takes (:f op) and returns either nil, if that nemesis should
not handle that :f, or a new :f, which replaces the op's :f, and the
resulting op is passed to the given nemesis. For instance:

    (compose {#{:start :stop} (partition-random-halves)
              #{:kill}        (process-killer)})

This routes `:kill` ops to process killer, and :start/:stop to the
partitioner. What if we had two partitioners which *both* take :start/:stop?

    (compose {{:split-start :start
               :split-stop  :stop} (partition-random-halves)
              {:ring-start  :start
               :ring-stop2  :stop} (partition-majorities-ring)})

We turn :split-start into :start, and pass that op to
partition-random-halves.
raw docstring

hammer-timeclj

(hammer-time process)
(hammer-time targeter process)

Responds to {:f :start} by pausing the given process name on a given node or nodes using SIGSTOP, and when {:f :stop} arrives, resumes it with SIGCONT. Picks the node(s) to pause using (targeter list-of-nodes), which defaults to rand-nth. Targeter may return either a single node or a collection of nodes.

Responds to `{:f :start}` by pausing the given process name on a given node
or nodes using SIGSTOP, and when `{:f :stop}` arrives, resumes it with
SIGCONT.  Picks the node(s) to pause using `(targeter list-of-nodes)`, which
defaults to `rand-nth`. Targeter may return either a single node or a
collection of nodes.
raw docstring

invoke-compat!clj

(invoke-compat! nemesis test op)

Calls jepsen.nemesis/invoke!, if possible, falling back to jepsen.client/invoke!.

Calls `jepsen.nemesis/invoke!`, if possible, falling back to `jepsen.client/invoke!`.
raw docstring

majorities-ringclj

(majorities-ring nodes)

A grudge in which every node can see a majority, but no node sees the same majority as any other.

A grudge in which every node can see a majority, but no node sees the *same*
majority as any other.
raw docstring

Nemesiscljprotocol

invoke!clj

(invoke! this test op)

Apply an operation to the nemesis, which alters the cluster.

Apply an operation to the nemesis, which alters the
cluster.

setup!clj

(setup! this test)

Set up the nemesis to work with the cluster. Returns the nemesis ready to be invoked

Set up the nemesis to work with the cluster. Returns the
nemesis ready to be invoked

teardown!clj

(teardown! this test)

Tear down the nemesis when work is complete

Tear down the nemesis when work is complete

node-start-stopperclj

(node-start-stopper targeter start! stop!)

Takes a targeting function which, given a list of nodes, returns a single node or collection of nodes to affect, and two functions (start! test node) invoked on nemesis start, and (stop! test node) invoked on nemesis stop. Returns a nemesis which responds to :start and :stop by running the start! and stop! fns on each of the given nodes. During start! and stop!, binds the jepsen.control session to the given node, so you can just call (c/exec ...).

The targeter can take either (targeter test nodes) or, if that fails, (targeter nodes).

Re-selects a fresh node (or nodes) for each start--if targeter returns nil, skips the start. The return values from the start and stop fns will become the :values of the returned :info operations from the nemesis, e.g.:

{:value {:n1 [:killed "java"]}}
Takes a targeting function which, given a list of nodes, returns a single
node or collection of nodes to affect, and two functions `(start! test node)`
invoked on nemesis start, and `(stop! test node)` invoked on nemesis stop.
Returns a nemesis which responds to :start and :stop by running the start!
and stop! fns on each of the given nodes. During `start!` and `stop!`, binds
the `jepsen.control` session to the given node, so you can just call `(c/exec
...)`.

The targeter can take either (targeter test nodes) or, if that fails,
(targeter nodes).

Re-selects a fresh node (or nodes) for each start--if targeter returns nil,
skips the start. The return values from the start and stop fns will become
the :values of the returned :info operations from the nemesis, e.g.:

    {:value {:n1 [:killed "java"]}}
raw docstring

noopclj

Does nothing.

Does nothing.
raw docstring

partition-halvesclj

(partition-halves)

Responds to a :start operation by cutting the network into two halves--first nodes together and in the smaller half--and a :stop operation by repairing the network.

Responds to a :start operation by cutting the network into two halves--first
nodes together and in the smaller half--and a :stop operation by repairing
the network.
raw docstring

partition-majorities-ringclj

(partition-majorities-ring)

Every node can see a majority, but no node sees the same majority as any other. Randomly orders nodes into a ring.

Every node can see a majority, but no node sees the *same* majority as any
other. Randomly orders nodes into a ring.
raw docstring

partition-random-halvesclj

(partition-random-halves)

Cuts the network into randomly chosen halves.

Cuts the network into randomly chosen halves.
raw docstring

partition-random-nodeclj

(partition-random-node)

Isolates a single node from the rest of the network.

Isolates a single node from the rest of the network.
raw docstring

partitionerclj

(partitioner)
(partitioner grudge)

Responds to a :start operation by cutting network links as defined by (grudge nodes), and responds to :stop by healing the network. The grudge to apply is either taken from the :value of a :start op, or if that is nil, by calling (grudge (:nodes test))

Responds to a :start operation by cutting network links as defined by
(grudge nodes), and responds to :stop by healing the network. The grudge to
apply is either taken from the :value of a :start op, or if that is nil, by
calling (grudge (:nodes test))
raw docstring

set-time!clj

(set-time! t)

Set the local node time in POSIX seconds.

Set the local node time in POSIX seconds.
raw docstring

setup-compat!clj

(setup-compat! nemesis test node)

Calls jepsen.nemesis/setup!, if possible, falling back to jepsen.client/setup!. Warns users that nemeses implementing jepsen.client have been deprecated.

Calls `jepsen.nemesis/setup!`, if possible, falling back to
`jepsen.client/setup!`. Warns users that nemeses implementing `jepsen.client`
have been deprecated.
raw docstring

split-oneclj

(split-one coll)
(split-one loner coll)

Split one node off from the rest

Split one node off from the rest
raw docstring

teardown-compat!clj

(teardown-compat! nemesis test)

Calls jepsen.nemesis/teardown!, if possible, falling back to jepsen.client/teardown!. Warns users that nemeses implementing jepsen.client have been deprecated.

Calls `jepsen.nemesis/teardown!`, if possible, falling back to
`jepsen.client/teardown!`. Warns users that nemeses implementing
`jepsen.client` have been deprecated.
raw docstring

timeoutclj

(timeout timeout-ms nemesis)

Sometimes nemeses are unreliable. If you wrap them in this nemesis, it'll time out their operations with the given timeout, in milliseconds. Timed out operations have :value :timeout.

Sometimes nemeses are unreliable. If you wrap them in this nemesis, it'll
time out their operations with the given timeout, in milliseconds. Timed out
operations have :value :timeout.
raw docstring

truncate-fileclj

(truncate-file)

A nemesis which responds to

{:f :truncate :value {"some-node" {:file "/path/to/file" :drop 64}}}

where the value is a map of nodes to {:file, :drop} maps, on those nodes, drops the last :drop bytes from the given file.

A nemesis which responds to

{:f         :truncate
 :value     {"some-node" {:file "/path/to/file"
                            :drop 64}}}

where the value is a map of nodes to {:file, :drop} maps, on those nodes,
drops the last :drop bytes from the given file.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close