diff options
author | Brad Anderson <brad@cloudant.com> | 2010-05-07 11:18:25 -0400 |
---|---|---|
committer | Brad Anderson <brad@cloudant.com> | 2010-05-09 22:56:25 -0400 |
commit | 7896702038b9b5c9adb3951a8196b198046783a2 (patch) | |
tree | 0092ca31958be9e52d3ff819cc0aa1eb50d57abb /src | |
parent | b8c3322645395de3775ad8b302133a8d80a39fef (diff) |
disable some partition calls, and results from http admin layer
Diffstat (limited to 'src')
-rw-r--r-- | src/mem3.erl | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/src/mem3.erl b/src/mem3.erl index b932ca9b..b0105286 100644 --- a/src/mem3.erl +++ b/src/mem3.erl @@ -20,10 +20,10 @@ %% API -export([start_link/0, start_link/1, stop/0, stop/1, reset/0]). --export([join/3, clock/0, state/0, start_gossip/0]). --export([partitions/0, fullmap/0]). --export([nodes/0, nodes_for_part/1, nodes_for_part/2, all_nodes_parts/1]). --export([parts_for_node/1]). +-export([join/3, clock/0, state/0, nodes/0, start_gossip/0]). +%-export([partitions/0, fullmap/0]). +%-export([nodes/0, nodes_for_part/1, nodes_for_part/2, all_nodes_parts/1]). +%-export([parts_for_node/1]). %% for testing more than anything else -export([merge_nodes/2, next_up_node/1, next_up_node/3]). @@ -104,16 +104,16 @@ reset() -> gen_server:call(?SERVER, reset). -%% @doc retrieve the primary partition map. This is a list of partitions and -%% their corresponding primary node, no replication partner nodes. -partitions() -> - mochiglobal:get(pmap). +% %% @doc retrieve the primary partition map. This is a list of partitions and +% %% their corresponding primary node, no replication partner nodes. +% partitions() -> +% mochiglobal:get(pmap). -%% @doc retrieve the full partition map, like above, but including replication -%% partner nodes. List should number 2^Q * N -fullmap() -> - lists:keysort(2, mochiglobal:get(fullmap)). +% %% @doc retrieve the full partition map, like above, but including replication +% %% partner nodes. List should number 2^Q * N +% fullmap() -> +% lists:keysort(2, mochiglobal:get(fullmap)). %% @doc get the list of cluster nodes (according to membership module) @@ -122,36 +122,36 @@ nodes() -> gen_server:call(?SERVER, nodes). -%% @doc get all the responsible nodes for a given partition, including -%% replication partner nodes -nodes_for_part(Part) -> - nodes_for_part(Part, mochiglobal:get(fullmap)). +% %% @doc get all the responsible nodes for a given partition, including +% %% replication partner nodes +% nodes_for_part(Part) -> +% nodes_for_part(Part, mochiglobal:get(fullmap)). -nodes_for_part(Part, NodePartList) -> - Filtered = lists:filter(fun({_N, P}) -> P =:= Part end, NodePartList), - {Nodes, _Parts} = lists:unzip(Filtered), - lists:usort(Nodes). +% nodes_for_part(Part, NodePartList) -> +% Filtered = lists:filter(fun({_N, P}) -> P =:= Part end, NodePartList), +% {Nodes, _Parts} = lists:unzip(Filtered), +% lists:usort(Nodes). -%% @doc return the partitions that reside on a given node -parts_for_node(Node) -> - lists:sort(lists:foldl(fun({N,P}, AccIn) -> - case N of - Node -> [P | AccIn]; - _ -> AccIn - end - end, [], mochiglobal:get(fullmap))). +% %% @doc return the partitions that reside on a given node +% parts_for_node(Node) -> +% lists:sort(lists:foldl(fun({N,P}, AccIn) -> +% case N of +% Node -> [P | AccIn]; +% _ -> AccIn +% end +% end, [], mochiglobal:get(fullmap))). -%% @doc get all the nodes and partitions in the cluster. Depending on the -%% AllPartners param, you get only primary nodes or replication partner -%% nodes, as well. -%% No nodes/parts currently down are returned. -all_nodes_parts(false) -> - mochiglobal:get(pmap); -all_nodes_parts(true) -> - mochiglobal:get(fullmap). +% %% @doc get all the nodes and partitions in the cluster. Depending on the +% %% AllPartners param, you get only primary nodes or replication partner +% %% nodes, as well. +% %% No nodes/parts currently down are returned. +% all_nodes_parts(false) -> +% mochiglobal:get(pmap); +% all_nodes_parts(true) -> +% mochiglobal:get(fullmap). %%==================================================================== |