Skip to content

Instantly share code, notes, and snippets.

View lbradstreet's full-sized avatar

Lucas Bradstreet lbradstreet

View GitHub Profile
@lbradstreet
lbradstreet / dynamicjobs
Created January 13, 2016 10:30
building dynamic tasks/workflows for users
I've tried various things to keep my tasks as flexible as possible,
but there's always going to be a lot of configuration by the user to
setup their tasks/workflows unless they are re-running something or
using something written by another user. Anyway, mostly I use the past
the key(s) approach while proxying to a more plain clojure function
that can be used elsewhere. I messed around a bit with prismatic
schema as well to try to recognize signatures in certain maps with
different keys but similar structures. It works but I think precision
is more important than convenience when dealing with lots of different
inputs, thus trying to avoid any kind of auto-magic stuff that can
{:accepted-empty? true,
:valid? false,
:all-written-read? false,
:added
#{0 10859 13590 6398 11110 2721 13417 11207 12261 11839 15198 6874
5937 13937 13780 12214 8419 14884 893 13670 12184 15251 6166 2558
15114 14488 920 7223 10779 11421 3359 558 14178 5653 5415 6032 13938
7398 8276 453 3616 11675 13259 10917 10110 10781 10564 2671 584 7309
7630 14284 3844 11594 14328 11497 11952 3173 8940 487 14827 11758
10558 1858 13449 14473 7978 12517 2030 6802 1493 7740 10737 10724
Hi guys
I have an issue on onyx deployment, getting this zookeeper error from zookeeper client ̀java.io.IOException: Packet len4197460 is out of range!also when i try and delete the onyx znodermr /onyx/<onyd-id>`
using onyx 8.2
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /onyx/cdiscount-pink/log
at org.apache.zookeeper.KeeperException.create(KeeperException.java:99)
at org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
at org.apache.zookeeper.ZooKeeper.getChildren(ZooKeeper.java:1472)
at org.apache.zookeeper.ZooKeeper.getChildren(ZooKeeper.java:1500)
at org.apache.zookeeper.ZKUtil.listSubTreeBFS(ZKUtil.java:114)
at org.apache.zookeeper.ZKUtil.deleteRecursive(ZKUtil.java:49)
+
+(comment
+ (spit "st.md" (with-out-str
+ (gen-markdown (:model (:state-aggregation model))
+ [[:optional? "Optional?"]
+ [:doc "Doc"]]
+ 160)))
+
+(spit "rocksdb.md" (with-out-str
+ (gen-markdown (into {}
:repositories {"my.datomic.com" {:url "https://my.datomic.com/repo"
:username "yourusername"
:password "yourkey"}}
(def
^{:arglists '([map key val] [map key1 val1 key2 val2] [map key val & kvs])
:doc "assoc[iate]. When applied to a map, returns a new map of the
same (hashed/sorted) type, that contains the mapping of key(s) to
val(s). When applied to a vector, returns a new vector that
contains val at index. Note - index must be <= (count vector)."
:added "1.0"
:static true}
assoc
(fn ^:static assoc
####
vagrant@vagrant-ubuntu-trusty:~$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
561f8609e183 alpine:3.2 "echo 'InfluxDB data " 22 minutes ago Restarting (0) 9 minutes ago influx_data
####
± % ansible-playbook --private-key=~/.vagrant.d/insecure_private_key -e remote_user=vagrant -i inventory/vagrant.cfg tasks/boot.yml !8510
PLAY ***************************************************************************
user=> (let [ch (chan 5)
#_=> _ (>!! ch :a)
#_=> _ (>!! ch :b)
#_=> tm (timeout 3000)]
#_=> (println (System/currentTimeMillis))
#_=> (println (alts!! [ch tm]))
#_=> (println (alts!! [ch tm]))
#_=> (println (alts!! [ch tm]))
#_=> (println (System/currentTimeMillis)))
1437408244803
2015-May-26 09:54:28 +0000 localhost WARN [onyx.log.commands.submit-job] - ^[[37mclojure.main.main^[[m ^[[32m main.java: 37^[[m
^[[37m...^[[m ^[[32m ^[[m
^[[33mclojure.main/^[[1;33mmain^[[m ^[[32m main.clj: 420^[[m
^[[33mclojure.main/^[[1;33mnull-opt^[[m ^[[32m main.clj: 342^[[m
^[[33mclojure.main/^[[1;33minitialize^[[m ^[[32m main.clj: 307^[[m
^[[33mclojure.main/^[[1;33minit-opt^[[m ^[[32m main.clj: 279^[[m
^[[33mclojure.main/^[[1;33mload-script^[[m ^[[32m main.clj: 274^[[m
;;;;
;; Current design
;;
(defn inject-in-ch [event lifecycle]
{:core.async/chan in-chan})
(defn inject-out-ch [event lifecycle]
{:core.async/chan out-chan})