Created
July 31, 2013 20:35
-
-
Save bsparrow435/6125903 to your computer and use it in GitHub Desktop.
Revisions
-
bsparrow435 created this gist
Jul 31, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ Bucket = <<"d">>, Key = <<"e0c97a4cde6c">>, BKey = {Bucket,Key}, {ok, Ring} = riak_core_ring_manager:get_my_ring(), DocIdx = riak_core_util:chash_key(BKey), BucketProps = riak_core_bucket:get_bucket(Bucket, Ring), [NValue] = [Y || {X1, Y} <- BucketProps, n_val == X1], UpNodes = riak_core_node_watcher:nodes(riak_kv), Preflist2 = riak_core_apl:get_apl_ann(DocIdx, NValue, Ring, UpNodes), Preflist = [{IndexNode, Type} || {IndexNode, Type} <- Preflist2].