incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [1/5] git commit: Allowing for zero sized buffer stores, so that defaults can be overridden and set to zero.
Date Wed, 11 Dec 2013 18:46:19 GMT
Updated Branches:
  refs/heads/apache-blur-0.2 88a9ace97 -> a4169a999


Allowing for zero sized buffer stores, so that defaults can be overridden and set to zero.


Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/1db3d91f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/1db3d91f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/1db3d91f

Branch: refs/heads/apache-blur-0.2
Commit: 1db3d91fdc4043c0e2d504e717100a55f7b4edc7
Parents: 88a9ace
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Tue Dec 10 21:12:40 2013 -0500
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Tue Dec 10 21:12:40 2013 -0500

----------------------------------------------------------------------
 .../src/main/java/org/apache/blur/store/buffer/BufferStore.java   | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1db3d91f/blur-store/src/main/java/org/apache/blur/store/buffer/BufferStore.java
----------------------------------------------------------------------
diff --git a/blur-store/src/main/java/org/apache/blur/store/buffer/BufferStore.java b/blur-store/src/main/java/org/apache/blur/store/buffer/BufferStore.java
index 83f47c2..78e94e5 100644
--- a/blur-store/src/main/java/org/apache/blur/store/buffer/BufferStore.java
+++ b/blur-store/src/main/java/org/apache/blur/store/buffer/BufferStore.java
@@ -72,6 +72,9 @@ public class BufferStore implements Store {
   private final int _bufferSize;
 
   public synchronized static void initNewBuffer(int bufferSize, long totalAmount) {
+    if (totalAmount == 0) {
+      return;
+    }
     BufferStore bufferStore = _bufferStores.get(bufferSize);
     if (bufferStore == null) {
       long count = totalAmount / bufferSize;


Mime
View raw message