            bytes (compress chunk)]
        (zk/create conn node :persistent? true :data bytes)))))
 
-(defmethod extensions/force-write-chunk [ZooKeeper :bootstrapped-segment]
-  [{:keys [conn opts prefix] :as log} kw chunk id]
-  (clean-up-broken-connections
-   (fn []
-     (let [node (str (bootstrap-path prefix) "/" id "/segment-" (:id chunk))
+(defmethod extensions/force-write-chunk [ZooKeeper :chunk]
+  [{:keys [conn opts prefix] :as log} kw chunk id]
+  (clean-up-broken-connections
+   (fn []
+     (let [node (str (chunk-path prefix) "/" id "/chunk-" (:id chunk))
            version (:version (zk/exists conn node))
            bytes (compress chunk)]
        (zk/set-data conn node bytes version)))))

      (zk/create conn (flow-path onyx-id) :persistent? true)
      (zk/create conn (task-path onyx-id) :persistent? true)
      (zk/create conn (sentinel-path onyx-id) :persistent? true)
      (zk/create conn (bootstrap-path onyx-id) :persistent? true)
      (zk/create conn (origin-path onyx-id) :persistent? true)
      (zk/create conn (job-scheduler-path onyx-id) :persistent? true)
      (zk/create conn (messaging-path onyx-id) :persistent? true)

           bytes (compress chunk)]
       (zk/create conn node :persistent? true :data bytes)))))

(defmethod extensions/write-chunk [ZooKeeper :chunk]
  [{:keys [conn opts prefix] :as log} kw chunk id]
  (clean-up-broken-connections
   (fn []
     (let [id (java.util.UUID/randomUUID)
           node (str (chunk-path prefix) "/" id "/chunk-" id)
           bytes (compress chunk)]
       (zk/create-all conn node :persistent? true :data bytes)
       id))))

(defmethod extensions/write-chunk [ZooKeeper :chunk-index]
  [{:keys [conn opts prefix] :as log} kw chunk id]
  (clean-up-broken-connections
   (fn []
     (let [node (str (chunk-path prefix) "/" id "/index")
           bytes (compress chunk)]
       (zk/create-all conn node :persistent? true :data bytes)))))

(defmethod extensions/write-chunk [ZooKeeper :job-scheduler]
  [{:keys [conn opts prefix] :as log} kw chunk id]
  (clean-up-broken-connections
