incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [4/6] 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:07 GMT
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/b4601579
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/b4601579
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/b4601579

Branch: refs/heads/master
Commit: b46015799cfe0c9f82be94e9f9ae228a9b49cb80
Parents: 2b4d0c3
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Tue Dec 10 21:12:40 2013 -0500
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Wed Dec 11 13:45:56 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/b4601579/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