cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [3/3] git commit: Set max frame size to 15MB in the cli to avoid OOM. Patch by Tyler Hobbs, reviewed by brandonwilliams for CASSANDRA-4969
Date Fri, 16 Nov 2012 22:37:04 GMT
Set max frame size to 15MB in the cli to avoid OOM.
Patch by Tyler Hobbs, reviewed by brandonwilliams for CASSANDRA-4969


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

Branch: refs/heads/cassandra-1.2
Commit: 8dd1d56b4307302bf0ebd1687df28cb3cdd3f711
Parents: f8b939a
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Fri Nov 16 16:35:29 2012 -0600
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Fri Nov 16 16:35:29 2012 -0600

----------------------------------------------------------------------
 .../cli/transport/FramedTransportFactory.java      |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/8dd1d56b/src/java/org/apache/cassandra/cli/transport/FramedTransportFactory.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cli/transport/FramedTransportFactory.java b/src/java/org/apache/cassandra/cli/transport/FramedTransportFactory.java
index ffe7b00..653d45f 100644
--- a/src/java/org/apache/cassandra/cli/transport/FramedTransportFactory.java
+++ b/src/java/org/apache/cassandra/cli/transport/FramedTransportFactory.java
@@ -23,8 +23,11 @@ import org.apache.thrift.transport.TTransportFactory;
 
 public class FramedTransportFactory extends TTransportFactory
 {
+
+    public static final int DEFAULT_MAX_FRAME_SIZE = 15 * 1024 * 1024; // 15 MiB
+
     public TTransport getTransport(TTransport base)
     {
-        return new TFramedTransport(base);
+        return new TFramedTransport(base, DEFAULT_MAX_FRAME_SIZE);
     }
 }


Mime
View raw message