You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by sl...@apache.org on 2012/02/22 11:35:19 UTC

[4/4] git commit: cqlsh: ignore missing CfDef opts

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/trunk
Commit: 1ad1c128291504fd8dc61112af2053d735df7103
Parents: f943a6e
Author: paul cannon <pa...@datastax.com>
Authored: Tue Feb 21 15:31:18 2012 -0600
Committer: Sylvain Lebresne <sy...@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))