cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject [1/4] cassandra git commit: Make buffered read size configurable
Date Tue, 17 Nov 2015 18:57:00 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.1 fff1b2128 -> 3851d1c58


Make buffered read size configurable

patch by Al Tobey; reviewed by Aleksey Yeschenko for CASSANDRA-10249


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/9b977660
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/9b977660
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/9b977660

Branch: refs/heads/cassandra-3.1
Commit: 9b977660570cfac754d40b84439f1f4cd57b8a9f
Parents: 5414950
Author: Al Tobey <tobert@gmail.com>
Authored: Tue Nov 17 14:14:48 2015 +0000
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Tue Nov 17 18:53:43 2015 +0000

----------------------------------------------------------------------
 CHANGES.txt                                                   | 1 +
 src/java/org/apache/cassandra/io/util/RandomAccessReader.java | 7 ++++---
 2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9b977660/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index eea14c8..08db386 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.12
+ * Make buffered read size configurable (CASSANDRA-10249)
  * Forbid compact clustering column type changes in ALTER TABLE (CASSANDRA-8879)
  * Reject incremental repair with subrange repair (CASSANDRA-10422)
  * Add a nodetool command to refresh size_estimates (CASSANDRA-9579)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9b977660/src/java/org/apache/cassandra/io/util/RandomAccessReader.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/util/RandomAccessReader.java b/src/java/org/apache/cassandra/io/util/RandomAccessReader.java
index 95877a2..d15fe46 100644
--- a/src/java/org/apache/cassandra/io/util/RandomAccessReader.java
+++ b/src/java/org/apache/cassandra/io/util/RandomAccessReader.java
@@ -31,6 +31,7 @@ public class RandomAccessReader extends RandomAccessFile implements FileDataInpu
 
     // default buffer size, 64Kb
     public static final int DEFAULT_BUFFER_SIZE = 65536;
+    public static final int BUFFER_SIZE = Integer.getInteger("cassandra.rar_buffer_size",
DEFAULT_BUFFER_SIZE);
 
     // absolute filesystem path to the file
     private final String filePath;
@@ -94,7 +95,7 @@ public class RandomAccessReader extends RandomAccessFile implements FileDataInpu
 
     public static RandomAccessReader open(File file, long overrideSize, PoolingSegmentedFile
owner)
     {
-        return open(file, DEFAULT_BUFFER_SIZE, overrideSize, owner);
+        return open(file, BUFFER_SIZE, overrideSize, owner);
     }
 
     public static RandomAccessReader open(File file)
@@ -104,7 +105,7 @@ public class RandomAccessReader extends RandomAccessFile implements FileDataInpu
 
     public static RandomAccessReader open(File file, long overrideSize)
     {
-        return open(file, DEFAULT_BUFFER_SIZE, overrideSize, null);
+        return open(file, BUFFER_SIZE, overrideSize, null);
     }
 
     @VisibleForTesting
@@ -128,7 +129,7 @@ public class RandomAccessReader extends RandomAccessFile implements FileDataInpu
     @VisibleForTesting
     static RandomAccessReader open(SequentialWriter writer)
     {
-        return open(new File(writer.getPath()), DEFAULT_BUFFER_SIZE, null);
+        return open(new File(writer.getPath()), BUFFER_SIZE, null);
     }
 
     /**


Mime
View raw message