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 2013/11/21 10:02:33 UTC
[1/2] git commit: Don't allow describe on CQL3 table in CLI ever
Updated Branches:
refs/heads/cassandra-2.0 08f2e9797 -> 47fcb05d4
Don't allow describe on CQL3 table in CLI ever
patch by slebresne; reviewed by iamaleksey for CASSANDRA-5750
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/92fe8c89
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/92fe8c89
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/92fe8c89
Branch: refs/heads/cassandra-2.0
Commit: 92fe8c89614c91d5f6dd61ba6190df7c26783853
Parents: e01224e
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Thu Nov 21 09:57:18 2013 +0100
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Thu Nov 21 09:57:18 2013 +0100
----------------------------------------------------------------------
CHANGES.txt | 1 +
src/java/org/apache/cassandra/cli/CliClient.java | 16 +++++++++-------
2 files changed, 10 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/92fe8c89/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index b3fa565..c012148 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,6 +1,7 @@
1.2.13
* Optimize FD phi calculation (CASSANDRA-6386)
* Improve initial FD phi estimate when starting up (CASSANDRA-6385)
+ * Don't list CQL3 table in CLI describe even if named explicitely (CASSANDRA-5750)
1.2.12
http://git-wip-us.apache.org/repos/asf/cassandra/blob/92fe8c89/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 2229207..29c5ef5 100644
--- a/src/java/org/apache/cassandra/cli/CliClient.java
+++ b/src/java/org/apache/cassandra/cli/CliClient.java
@@ -1163,8 +1163,10 @@ public class CliClient
try
{
- // request correct cfDef from the server
- CfDef cfDef = getCfDef(thriftClient.describe_keyspace(this.keySpace), cfName);
+ // request correct cfDef from the server (we let that call include CQL3 cf even though
+ // they can't be modified by thrift because the error message that will be thrown by
+ // system_update_column_family will be more useful)
+ CfDef cfDef = getCfDef(thriftClient.describe_keyspace(this.keySpace), cfName, true);
if (cfDef == null)
throw new RuntimeException("Column Family " + cfName + " was not found in the current keyspace.");
@@ -2273,7 +2275,7 @@ public class CliClient
"of the keyspaces first.", entityName));
CfDef inputCfDef = (inputKsDef == null)
- ? getCfDef(currentKeySpace, entityName)
+ ? getCfDef(currentKeySpace, entityName, false)
: null; // no need to lookup CfDef if we know that it was keyspace
if (inputKsDef != null)
@@ -2298,7 +2300,7 @@ public class CliClient
}
else
{
- sessionState.out.println("Sorry, no Keyspace nor ColumnFamily was found with name: " + entityName);
+ sessionState.out.println("Sorry, no Keyspace nor (non-CQL3) ColumnFamily was found with name: " + entityName + " (if this is a CQL3 table, you should use cqlsh instead)");
}
}
}
@@ -2371,7 +2373,7 @@ public class CliClient
private CfDef getCfDef(String keySpaceName, String columnFamilyName)
{
KsDef ksDef = keyspacesMap.get(keySpaceName);
- CfDef cfDef = getCfDef(ksDef, columnFamilyName);
+ CfDef cfDef = getCfDef(ksDef, columnFamilyName, true);
if (cfDef == null)
throw new RuntimeException("No such column family: " + columnFamilyName);
return cfDef;
@@ -2387,7 +2389,7 @@ public class CliClient
return getCfDef(this.keySpace, columnFamilyName);
}
- private CfDef getCfDef(KsDef keyspace, String columnFamilyName)
+ private CfDef getCfDef(KsDef keyspace, String columnFamilyName, boolean includeCQL3)
{
for (CfDef cfDef : keyspace.cf_defs)
{
@@ -2395,7 +2397,7 @@ public class CliClient
return cfDef;
}
- return cql3KeyspacesMap.get(keyspace.name).get(columnFamilyName);
+ return includeCQL3 ? cql3KeyspacesMap.get(keyspace.name).get(columnFamilyName) : null;
}
/**
[2/2] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0
Posted by sl...@apache.org.
Merge branch 'cassandra-1.2' into cassandra-2.0
Conflicts:
CHANGES.txt
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/47fcb05d
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/47fcb05d
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/47fcb05d
Branch: refs/heads/cassandra-2.0
Commit: 47fcb05d4b518e4eeeeb078739defe04bf8ae7ae
Parents: 08f2e97 92fe8c8
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Thu Nov 21 09:58:48 2013 +0100
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Thu Nov 21 09:58:48 2013 +0100
----------------------------------------------------------------------
CHANGES.txt | 1 +
src/java/org/apache/cassandra/cli/CliClient.java | 16 +++++++++-------
2 files changed, 10 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/47fcb05d/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 8d15f6c,c012148..205b9f7
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,35 -1,10 +1,36 @@@
-1.2.13
+2.0.3
+ * Fix FD leak on slice read path (CASSANDRA-6275)
+ * Cancel read meter task when closing SSTR (CASSANDRA-6358)
+ * free off-heap IndexSummary during bulk (CASSANDRA-6359)
+ * Recover from IOException in accept() thread (CASSANDRA-6349)
+ * Improve Gossip tolerance of abnormally slow tasks (CASSANDRA-6338)
+ * Fix trying to hint timed out counter writes (CASSANDRA-6322)
+ * Allow restoring specific columnfamilies from archived CL (CASSANDRA-4809)
+ * Avoid flushing compaction_history after each operation (CASSANDRA-6287)
+ * Fix repair assertion error when tombstones expire (CASSANDRA-6277)
+ * Skip loading corrupt key cache (CASSANDRA-6260)
+ * Fixes for compacting larger-than-memory rows (CASSANDRA-6274)
+ * Compact hottest sstables first and optionally omit coldest from
+ compaction entirely (CASSANDRA-6109)
+ * Fix modifying column_metadata from thrift (CASSANDRA-6182)
+ * cqlsh: fix LIST USERS output (CASSANDRA-6242)
+ * Add IRequestSink interface (CASSANDRA-6248)
+ * Update memtable size while flushing (CASSANDRA-6249)
+ * Provide hooks around CQL2/CQL3 statement execution (CASSANDRA-6252)
+ * Require Permission.SELECT for CAS updates (CASSANDRA-6247)
+ * New CQL-aware SSTableWriter (CASSANDRA-5894)
+ * Reject CAS operation when the protocol v1 is used (CASSANDRA-6270)
+ * Correctly throw error when frame too large (CASSANDRA-5981)
+ * Fix serialization bug in PagedRange with 2ndary indexes (CASSANDRA-6299)
+ * Fix CQL3 table validation in Thrift (CASSANDRA-6140)
+ * Fix bug missing results with IN clauses (CASSANDRA-6327)
+ * Fix paging with reversed slices (CASSANDRA-6343)
+ * Set minTimestamp correctly to be able to drop expired sstables (CASSANDRA-6337)
+ * Support NaN and Infinity as float literals (CASSANDRA-6003)
+Merged from 1.2:
* Optimize FD phi calculation (CASSANDRA-6386)
* Improve initial FD phi estimate when starting up (CASSANDRA-6385)
+ * Don't list CQL3 table in CLI describe even if named explicitely (CASSANDRA-5750)
-
-
-1.2.12
* Invalidate row cache when dropping CF (CASSANDRA-6351)
* add non-jamm path for cached statements (CASSANDRA-6293)
* (Hadoop) Require CFRR batchSize to be at least 2 (CASSANDRA-6114)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/47fcb05d/src/java/org/apache/cassandra/cli/CliClient.java
----------------------------------------------------------------------