Updated Branches: refs/heads/trunk 94509cbd7 -> 500a529e7
Make CQL3 the default CQL implementation patch by slebresne; reviewed by jbellis for CASSANDRA-4640 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/500a529e Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/500a529e Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/500a529e Branch: refs/heads/trunk Commit: 500a529e7dc8947149b419adbac922596bb341b7 Parents: 94509cb Author: Sylvain Lebresne <[email protected]> Authored: Mon Sep 10 18:50:21 2012 +0200 Committer: Sylvain Lebresne <[email protected]> Committed: Mon Sep 10 18:50:21 2012 +0200 ---------------------------------------------------------------------- CHANGES.txt | 1 + NEWS.txt | 9 +++++++-- bin/cqlsh | 2 +- .../org/apache/cassandra/service/ClientState.java | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/500a529e/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 838ed1b..0ad5b66 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -55,6 +55,7 @@ * Finer grained exceptions hierarchy and provides error code with exceptions (CASSANDRA-3979) * Adds events push to binary protocol (CASSANDRA-4480) * Rewrite nodetool help (CASSANDRA-2293) + * Make CQL3 the default for CQL (CASSANDRA-4640) 1.1.6 * (cql3) fix potential NPE with both equal and unequal restriction (CASSANDRA-4532) http://git-wip-us.apache.org/repos/asf/cassandra/blob/500a529e/NEWS.txt ---------------------------------------------------------------------- diff --git a/NEWS.txt b/NEWS.txt index 1ab5ebe..9d06b99 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -11,6 +11,7 @@ by version X, but the inverse is not necessarily the case.) 1.2 === + Upgrading --------- - 1.2 is NOT network-compatible with versions older than 1.0. That @@ -45,13 +46,17 @@ Upgrading - The default partitioner was changed from RandomPartitioner to Murmur3Partitioner which provides faster hashing as well as improved performance with secondary indexes. + - The default version of CQL (and cqlsh) is now CQL3. CQL2 is still + available but you will have to use the thrift set_cql_version method + (that is already supported in 1.1) to use CQL2. For cqlsh, you will need + to use 'cqlsh -2'. - CQL3 is now considered final in this release. Compared to the beta version that is part of 1.1, this final version has a few additions (collections), but also some changes in the syntax for the options of the create/alter keyspace/table statements. Typically, the syntax to create a keyspace is now: - CREATE KEYSPACE ks WITH replication = { 'class' : 'CompactionStrategy', - 'replication_faction' : 2 }; + CREATE KEYSPACE ks WITH replication = { 'class' : 'SimpleStrategy', + 'replication_factor' : 2 }; Please refer to the CQL3 documentation for details. Features http://git-wip-us.apache.org/repos/asf/cassandra/blob/500a529e/bin/cqlsh ---------------------------------------------------------------------- diff --git a/bin/cqlsh b/bin/cqlsh index 24217ae..d8393ba 100755 --- a/bin/cqlsh +++ b/bin/cqlsh @@ -114,7 +114,7 @@ CONFIG_FILE = os.path.expanduser(os.path.join('~', '.cqlshrc')) HISTORY = os.path.expanduser(os.path.join('~', '.cqlsh_history')) DEFAULT_HOST = 'localhost' DEFAULT_PORT = 9160 -DEFAULT_CQLVER = '2' +DEFAULT_CQLVER = '3' epilog = """Connects to %(DEFAULT_HOST)s:%(DEFAULT_PORT)d by default. These defaults can be changed by setting $CQLSH_HOST and/or $CQLSH_PORT. When a http://git-wip-us.apache.org/repos/asf/cassandra/blob/500a529e/src/java/org/apache/cassandra/service/ClientState.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/service/ClientState.java b/src/java/org/apache/cassandra/service/ClientState.java index b85b359..6e47950 100644 --- a/src/java/org/apache/cassandra/service/ClientState.java +++ b/src/java/org/apache/cassandra/service/ClientState.java @@ -46,7 +46,7 @@ public class ClientState { private static final int MAX_CACHE_PREPARED = 10000; // Enough to keep buggy clients from OOM'ing us private static final Logger logger = LoggerFactory.getLogger(ClientState.class); - public static final SemanticVersion DEFAULT_CQL_VERSION = org.apache.cassandra.cql.QueryProcessor.CQL_VERSION; + public static final SemanticVersion DEFAULT_CQL_VERSION = org.apache.cassandra.cql3.QueryProcessor.CQL_VERSION; // Current user for the session private AuthenticatedUser user;
