Change a few default configs and comment out the stats gathering for now.

This commit is contained in:
Gregory Burd 2013-10-30 11:50:20 -04:00
parent 75305dae94
commit ac2c5caeff

View file

@ -120,9 +120,6 @@ start(Partition, Config) ->
[{internal_page_max, "128K"}, [{internal_page_max, "128K"},
{leaf_page_max, "16K"}, {leaf_page_max, "16K"},
{lsm_chunk_size, "100MB"}, {lsm_chunk_size, "100MB"},
{lsm_merge_threads, 2},
{prefix_compression, true},
{lsm_bloom_newest, true},
{lsm_bloom_oldest, true} , {lsm_bloom_oldest, true} ,
{lsm_bloom_bit_count, 28}, {lsm_bloom_bit_count, 28},
{lsm_bloom_hash_count, 19}, {lsm_bloom_hash_count, 19},
@ -341,22 +338,23 @@ is_empty(#state{connection=Connection, table=Table}) ->
%% @doc Get the status information for this wterl backend %% @doc Get the status information for this wterl backend
-spec status(state()) -> [{atom(), term()}]. -spec status(state()) -> [{atom(), term()}].
status(#state{connection=Connection, table=Table}) -> status(#state{connection=Connection, table=Table}) ->
case wterl:cursor_open(Connection, "statistics:" ++ Table, [{statistics_fast, true}]) of [].
{ok, Cursor} -> %% case wterl:cursor_open(Connection, "statistics:" ++ Table, [{statistics_fast, true}]) of
TheStats = %% {ok, Cursor} ->
case fetch_status(Cursor) of %% TheStats =
{ok, Stats} -> %% case fetch_status(Cursor) of
Stats; %% {ok, Stats} ->
{error, {eperm, _}} -> % TODO: review/fix this logic %% Stats;
{ok, []}; %% {error, {eperm, _}} -> % TODO: review/fix this logic
_ -> %% {ok, []};
{ok, []} %% _ ->
end, %% {ok, []}
wterl:cursor_close(Cursor), %% end,
TheStats; %% wterl:cursor_close(Cursor),
{error, Reason2} -> %% TheStats;
{error, Reason2} %% {error, Reason2} ->
end. %% {error, Reason2}
%% end.
%% @doc Register an asynchronous callback %% @doc Register an asynchronous callback
-spec callback(reference(), any(), state()) -> {ok, state()}. -spec callback(reference(), any(), state()) -> {ok, state()}.
@ -543,15 +541,15 @@ from_index_key(LKey) ->
%% @private %% @private
%% Return all status from wterl statistics cursor %% Return all status from wterl statistics cursor
fetch_status(Cursor) -> %% fetch_status(Cursor) ->
{ok, fetch_status(Cursor, wterl:cursor_next_value(Cursor), [])}. %% {ok, fetch_status(Cursor, wterl:cursor_next_value(Cursor), [])}.
fetch_status(_Cursor, {error, _}, Acc) -> %% fetch_status(_Cursor, {error, _}, Acc) ->
lists:reverse(Acc); %% lists:reverse(Acc);
fetch_status(_Cursor, not_found, Acc) -> %% fetch_status(_Cursor, not_found, Acc) ->
lists:reverse(Acc); %% lists:reverse(Acc);
fetch_status(Cursor, {ok, Stat}, Acc) -> %% fetch_status(Cursor, {ok, Stat}, Acc) ->
[What,Val|_] = [binary_to_list(B) || B <- binary:split(Stat, [<<0>>], [global])], %% [What,Val|_] = [binary_to_list(B) || B <- binary:split(Stat, [<<0>>], [global])],
fetch_status(Cursor, wterl:cursor_next_value(Cursor), [{What,Val}|Acc]). %% fetch_status(Cursor, wterl:cursor_next_value(Cursor), [{What,Val}|Acc]).
size_cache(RequestedSize) -> size_cache(RequestedSize) ->
Size = Size =