cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [3/3] git commit: cqlsh: ignore missing CfDef opts
Date Wed, 22 Feb 2012 10:32:33 GMT
cqlsh: ignore missing CfDef opts

patch by thepaul; reviewed by slebresne for CASSANDRA-3933

We don't want to try to track every possible CF
option supported by different versions of Cassandra, so if we try
to reference one and it's not in the object at all, that's fine,
don't try to display it.


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

Branch: refs/heads/cassandra-1.1
Commit: 1ad1c128291504fd8dc61112af2053d735df7103
Parents: f943a6e
Author: paul cannon <paul@datastax.com>
Authored: Tue Feb 21 15:31:18 2012 -0600
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Wed Feb 22 11:29:52 2012 +0100

----------------------------------------------------------------------
 CHANGES.txt |    1 +
 bin/cqlsh   |    6 +++++-
 2 files changed, 6 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1ad1c128/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 5618610..f04d1c8 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -21,6 +21,7 @@
  * make CLI `show schema` to use output stream directly instead
    of StringBuilder (CASSANDRA-3842)
  * remove the wait on hint future during write (CASSANDRA-3870)
+ * (cqlsh) ignore missing CfDef opts
 Merged from 0.8:
  * (Pig) fix CassandraStorage to use correct comparator in Super ColumnFamily
    case (CASSANDRA-3251)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/1ad1c128/bin/cqlsh
----------------------------------------------------------------------
diff --git a/bin/cqlsh b/bin/cqlsh
index 47763ec..241c5fc 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -835,11 +835,15 @@ class Shell(cmd.Cmd):
                 indexed_columns.append(col)
         notable_columns = []
         for (option, thriftname) in cqlhandling.columnfamily_options:
-            optval = getattr(cfdef, thriftname or option)
+            optval = getattr(cfdef, thriftname or option, None)
+            if optval is None:
+                continue
             if option in ('comparator', 'default_validation'):
                 optval = cql_typename(optval)
             elif option == 'row_cache_provider':
                 optval = cql_escape(trim_if_present(optval, 'org.apache.cassandra.cache.'))
+            elif option == 'compaction_strategy_class':
+                optval = cql_escape(trim_if_present(optval, 'org.apache.cassandra.db.compaction.'))
             else:
                 optval = cql_escape(optval)
             notable_columns.append((option, optval))


Mime
View raw message