cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject git commit: Make sure we catch all exception during bin protocol snappy initialization
Date Tue, 12 Feb 2013 13:00:07 GMT
Updated Branches:
  refs/heads/cassandra-1.2 ce8b379c2 -> 4b1fca7dc


Make sure we catch all exception during bin protocol snappy initialization


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

Branch: refs/heads/cassandra-1.2
Commit: 4b1fca7dcbc91c7429b5502614ef0b66c32a2116
Parents: ce8b379
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Tue Feb 12 13:59:41 2013 +0100
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Tue Feb 12 13:59:56 2013 +0100

----------------------------------------------------------------------
 .../cassandra/transport/FrameCompressor.java       |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/4b1fca7d/src/java/org/apache/cassandra/transport/FrameCompressor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/transport/FrameCompressor.java b/src/java/org/apache/cassandra/transport/FrameCompressor.java
index a22766f..3f96948 100644
--- a/src/java/org/apache/cassandra/transport/FrameCompressor.java
+++ b/src/java/org/apache/cassandra/transport/FrameCompressor.java
@@ -21,6 +21,7 @@ import java.io.IOException;
 
 import org.jboss.netty.buffer.ChannelBuffers;
 import org.xerial.snappy.Snappy;
+import org.xerial.snappy.SnappyError;
 
 public interface FrameCompressor
 {
@@ -41,10 +42,22 @@ public interface FrameCompressor
             {
                 i = new SnappyCompressor();
             }
+            catch (Exception e)
+            {
+                i = null;
+            }
             catch (NoClassDefFoundError e)
             {
                 i = null;
             }
+            catch (SnappyError e)
+            {
+                i = null;
+            }
+            catch (UnsatisfiedLinkError e)
+            {
+                i = null;
+            }
             instance = i;
         }
 


Mime
View raw message