                          :bookkeeper/deserializer-fn :onyx.compression.nippy/zookeeper-decompress
                          :bookkeeper/password-bytes password 
                          :bookkeeper/no-recovery? true
-                         :onyx/restart-pred-fn :onyx-peers.functions.functions/restartable?
                          :onyx/max-peers 1
                          :onyx/batch-size batch-size
                          :onyx/doc "Reads a sequence from a BookKeeper ledger"})

(ns onyx-jepsen.simple-job
  (:require [taoensso.timbre :refer [info error debug fatal]]))


(defn add-read-ledgers [job batch-size zk-addr ledgers-root-path password ledger-ids]
  (let [read-ledger-task-names (mapv (fn [id]

                      ledger-ids))
        (update :lifecycles 
                into 
                (mapcat (fn [task]
                          [{:lifecycle/task task
                            :lifecycle/calls ::restart-calls}
                           {:lifecycle/task task
                            :lifecycle/calls :onyx.plugin.bookkeeper/read-ledgers-calls}])
                        read-ledger-task-names)))))

(defn build-job [job-num {:keys [batch-size] :as params} zk-addr ledgers-root-path ledger-ids]
  (let [password (.getBytes "INSECUREDEFAULTPASSWORD")
