diff options
-rw-r--r-- | include/fabric.hrl | 1 | ||||
-rw-r--r-- | src/fabric.erl | 3 | ||||
-rw-r--r-- | src/fabric_all_databases.erl | 3 | ||||
-rw-r--r-- | src/fabric_db_create.erl | 2 | ||||
-rw-r--r-- | src/fabric_db_delete.erl | 1 | ||||
-rw-r--r-- | src/fabric_db_doc_count.erl | 2 | ||||
-rw-r--r-- | src/fabric_db_info.erl | 1 | ||||
-rw-r--r-- | src/fabric_doc_missing_revs.erl | 1 | ||||
-rw-r--r-- | src/fabric_doc_open.erl | 2 | ||||
-rw-r--r-- | src/fabric_doc_open_revs.erl | 2 | ||||
-rw-r--r-- | src/fabric_doc_update.erl | 2 | ||||
-rw-r--r-- | src/fabric_group_info.erl | 2 | ||||
-rw-r--r-- | src/fabric_rpc.erl | 1 | ||||
-rw-r--r-- | src/fabric_util.erl | 1 | ||||
-rw-r--r-- | src/fabric_view.erl | 2 | ||||
-rw-r--r-- | src/fabric_view_all_docs.erl | 2 | ||||
-rw-r--r-- | src/fabric_view_changes.erl | 2 | ||||
-rw-r--r-- | src/fabric_view_map.erl | 2 | ||||
-rw-r--r-- | src/fabric_view_reduce.erl | 2 |
19 files changed, 32 insertions, 2 deletions
diff --git a/include/fabric.hrl b/include/fabric.hrl index 4347ef82..6ec17b34 100644 --- a/include/fabric.hrl +++ b/include/fabric.hrl @@ -1,5 +1,4 @@ -include_lib("eunit/include/eunit.hrl"). --include_lib("mem3/include/mem3.hrl"). -record(collector, { query_args, diff --git a/src/fabric.erl b/src/fabric.erl index 9545e729..9be9a26b 100644 --- a/src/fabric.erl +++ b/src/fabric.erl @@ -1,5 +1,8 @@ -module(fabric). +-include_lib("mem3/include/mem3.hrl"). +-include_lib("couch/include/couch_db.hrl"). + % DBs -export([all_dbs/0, all_dbs/1, create_db/1, create_db/2, delete_db/1, delete_db/2, get_db_info/1, get_doc_count/1]). diff --git a/src/fabric_all_databases.erl b/src/fabric_all_databases.erl index b93f483c..97685f4e 100644 --- a/src/fabric_all_databases.erl +++ b/src/fabric_all_databases.erl @@ -3,6 +3,7 @@ -export([all_databases/1]). -include("fabric.hrl"). +-include_lib("mem3/include/mem3.hrl"). %% @doc gets all databases in the cluster. -spec all_databases(binary() | []) -> [binary()]. @@ -14,7 +15,7 @@ all_databases([]) -> all_databases(Customer) -> ?debugFmt("~nCustomer: ~p~n", [Customer]), Dbs = ets:foldl(fun(#shard{dbname=DbName}, AccIn) -> - DbNameStr = ?b2l(DbName), + DbNameStr = binary_to_list(DbName), case string:str(DbNameStr, Customer) of 1 -> new_acc(DbNameStr, AccIn); diff --git a/src/fabric_db_create.erl b/src/fabric_db_create.erl index 80bd1eb1..2fca0eed 100644 --- a/src/fabric_db_create.erl +++ b/src/fabric_db_create.erl @@ -2,6 +2,8 @@ -export([go/2]). -include("fabric.hrl"). +-include_lib("mem3/include/mem3.hrl"). +-include_lib("couch/include/couch_db.hrl"). %% @doc Create a new database, and all its partition files across the cluster %% Options is proplist with user_ctx, n, q diff --git a/src/fabric_db_delete.erl b/src/fabric_db_delete.erl index 923b38dc..57eefa9e 100644 --- a/src/fabric_db_delete.erl +++ b/src/fabric_db_delete.erl @@ -2,6 +2,7 @@ -export([go/2]). -include("fabric.hrl"). +-include_lib("mem3/include/mem3.hrl"). go(DbName, Options) -> Shards = mem3:shards(DbName), diff --git a/src/fabric_db_doc_count.erl b/src/fabric_db_doc_count.erl index c587d103..332b923d 100644 --- a/src/fabric_db_doc_count.erl +++ b/src/fabric_db_doc_count.erl @@ -3,6 +3,8 @@ -export([go/1]). -include("fabric.hrl"). +-include_lib("mem3/include/mem3.hrl"). +-include_lib("couch/include/couch_db.hrl"). go(DbName) -> Shards = mem3:shards(DbName), diff --git a/src/fabric_db_info.erl b/src/fabric_db_info.erl index ecb8ce1c..3758c5c3 100644 --- a/src/fabric_db_info.erl +++ b/src/fabric_db_info.erl @@ -3,6 +3,7 @@ -export([go/1]). -include("fabric.hrl"). +-include_lib("mem3/include/mem3.hrl"). go(DbName) -> Shards = mem3:shards(DbName), diff --git a/src/fabric_doc_missing_revs.erl b/src/fabric_doc_missing_revs.erl index 22c11ad6..9a368783 100644 --- a/src/fabric_doc_missing_revs.erl +++ b/src/fabric_doc_missing_revs.erl @@ -3,6 +3,7 @@ -export([go/2]). -include("fabric.hrl"). +-include_lib("mem3/include/mem3.hrl"). go(DbName, AllIdsRevs) -> Workers = lists:map(fun({#shard{name=Name, node=Node} = Shard, IdsRevs}) -> diff --git a/src/fabric_doc_open.erl b/src/fabric_doc_open.erl index 19509295..16493fb6 100644 --- a/src/fabric_doc_open.erl +++ b/src/fabric_doc_open.erl @@ -3,6 +3,8 @@ -export([go/3]). -include("fabric.hrl"). +-include_lib("mem3/include/mem3.hrl"). +-include_lib("couch/include/couch_db.hrl"). go(DbName, Id, Options) -> Workers = fabric_util:submit_jobs(mem3:shards(DbName,Id), open_doc, diff --git a/src/fabric_doc_open_revs.erl b/src/fabric_doc_open_revs.erl index 9d3dae41..61ff466f 100644 --- a/src/fabric_doc_open_revs.erl +++ b/src/fabric_doc_open_revs.erl @@ -3,6 +3,8 @@ -export([go/4]). -include("fabric.hrl"). +-include_lib("mem3/include/mem3.hrl"). +-include_lib("couch/include/couch_db.hrl"). go(DbName, Id, Revs, Options) -> Workers = fabric_util:submit_jobs(mem3:shards(DbName,Id), open_revs, diff --git a/src/fabric_doc_update.erl b/src/fabric_doc_update.erl index 05b6a785..f7a91d48 100644 --- a/src/fabric_doc_update.erl +++ b/src/fabric_doc_update.erl @@ -3,6 +3,8 @@ -export([go/3]). -include("fabric.hrl"). +-include_lib("mem3/include/mem3.hrl"). +-include_lib("couch/include/couch_db.hrl"). go(DbName, AllDocs, Options) -> GroupedDocs = lists:map(fun({#shard{name=Name, node=Node} = Shard, Docs}) -> diff --git a/src/fabric_group_info.erl b/src/fabric_group_info.erl index a1ba92cc..04605a66 100644 --- a/src/fabric_group_info.erl +++ b/src/fabric_group_info.erl @@ -3,6 +3,8 @@ -export([go/2]). -include("fabric.hrl"). +-include_lib("mem3/include/mem3.hrl"). +-include_lib("couch/include/couch_db.hrl"). go(DbName, GroupId) when is_binary(GroupId) -> {ok, DDoc} = fabric:open_doc(DbName, GroupId, []), diff --git a/src/fabric_rpc.erl b/src/fabric_rpc.erl index e2dc88b9..673627da 100644 --- a/src/fabric_rpc.erl +++ b/src/fabric_rpc.erl @@ -6,6 +6,7 @@ -export([create_db/3, delete_db/3, reset_validation_funs/1]). -include("fabric.hrl"). +-include_lib("couch/include/couch_db.hrl"). -record (view_acc, { db, diff --git a/src/fabric_util.erl b/src/fabric_util.erl index 90b0c647..3c27f19e 100644 --- a/src/fabric_util.erl +++ b/src/fabric_util.erl @@ -3,6 +3,7 @@ -export([submit_jobs/3, cleanup/1, recv/4, receive_loop/4, receive_loop/6]). -include("fabric.hrl"). +-include_lib("mem3/include/mem3.hrl"). submit_jobs(Shards, EndPoint, ExtraArgs) -> lists:map(fun(#shard{node=Node, name=ShardName} = Shard) -> diff --git a/src/fabric_view.erl b/src/fabric_view.erl index 09fcd43c..6817a5b0 100644 --- a/src/fabric_view.erl +++ b/src/fabric_view.erl @@ -5,6 +5,8 @@ extract_view/4]). -include("fabric.hrl"). +-include_lib("mem3/include/mem3.hrl"). +-include_lib("couch/include/couch_db.hrl"). %% @doc looks for a fully covered keyrange in the list of counters -spec is_progress_possible([{#shard{}, non_neg_integer()}]) -> boolean(). diff --git a/src/fabric_view_all_docs.erl b/src/fabric_view_all_docs.erl index f1713b86..d51a2831 100644 --- a/src/fabric_view_all_docs.erl +++ b/src/fabric_view_all_docs.erl @@ -4,6 +4,8 @@ -export([open_doc/3]). % exported for spawn -include("fabric.hrl"). +-include_lib("mem3/include/mem3.hrl"). +-include_lib("couch/include/couch_db.hrl"). go(DbName, #view_query_args{keys=nil} = QueryArgs, Callback, Acc0) -> Workers = lists:map(fun(#shard{name=Name, node=Node} = Shard) -> diff --git a/src/fabric_view_changes.erl b/src/fabric_view_changes.erl index 3e8339bd..39755a01 100644 --- a/src/fabric_view_changes.erl +++ b/src/fabric_view_changes.erl @@ -3,6 +3,8 @@ -export([go/5, start_update_notifier/1]). -include("fabric.hrl"). +-include_lib("mem3/include/mem3.hrl"). +-include_lib("couch/include/couch_db.hrl"). go(DbName, Feed, Options, Callback, Acc0) when Feed == "continuous" orelse Feed == "longpoll" -> diff --git a/src/fabric_view_map.erl b/src/fabric_view_map.erl index 6c6dfc96..ce8dd625 100644 --- a/src/fabric_view_map.erl +++ b/src/fabric_view_map.erl @@ -3,6 +3,8 @@ -export([go/6]). -include("fabric.hrl"). +-include_lib("mem3/include/mem3.hrl"). +-include_lib("couch/include/couch_db.hrl"). go(DbName, GroupId, View, Args, Callback, Acc0) when is_binary(GroupId) -> {ok, DDoc} = fabric:open_doc(DbName, <<"_design/", GroupId/binary>>, []), diff --git a/src/fabric_view_reduce.erl b/src/fabric_view_reduce.erl index 4f08b3ed..ddde9f22 100644 --- a/src/fabric_view_reduce.erl +++ b/src/fabric_view_reduce.erl @@ -3,6 +3,8 @@ -export([go/6]). -include("fabric.hrl"). +-include_lib("mem3/include/mem3.hrl"). +-include_lib("couch/include/couch_db.hrl"). go(DbName, GroupId, View, Args, Callback, Acc0) when is_binary(GroupId) -> {ok, DDoc} = fabric:open_doc(DbName, <<"_design/", GroupId/binary>>, []), |