cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xe...@apache.org
Subject git commit: fix for situation when assumtions are read for CF that does not exist (CASSANDRA-4052)
Date Mon, 23 Apr 2012 05:50:13 GMT
Updated Branches:
  refs/heads/cassandra-1.1 3868cf5f2 -> 189e133a5


fix for situation when assumtions are read for CF that does not exist (CASSANDRA-4052)


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

Branch: refs/heads/cassandra-1.1
Commit: 189e133a586a5b4afb1021440def9c02d14d17bb
Parents: 3868cf5
Author: Pavel Yaskevich <xedin@apache.org>
Authored: Sun Apr 22 22:48:24 2012 -0700
Committer: Pavel Yaskevich <xedin@apache.org>
Committed: Sun Apr 22 22:48:24 2012 -0700

----------------------------------------------------------------------
 src/java/org/apache/cassandra/cli/CliClient.java |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/189e133a/src/java/org/apache/cassandra/cli/CliClient.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cli/CliClient.java b/src/java/org/apache/cassandra/cli/CliClient.java
index ded2c2b..8296253 100644
--- a/src/java/org/apache/cassandra/cli/CliClient.java
+++ b/src/java/org/apache/cassandra/cli/CliClient.java
@@ -1535,7 +1535,17 @@ public class CliClient
     
     private boolean applyAssumption(String cfName, String assumptionElement, String defaultType)
     {
-        CfDef columnFamily = getCfDef(cfName);
+        CfDef columnFamily;
+
+        try
+        {
+            columnFamily = getCfDef(cfName);
+        }
+        catch (RuntimeException e)
+        {
+            return false; // just fail if CF does not exist
+        }
+
         // used to store in this.cfKeysComparator
         AbstractType<?> comparator;
         


Mime
View raw message