Skip to content

Instantly share code, notes, and snippets.

@l1x

l1x/test.clj Secret

Last active December 9, 2015 13:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save l1x/f78b129367a1a6ce80b3 to your computer and use it in GitHub Desktop.
Save l1x/f78b129367a1a6ce80b3 to your computer and use it in GitHub Desktop.
riak-client (connect-riak
(list "127.0.0.1:10017" "127.0.0.1:10027" "127.0.0.1:10037"))
riak-namespace (Namespace. "default" "my_bucket")
riak-location (Location. riak-namespace "key")
riak-value (BinaryValue/create "my_value")
;; loop
riak-object (RiakObject.)
_ (.setValue riak-object riak-value)
store (.build
(.withOption
(.withLocation
(StoreValue$Builder. riak-object) riak-location)
StoreValue$Option/W (Quorum. 3)))
exx (.execute riak-client store)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment