You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by st...@apache.org on 2016/10/25 02:04:23 UTC

[1/3] cassandra git commit: Avoid potential AttributeError in cqlsh due to no table metadata

Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.X 3cb023355 -> 13b736249
  refs/heads/trunk b921ddf2f -> 9d4fd903f


Avoid potential AttributeError in cqlsh due to no table metadata

Patch by Stefania Alborghetti; reviewed by Robert Stupp for CASSANDRA-12815


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

Branch: refs/heads/cassandra-3.X
Commit: 13b7362494c4c0ff3c5ce80b8e7ee7fe64d65785
Parents: 3cb0233
Author: Stefania Alborghetti <st...@datastax.com>
Authored: Thu Oct 20 10:06:50 2016 +0800
Committer: Stefania Alborghetti <st...@datastax.com>
Committed: Tue Oct 25 10:03:21 2016 +0800

----------------------------------------------------------------------
 CHANGES.txt  | 1 +
 bin/cqlsh.py | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/13b73624/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index d1f2677..ef728c7 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.10
+ * Avoid potential AttributeError in cqlsh due to no table metadata (CASSANDRA-12815)
  * Fix RandomReplicationAwareTokenAllocatorTest.testExistingCluster (CASSANDRA-12812)
  * Upgrade commons-codec to 1.9 (CASSANDRA-12790)
  * Make the fanout size for LeveledCompactionStrategy to be configurable (CASSANDRA-11550)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/13b73624/bin/cqlsh.py
----------------------------------------------------------------------
diff --git a/bin/cqlsh.py b/bin/cqlsh.py
index e741752..072ef08 100644
--- a/bin/cqlsh.py
+++ b/bin/cqlsh.py
@@ -1334,7 +1334,8 @@ class Shell(cmd.Cmd):
 
         cql_types = []
         if result.column_types:
-            ks_meta = self.conn.metadata.keyspaces[table_meta.keyspace_name]
+            ks_name = table_meta.keyspace_name if table_meta else self.current_keyspace
+            ks_meta = self.conn.metadata.keyspaces.get(ks_name, None)
             cql_types = [CqlType(cql_typename(t), ks_meta) for t in result.column_types]
 
         formatted_values = [map(self.myformat_value, row.values(), cql_types) for row in result.current_rows]


[2/3] cassandra git commit: Avoid potential AttributeError in cqlsh due to no table metadata

Posted by st...@apache.org.
Avoid potential AttributeError in cqlsh due to no table metadata

Patch by Stefania Alborghetti; reviewed by Robert Stupp for CASSANDRA-12815


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

Branch: refs/heads/trunk
Commit: 13b7362494c4c0ff3c5ce80b8e7ee7fe64d65785
Parents: 3cb0233
Author: Stefania Alborghetti <st...@datastax.com>
Authored: Thu Oct 20 10:06:50 2016 +0800
Committer: Stefania Alborghetti <st...@datastax.com>
Committed: Tue Oct 25 10:03:21 2016 +0800

----------------------------------------------------------------------
 CHANGES.txt  | 1 +
 bin/cqlsh.py | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/13b73624/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index d1f2677..ef728c7 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.10
+ * Avoid potential AttributeError in cqlsh due to no table metadata (CASSANDRA-12815)
  * Fix RandomReplicationAwareTokenAllocatorTest.testExistingCluster (CASSANDRA-12812)
  * Upgrade commons-codec to 1.9 (CASSANDRA-12790)
  * Make the fanout size for LeveledCompactionStrategy to be configurable (CASSANDRA-11550)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/13b73624/bin/cqlsh.py
----------------------------------------------------------------------
diff --git a/bin/cqlsh.py b/bin/cqlsh.py
index e741752..072ef08 100644
--- a/bin/cqlsh.py
+++ b/bin/cqlsh.py
@@ -1334,7 +1334,8 @@ class Shell(cmd.Cmd):
 
         cql_types = []
         if result.column_types:
-            ks_meta = self.conn.metadata.keyspaces[table_meta.keyspace_name]
+            ks_name = table_meta.keyspace_name if table_meta else self.current_keyspace
+            ks_meta = self.conn.metadata.keyspaces.get(ks_name, None)
             cql_types = [CqlType(cql_typename(t), ks_meta) for t in result.column_types]
 
         formatted_values = [map(self.myformat_value, row.values(), cql_types) for row in result.current_rows]


[3/3] cassandra git commit: Merge branch 'cassandra-3.X' into trunk

Posted by st...@apache.org.
Merge branch 'cassandra-3.X' into trunk


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

Branch: refs/heads/trunk
Commit: 9d4fd903fb1888cbbaca85d43458fda0b10dac22
Parents: b921ddf 13b7362
Author: Stefania Alborghetti <st...@datastax.com>
Authored: Tue Oct 25 10:03:37 2016 +0800
Committer: Stefania Alborghetti <st...@datastax.com>
Committed: Tue Oct 25 10:03:37 2016 +0800

----------------------------------------------------------------------
 CHANGES.txt  | 1 +
 bin/cqlsh.py | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9d4fd903/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 8504e0b,ef728c7..7b2666d
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,17 -1,9 +1,18 @@@
 +4.0
 + * Add column definition kind to dropped columns in schema (CASSANDRA-12705)
 + * Add (automate) Nodetool Documentation (CASSANDRA-12672)
 + * Update bundled cqlsh python driver to 3.7.0 (CASSANDRA-12736)
 + * Reject invalid replication settings when creating or altering a keyspace (CASSANDRA-12681)
 + * Clean up the SSTableReader#getScanner API wrt removal of RateLimiter (CASSANDRA-12422)
 +Merged from 3.0:
 + * Include SSTable filename in compacting large row message (CASSANDRA-12384)
 +
  3.10
+  * Avoid potential AttributeError in cqlsh due to no table metadata (CASSANDRA-12815)
   * Fix RandomReplicationAwareTokenAllocatorTest.testExistingCluster (CASSANDRA-12812)
   * Upgrade commons-codec to 1.9 (CASSANDRA-12790)
 - * Make the fanout size for LeveledCompactionStrategy to be configurable (CASSANDRA-11550)
   * Add duration data type (CASSANDRA-11873)
 + * Make the fanout size for LeveledCompactionStrategy to be configurable (CASSANDRA-11550)
   * Fix timeout in ReplicationAwareTokenAllocatorTest (CASSANDRA-12784)
   * Improve sum aggregate functions (CASSANDRA-12417)
   * Make cassandra.yaml docs for batch_size_*_threshold_in_kb reflect changes in CASSANDRA-10876 (CASSANDRA-12761)