From a516abbe1956e74721c3d0bb8434b1b9d1cf0d8a Mon Sep 17 00:00:00 2001 From: Ryan Zezeski Date: Wed, 16 Feb 2011 22:28:11 -0500 Subject: [PATCH] ability to configure default block size --- src/luwak_file.erl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/luwak_file.erl b/src/luwak_file.erl index 92805c2..ddb541a 100644 --- a/src/luwak_file.erl +++ b/src/luwak_file.erl @@ -37,7 +37,10 @@ create(Riak, Name, Attributes) when is_binary(Name) -> %% checksum of the most recent write request %% as a property of the filehandle. create(Riak, Name, Properties, Attributes) when is_binary(Name) -> - BlockSize = proplists:get_value(block_size, Properties, ?BLOCK_DEFAULT), + DefaultBlockSize = app_helper:get_env(luwak, + default_block_size, + ?BLOCK_DEFAULT), + BlockSize = proplists:get_value(block_size, Properties, DefaultBlockSize), Order = proplists:get_value(tree_order, Properties, ?ORDER_DEFAULT), Checksumming = proplists:get_value(checksumming, Properties, false), if