diff options
author | Adam Kocoloski <adam@cloudant.com> | 2010-05-27 10:52:51 -0400 |
---|---|---|
committer | Adam Kocoloski <adam@cloudant.com> | 2010-05-27 11:00:49 -0400 |
commit | f399485a90f5d09f6b2df839511756642352031b (patch) | |
tree | 22cde88a85505f1049dcd67b717228cb1932ba49 /src/fabric_info.erl | |
parent | 00276b2582be213adf46c1f2333a65ceb86809e2 (diff) |
replace #part with #shard
Diffstat (limited to 'src/fabric_info.erl')
-rw-r--r-- | src/fabric_info.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fabric_info.erl b/src/fabric_info.erl index 90cd11f0..662c06b6 100644 --- a/src/fabric_info.erl +++ b/src/fabric_info.erl @@ -8,13 +8,13 @@ %% @doc gets all databases in the cluster. -spec all_databases(binary() | []) -> [binary()]. all_databases([]) -> - Dbs = ets:foldl(fun(#part{dbname=DbName}, AccIn) -> + Dbs = ets:foldl(fun(#shard{dbname=DbName}, AccIn) -> new_acc(DbName, AccIn) end, [], partitions), {ok, Dbs}; all_databases(Customer) -> ?debugFmt("~nCustomer: ~p~n", [Customer]), - Dbs = ets:foldl(fun(#part{dbname=DbName}, AccIn) -> + Dbs = ets:foldl(fun(#shard{dbname=DbName}, AccIn) -> DbNameStr = ?b2l(DbName), case string:str(DbNameStr, Customer) of 1 -> @@ -44,7 +44,7 @@ new_acc(DbName, Acc) -> end. send_info_calls(DbName, Parts) -> - lists:map(fun(#part{node=Node, b=Beg} = Part) -> + lists:map(fun(#shard{node=Node, range=[Beg,_]} = Part) -> ShardName = showroom_utils:shard_name(Beg, DbName), Ref = rexi:cast(Node, {rexi_rpc, get_db_info, ShardName}), {Ref, Part} |