[2/3] cassandra git commit: cqlsh doesn't handle LIST statements correctly.
cqlsh doesn't handle LIST statements correctly. patch by Sam Tunnicliffe; reviewed by Mikhail Stepura for CASSANDRA-8370 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f1e2fed8 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f1e2fed8 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f1e2fed8 Branch: refs/heads/trunk Commit: f1e2fed8ddbb77530cc69c8d753fd313b9e1fa35 Parents: 6f98c6c Author: Sam Tunnicliffe Authored: Wed Dec 17 15:50:59 2014 -0800 Committer: Mikhail Stepura Committed: Wed Dec 17 15:50:59 2014 -0800 -- CHANGES.txt | 1 + bin/cqlsh | 6 +- 2 files changed, 6 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f1e2fed8/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 9ec3585..ecb592e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.3 + * (cqlsh) Fixed the handling of LIST statements (CASSANDRA-8370) * Make sstablescrub check leveled manifest again (CASSANDRA-8432) * Check first/last keys in sstable when giving out positions (CASSANDRA-8458) * Disable mmap on Windows (CASSANDRA-6993) http://git-wip-us.apache.org/repos/asf/cassandra/blob/f1e2fed8/bin/cqlsh -- diff --git a/bin/cqlsh b/bin/cqlsh index 250fc06..033eb37 100755 --- a/bin/cqlsh +++ b/bin/cqlsh @@ -987,8 +987,12 @@ class Shell(cmd.Cmd): self.printerr(traceback.format_exc()) return False -if statement.query_string[:6].lower() == 'select' or statement.query_string.lower().startswith("list"): +if statement.query_string[:6].lower() == 'select': self.print_result(rows, self.parse_for_table_meta(statement.query_string)) +elif statement.query_string.lower().startswith("list users"): +self.print_result(rows, self.get_table_meta('system_auth','users')) +elif statement.query_string.lower().startswith("list"): +self.print_result(rows, self.get_table_meta('system_auth','permissions')) elif rows: # CAS INSERT/UPDATE self.writeresult("")
[3/3] cassandra git commit: Merge branch 'cassandra-2.1' into trunk
Merge branch 'cassandra-2.1' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/3c955f44 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/3c955f44 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/3c955f44 Branch: refs/heads/trunk Commit: 3c955f447c4a721720cb7d8a6572e3087598a47e Parents: 417563a f1e2fed Author: Mikhail Stepura Authored: Wed Dec 17 15:51:12 2014 -0800 Committer: Mikhail Stepura Committed: Wed Dec 17 15:51:12 2014 -0800 -- CHANGES.txt | 1 + bin/cqlsh | 6 +- 2 files changed, 6 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/3c955f44/CHANGES.txt -- diff --cc CHANGES.txt index 9cea513,ecb592e..8780f0d --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,46 -1,5 +1,47 @@@ +3.0 + * Modernize schema tables (CASSANDRA-8261) + * Support for user-defined aggregation functions (CASSANDRA-8053) + * Fix NPE in SelectStatement with empty IN values (CASSANDRA-8419) + * Refactor SelectStatement, return IN results in natural order instead + of IN value list order (CASSANDRA-7981) + * Support UDTs, tuples, and collections in user-defined + functions (CASSANDRA-7563) + * Fix aggregate fn results on empty selection, result column name, + and cqlsh parsing (CASSANDRA-8229) + * Mark sstables as repaired after full repair (CASSANDRA-7586) + * Extend Descriptor to include a format value and refactor reader/writer apis (CASSANDRA-7443) + * Integrate JMH for microbenchmarks (CASSANDRA-8151) + * Keep sstable levels when bootstrapping (CASSANDRA-7460) + * Add Sigar library and perform basic OS settings check on startup (CASSANDRA-7838) + * Support for aggregation functions (CASSANDRA-4914) + * Remove cassandra-cli (CASSANDRA-7920) + * Accept dollar quoted strings in CQL (CASSANDRA-7769) + * Make assassinate a first class command (CASSANDRA-7935) + * Support IN clause on any clustering column (CASSANDRA-4762) + * Improve compaction logging (CASSANDRA-7818) + * Remove YamlFileNetworkTopologySnitch (CASSANDRA-7917) + * Do anticompaction in groups (CASSANDRA-6851) + * Support pure user-defined functions (CASSANDRA-7395, 7526, 7562, 7740, 7781, 7929, + 7924, 7812, 8063, 7813) + * Permit configurable timestamps with cassandra-stress (CASSANDRA-7416) + * Move sstable RandomAccessReader to nio2, which allows using the + FILE_SHARE_DELETE flag on Windows (CASSANDRA-4050) + * Remove CQL2 (CASSANDRA-5918) + * Add Thrift get_multi_slice call (CASSANDRA-6757) + * Optimize fetching multiple cells by name (CASSANDRA-6933) + * Allow compilation in java 8 (CASSANDRA-7028) + * Make incremental repair default (CASSANDRA-7250) + * Enable code coverage thru JaCoCo (CASSANDRA-7226) + * Switch external naming of 'column families' to 'tables' (CASSANDRA-4369) + * Shorten SSTable path (CASSANDRA-6962) + * Use unsafe mutations for most unit tests (CASSANDRA-6969) + * Fix race condition during calculation of pending ranges (CASSANDRA-7390) + * Fail on very large batch sizes (CASSANDRA-8011) + * Improve concurrency of repair (CASSANDRA-6455, 8208) + + 2.1.3 + * (cqlsh) Fixed the handling of LIST statements (CASSANDRA-8370) * Make sstablescrub check leveled manifest again (CASSANDRA-8432) * Check first/last keys in sstable when giving out positions (CASSANDRA-8458) * Disable mmap on Windows (CASSANDRA-6993)
[1/3] cassandra git commit: cqlsh doesn't handle LIST statements correctly.
Repository: cassandra Updated Branches: refs/heads/cassandra-2.1 6f98c6c4e -> f1e2fed8d refs/heads/trunk 417563a59 -> 3c955f447 cqlsh doesn't handle LIST statements correctly. patch by Sam Tunnicliffe; reviewed by Mikhail Stepura for CASSANDRA-8370 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f1e2fed8 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f1e2fed8 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f1e2fed8 Branch: refs/heads/cassandra-2.1 Commit: f1e2fed8ddbb77530cc69c8d753fd313b9e1fa35 Parents: 6f98c6c Author: Sam Tunnicliffe Authored: Wed Dec 17 15:50:59 2014 -0800 Committer: Mikhail Stepura Committed: Wed Dec 17 15:50:59 2014 -0800 -- CHANGES.txt | 1 + bin/cqlsh | 6 +- 2 files changed, 6 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f1e2fed8/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 9ec3585..ecb592e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.3 + * (cqlsh) Fixed the handling of LIST statements (CASSANDRA-8370) * Make sstablescrub check leveled manifest again (CASSANDRA-8432) * Check first/last keys in sstable when giving out positions (CASSANDRA-8458) * Disable mmap on Windows (CASSANDRA-6993) http://git-wip-us.apache.org/repos/asf/cassandra/blob/f1e2fed8/bin/cqlsh -- diff --git a/bin/cqlsh b/bin/cqlsh index 250fc06..033eb37 100755 --- a/bin/cqlsh +++ b/bin/cqlsh @@ -987,8 +987,12 @@ class Shell(cmd.Cmd): self.printerr(traceback.format_exc()) return False -if statement.query_string[:6].lower() == 'select' or statement.query_string.lower().startswith("list"): +if statement.query_string[:6].lower() == 'select': self.print_result(rows, self.parse_for_table_meta(statement.query_string)) +elif statement.query_string.lower().startswith("list users"): +self.print_result(rows, self.get_table_meta('system_auth','users')) +elif statement.query_string.lower().startswith("list"): +self.print_result(rows, self.get_table_meta('system_auth','permissions')) elif rows: # CAS INSERT/UPDATE self.writeresult("")
cassandra git commit: Validate functionality of different JSR-223 providers in UDFs.
Repository: cassandra Updated Branches: refs/heads/trunk c5cec0046 -> e13121318 Validate functionality of different JSR-223 providers in UDFs. patch by Robert Stupp; reviewed by Mikhail Stepura for CASSANDRA-7874 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/e1312131 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e1312131 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e1312131 Branch: refs/heads/trunk Commit: e13121318b1a3186f75a652c28ca317edac719d4 Parents: c5cec00 Author: Robert Stupp Authored: Wed Nov 26 12:51:37 2014 -0800 Committer: Mikhail Stepura Committed: Wed Nov 26 12:51:37 2014 -0800 -- .gitignore| 12 + bin/cassandra.bat | 23 bin/cassandra.in.bat | 21 +++ bin/cassandra.in.sh | 21 +++ conf/cassandra-env.ps1| 37 ++ lib/jsr223/clojure/README.txt | 8 ++ lib/jsr223/groovy/README.txt | 35 lib/jsr223/jaskell/README.txt | 5 lib/jsr223/jruby/README.txt | 54 ++ lib/jsr223/jython/README.txt | 33 +++ lib/jsr223/scala/README.txt | 37 ++ 11 files changed, 286 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/e1312131/.gitignore -- diff --git a/.gitignore b/.gitignore index c7cf9fd..fd37407 100644 --- a/.gitignore +++ b/.gitignore @@ -57,3 +57,15 @@ target/ *.tmp .DS_Store Thumbs.db + +# JSR223 +lib/jsr223/clojure/*.jar +lib/jsr223/groovy/*.jar +lib/jsr223/jaskell/*.jar +lib/jsr223/jruby/*.jar +lib/jsr223/jruby/jni +lib/jsr223/jruby/ruby +lib/jsr223/jython/*.jar +lib/jsr223/jython/cachedir +lib/jsr223/scala/*.jar + http://git-wip-us.apache.org/repos/asf/cassandra/blob/e1312131/bin/cassandra.bat -- diff --git a/bin/cassandra.bat b/bin/cassandra.bat index a16bf1a..3445af2 100644 --- a/bin/cassandra.bat +++ b/bin/cassandra.bat @@ -85,6 +85,29 @@ goto :eof REM - :okClasspath + +REM JSR223 - collect all JSR223 engines' jars +for /D %%P in ("%CASSANDRA_HOME%\lib\jsr223\*.*") do ( + for %%i in ("%%P\*.jar") do call :append "%%i" +) + +REM JSR223/JRuby - set ruby lib directory +if EXIST "%CASSANDRA_HOME%\lib\jsr223\jruby\ruby" ( +set JAVA_OPTS=%JAVA_OPTS% "-Djruby.lib=%CASSANDRA_HOME%\lib\jsr223\jruby" +) +REM JSR223/JRuby - set ruby JNI libraries root directory +if EXIST "%CASSANDRA_HOME%\lib\jsr223\jruby\jni" ( +set JAVA_OPTS=%JAVA_OPTS% "-Djffi.boot.library.path=%CASSANDRA_HOME%\lib\jsr223\jruby\jni" +) +REM JSR223/Jython - set python.home system property +if EXIST "%CASSANDRA_HOME%\lib\jsr223\jython\jython.jar" ( +set JAVA_OPTS=%JAVA_OPTS% "-Dpython.home=%CASSANDRA_HOME%\lib\jsr223\jython" +) +REM JSR223/Scala - necessary system property +if EXIST "%CASSANDRA_HOME%\lib\jsr223\scala\scala-compiler.jar" ( +set JAVA_OPTS=%JAVA_OPTS% "-Dscala.usejavacp=true" +) + REM Include the build\classes\main directory so it works in development set CASSANDRA_CLASSPATH=%CLASSPATH%;"%CASSANDRA_HOME%\build\classes\main";"%CASSANDRA_HOME%\build\classes\thrift" set CASSANDRA_PARAMS=-Dcassandra -Dcassandra-foreground=yes http://git-wip-us.apache.org/repos/asf/cassandra/blob/e1312131/bin/cassandra.in.bat -- diff --git a/bin/cassandra.in.bat b/bin/cassandra.in.bat index a0eced5..1b4e38e 100644 --- a/bin/cassandra.in.bat +++ b/bin/cassandra.in.bat @@ -49,5 +49,26 @@ set CASSANDRA_CLASSPATH=%CLASSPATH%;"%CASSANDRA_HOME%\build\classes\main";%CASSA REM Add the default storage location. Can be overridden in conf\cassandra.yaml set CASSANDRA_PARAMS=%CASSANDRA_PARAMS% "-Dcassandra.storagedir=%CASSANDRA_HOME%\data" +REM JSR223 - collect all JSR223 engines' jars +for /r %%P in ("%CASSANDRA_HOME%\lib\jsr223\*.jar") do ( +set CLASSPATH=%CLASSPATH%;%%~fP +) +REM JSR223/JRuby - set ruby lib directory +if EXIST "%CASSANDRA_HOME%\lib\jsr223\jruby\ruby" ( +set JAVA_OPTS=%JAVA_OPTS% "-Djruby.lib=%CASSANDRA_HOME%\lib\jsr223\jruby" +) +REM JSR223/JRuby - set ruby JNI libraries root directory +if EXIST "%CASSANDRA_HOME%\lib\jsr223\jruby\jni" ( +set JAVA_OPTS=%JAVA_OPTS% "-Djffi.boot.library.path=%CASSANDRA_HOME%\lib\jsr223\jruby\jni" +) +REM JSR223/Jython - set python.home system property +if EXIST "%$CASSANDRA_HOME%\lib\jsr223\jython\jython.jar" ( +set JAVA_OPTS=%JAVA_OPTS% "-Dpython.home=%CASSANDRA_HOME%\lib\jsr223\jython" +) +REM JSR223/Scala - necessary system property +if EXIST "$CA
[3/3] cassandra git commit: Merge branch 'cassandra-2.1' into trunk
Merge branch 'cassandra-2.1' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/203efd02 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/203efd02 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/203efd02 Branch: refs/heads/trunk Commit: 203efd0221ba103be85e86d38278a996b31e88ad Parents: e9995c9 155eccd Author: Mikhail Stepura Authored: Fri Nov 7 13:46:10 2014 -0800 Committer: Mikhail Stepura Committed: Fri Nov 7 13:46:10 2014 -0800 -- build.xml | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/203efd02/build.xml -- diff --cc build.xml index 2cb637e,43fa531..5eb1955 --- a/build.xml +++ b/build.xml @@@ -1526,26 -1476,8 +1526,26 @@@ ]]> + + + + + + + + + + + + + + + + - +
[2/3] cassandra git commit: (Eclipse) Re-use test classes from an ant build
(Eclipse) Re-use test classes from an ant build patch by Mikhail Stepura; reviewed by T Jake Luciani for CASSANDRA-8277 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/155eccd6 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/155eccd6 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/155eccd6 Branch: refs/heads/trunk Commit: 155eccd66e767db789a6115be2df24290ca166e4 Parents: 7920ebe Author: Mikhail Stepura Authored: Fri Nov 7 10:32:09 2014 -0800 Committer: Mikhail Stepura Committed: Fri Nov 7 13:45:36 2014 -0800 -- build.xml | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/155eccd6/build.xml -- diff --git a/build.xml b/build.xml index b20ca90..43fa531 100644 --- a/build.xml +++ b/build.xml @@ -1477,7 +1477,7 @@ - +
[1/3] cassandra git commit: (Eclipse) Re-use test classes from an ant build
Repository: cassandra Updated Branches: refs/heads/cassandra-2.1 7920ebebe -> 155eccd66 refs/heads/trunk e9995c9b5 -> 203efd022 (Eclipse) Re-use test classes from an ant build patch by Mikhail Stepura; reviewed by T Jake Luciani for CASSANDRA-8277 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/155eccd6 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/155eccd6 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/155eccd6 Branch: refs/heads/cassandra-2.1 Commit: 155eccd66e767db789a6115be2df24290ca166e4 Parents: 7920ebe Author: Mikhail Stepura Authored: Fri Nov 7 10:32:09 2014 -0800 Committer: Mikhail Stepura Committed: Fri Nov 7 13:45:36 2014 -0800 -- build.xml | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/155eccd6/build.xml -- diff --git a/build.xml b/build.xml index b20ca90..43fa531 100644 --- a/build.xml +++ b/build.xml @@ -1477,7 +1477,7 @@ - +
[3/3] git commit: Merge branch 'cassandra-2.1' into trunk
Merge branch 'cassandra-2.1' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/eccf25a1 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/eccf25a1 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/eccf25a1 Branch: refs/heads/trunk Commit: eccf25a17ead87016646f6f4bdd6d19194f79a4d Parents: 8856934 cdf80d9 Author: Mikhail Stepura Authored: Wed Nov 5 15:50:11 2014 -0800 Committer: Mikhail Stepura Committed: Wed Nov 5 15:50:11 2014 -0800 -- CHANGES.txt | 2 ++ bin/cqlsh | 7 ++- 2 files changed, 8 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/eccf25a1/CHANGES.txt -- diff --cc CHANGES.txt index f0ee602,2e60f3a..b23f756 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,37 -1,6 +1,39 @@@ +3.0 + * Mark sstables as repaired after full repair (CASSANDRA-7586) + * Extend Descriptor to include a format value and refactor reader/writer apis (CASSANDRA-7443) + * Integrate JMH for microbenchmarks (CASSANDRA-8151) + * Keep sstable levels when bootstrapping (CASSANDRA-7460) + * Add Sigar library and perform basic OS settings check on startup (CASSANDRA-7838) + * Support for aggregation functions (CASSANDRA-4914) + * Remove cassandra-cli (CASSANDRA-7920) + * Accept dollar quoted strings in CQL (CASSANDRA-7769) + * Make assassinate a first class command (CASSANDRA-7935) + * Support IN clause on any clustering column (CASSANDRA-4762) + * Improve compaction logging (CASSANDRA-7818) + * Remove YamlFileNetworkTopologySnitch (CASSANDRA-7917) + * Do anticompaction in groups (CASSANDRA-6851) + * Support pure user-defined functions (CASSANDRA-7395, 7526, 7562, 7740, 7781, 7929, + 7924, 7812, 8063) + * Permit configurable timestamps with cassandra-stress (CASSANDRA-7416) + * Move sstable RandomAccessReader to nio2, which allows using the + FILE_SHARE_DELETE flag on Windows (CASSANDRA-4050) + * Remove CQL2 (CASSANDRA-5918) + * Add Thrift get_multi_slice call (CASSANDRA-6757) + * Optimize fetching multiple cells by name (CASSANDRA-6933) + * Allow compilation in java 8 (CASSANDRA-7028) + * Make incremental repair default (CASSANDRA-7250) + * Enable code coverage thru JaCoCo (CASSANDRA-7226) + * Switch external naming of 'column families' to 'tables' (CASSANDRA-4369) + * Shorten SSTable path (CASSANDRA-6962) + * Use unsafe mutations for most unit tests (CASSANDRA-6969) + * Fix race condition during calculation of pending ranges (CASSANDRA-7390) + * Fail on very large batch sizes (CASSANDRA-8011) + * improve concurrency of repair (CASSANDRA-6455) + + 2.1.2 + * (cqlsh) parse_for_table_meta errors out on queries with undefined +grammars (CASSANDRA-8262) * (cqlsh) Fix SELECT ... TOKEN() function broken in C* 2.1.1 (CASSANDRA-8258) * Fix Cassandra crash when running on JDK8 update 40 (CASSANDRA-8209) * Optimize partitioner tokens (CASSANDRA-8230)
[2/3] git commit: (cqlsh) parse_for_table_meta errors out on queries with undefined grammars
(cqlsh) parse_for_table_meta errors out on queries with undefined grammars patch by Philip Thompson; reviewed by Mikhail Stepura for CASSANDRA-8262 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/cdf80d9d Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/cdf80d9d Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/cdf80d9d Branch: refs/heads/trunk Commit: cdf80d9d196171376b6fc7aface473a471313efb Parents: 8515029 Author: Philip Thompson Authored: Wed Nov 5 15:49:59 2014 -0800 Committer: Mikhail Stepura Committed: Wed Nov 5 15:49:59 2014 -0800 -- CHANGES.txt | 2 ++ bin/cqlsh | 7 ++- 2 files changed, 8 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/cdf80d9d/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index ee18be0..2e60f3a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,6 @@ 2.1.2 + * (cqlsh) parse_for_table_meta errors out on queries with undefined + grammars (CASSANDRA-8262) * (cqlsh) Fix SELECT ... TOKEN() function broken in C* 2.1.1 (CASSANDRA-8258) * Fix Cassandra crash when running on JDK8 update 40 (CASSANDRA-8209) * Optimize partitioner tokens (CASSANDRA-8230) http://git-wip-us.apache.org/repos/asf/cassandra/blob/cdf80d9d/bin/cqlsh -- diff --git a/bin/cqlsh b/bin/cqlsh index 763a828..6ace914 100755 --- a/bin/cqlsh +++ b/bin/cqlsh @@ -943,7 +943,10 @@ class Shell(cmd.Cmd): return result def parse_for_table_meta(self, query_string): -parsed = cqlruleset.cql_parse(query_string)[1] +try: +parsed = cqlruleset.cql_parse(query_string)[1] +except IndexError: +return None ks = self.cql_unprotect_name(parsed.get_binding('ksname', None)) cf = self.cql_unprotect_name(parsed.get_binding('cfname')) return self.get_table_meta(ks, cf) @@ -1010,6 +1013,8 @@ class Shell(cmd.Cmd): def print_static_result(self, rows, table_meta): if not rows: +if not table_meta: +return # print header only colnames = table_meta.columns.keys() # full header formatted_names = [self.myformat_colname(name, table_meta) for name in colnames]
[1/3] git commit: (cqlsh) parse_for_table_meta errors out on queries with undefined grammars
Repository: cassandra Updated Branches: refs/heads/cassandra-2.1 851502902 -> cdf80d9d1 refs/heads/trunk 8856934fc -> eccf25a17 (cqlsh) parse_for_table_meta errors out on queries with undefined grammars patch by Philip Thompson; reviewed by Mikhail Stepura for CASSANDRA-8262 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/cdf80d9d Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/cdf80d9d Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/cdf80d9d Branch: refs/heads/cassandra-2.1 Commit: cdf80d9d196171376b6fc7aface473a471313efb Parents: 8515029 Author: Philip Thompson Authored: Wed Nov 5 15:49:59 2014 -0800 Committer: Mikhail Stepura Committed: Wed Nov 5 15:49:59 2014 -0800 -- CHANGES.txt | 2 ++ bin/cqlsh | 7 ++- 2 files changed, 8 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/cdf80d9d/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index ee18be0..2e60f3a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,6 @@ 2.1.2 + * (cqlsh) parse_for_table_meta errors out on queries with undefined + grammars (CASSANDRA-8262) * (cqlsh) Fix SELECT ... TOKEN() function broken in C* 2.1.1 (CASSANDRA-8258) * Fix Cassandra crash when running on JDK8 update 40 (CASSANDRA-8209) * Optimize partitioner tokens (CASSANDRA-8230) http://git-wip-us.apache.org/repos/asf/cassandra/blob/cdf80d9d/bin/cqlsh -- diff --git a/bin/cqlsh b/bin/cqlsh index 763a828..6ace914 100755 --- a/bin/cqlsh +++ b/bin/cqlsh @@ -943,7 +943,10 @@ class Shell(cmd.Cmd): return result def parse_for_table_meta(self, query_string): -parsed = cqlruleset.cql_parse(query_string)[1] +try: +parsed = cqlruleset.cql_parse(query_string)[1] +except IndexError: +return None ks = self.cql_unprotect_name(parsed.get_binding('ksname', None)) cf = self.cql_unprotect_name(parsed.get_binding('cfname')) return self.get_table_meta(ks, cf) @@ -1010,6 +1013,8 @@ class Shell(cmd.Cmd): def print_static_result(self, rows, table_meta): if not rows: +if not table_meta: +return # print header only colnames = table_meta.columns.keys() # full header formatted_names = [self.myformat_colname(name, table_meta) for name in colnames]
[2/5] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1
Merge branch 'cassandra-2.0' into cassandra-2.1 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a9f65bcf Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a9f65bcf Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a9f65bcf Branch: refs/heads/trunk Commit: a9f65bcf28e7abc2f30130ae2e8fb34cf5ee7a55 Parents: cea00e9 65f7990 Author: Jonathan Ellis Authored: Wed Nov 5 16:45:10 2014 -0600 Committer: Jonathan Ellis Committed: Wed Nov 5 16:45:10 2014 -0600 -- --
[4/5] git commit: (cqlsh) SELECT ... TOKEN() function broken in C* 2.1.1
(cqlsh) SELECT ... TOKEN() function broken in C* 2.1.1 patch by Philip Thompson; reviewed by Mikhail Stepura for CASSANDRA-8258 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/85150290 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/85150290 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/85150290 Branch: refs/heads/cassandra-2.1 Commit: 8515029020dba0ac7ddda36832f3aa32a58ca738 Parents: a9f65bc Author: Philip Thompson Authored: Wed Nov 5 15:31:10 2014 -0800 Committer: Mikhail Stepura Committed: Wed Nov 5 15:31:10 2014 -0800 -- CHANGES.txt | 1 + pylib/cqlshlib/cql3handling.py | 2 +- pylib/cqlshlib/test/test_cql_parsing.py | 9 - 3 files changed, 10 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/85150290/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 2b9e10c..ee18be0 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.2 + * (cqlsh) Fix SELECT ... TOKEN() function broken in C* 2.1.1 (CASSANDRA-8258) * Fix Cassandra crash when running on JDK8 update 40 (CASSANDRA-8209) * Optimize partitioner tokens (CASSANDRA-8230) * Improve compaction of repaired/unrepaired sstables (CASSANDRA-8004) http://git-wip-us.apache.org/repos/asf/cassandra/blob/85150290/pylib/cqlshlib/cql3handling.py -- diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py index e12e7e1..b1179ca 100644 --- a/pylib/cqlshlib/cql3handling.py +++ b/pylib/cqlshlib/cql3handling.py @@ -206,7 +206,7 @@ JUNK ::= /([ \t\r\f\v]+|(--|[/][/])[^\n\r]*([\n\r]|$)|[/][*].*?[*][/])/ ; ::= "{" ":" ( "," ":" )* "}" ; - ::= + ::= | "TOKEN" ; ::= http://git-wip-us.apache.org/repos/asf/cassandra/blob/85150290/pylib/cqlshlib/test/test_cql_parsing.py -- diff --git a/pylib/cqlshlib/test/test_cql_parsing.py b/pylib/cqlshlib/test/test_cql_parsing.py index 7e4e6f3..f88b839 100644 --- a/pylib/cqlshlib/test/test_cql_parsing.py +++ b/pylib/cqlshlib/test/test_cql_parsing.py @@ -18,10 +18,12 @@ # for Thrift connections, and $CQL_TEST_PORT to the associated port. from .basecase import BaseTestCase, cqlsh +from .cassconnect import get_test_keyspace, testrun_cqlsh, testcall_cqlsh class TestCqlParsing(BaseTestCase): def setUp(self): -pass +self.cqlsh_runner = testrun_cqlsh(cqlver=cqlsh.DEFAULT_CQLVER, env={'COLUMNS': '10'}) +self.cqlsh = self.cqlsh_runner.__enter__() def tearDown(self): pass @@ -85,3 +87,8 @@ class TestCqlParsing(BaseTestCase): def test_parse_drop_index(self): pass + +def test_parse_select_token(self): +self.cqlsh.cmd_and_response('INSERT INTO has_all_types (num) VALUES (1);') +response = self.cqlsh.cmd_and_response("SELECT token(num) from has_all_types where num=1;") +self.assertIn('-4069959284402364209', response)
[5/5] git commit: Merge branch 'cassandra-2.1' into trunk
Merge branch 'cassandra-2.1' into trunk Conflicts: pylib/cqlshlib/cql3handling.py Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/8856934f Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8856934f Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8856934f Branch: refs/heads/trunk Commit: 8856934fc8d062730f4b9c0a6adf1023bc331697 Parents: 19c2d22 8515029 Author: Mikhail Stepura Authored: Wed Nov 5 15:37:43 2014 -0800 Committer: Mikhail Stepura Committed: Wed Nov 5 15:37:43 2014 -0800 -- CHANGES.txt | 1 + pylib/cqlshlib/cql3handling.py | 3 ++- pylib/cqlshlib/test/test_cql_parsing.py | 9 - 3 files changed, 11 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/8856934f/CHANGES.txt -- diff --cc CHANGES.txt index 736c659,ee18be0..f0ee602 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,37 -1,5 +1,38 @@@ +3.0 + * Mark sstables as repaired after full repair (CASSANDRA-7586) + * Extend Descriptor to include a format value and refactor reader/writer apis (CASSANDRA-7443) + * Integrate JMH for microbenchmarks (CASSANDRA-8151) + * Keep sstable levels when bootstrapping (CASSANDRA-7460) + * Add Sigar library and perform basic OS settings check on startup (CASSANDRA-7838) + * Support for aggregation functions (CASSANDRA-4914) + * Remove cassandra-cli (CASSANDRA-7920) + * Accept dollar quoted strings in CQL (CASSANDRA-7769) + * Make assassinate a first class command (CASSANDRA-7935) + * Support IN clause on any clustering column (CASSANDRA-4762) + * Improve compaction logging (CASSANDRA-7818) + * Remove YamlFileNetworkTopologySnitch (CASSANDRA-7917) + * Do anticompaction in groups (CASSANDRA-6851) + * Support pure user-defined functions (CASSANDRA-7395, 7526, 7562, 7740, 7781, 7929, + 7924, 7812, 8063) + * Permit configurable timestamps with cassandra-stress (CASSANDRA-7416) + * Move sstable RandomAccessReader to nio2, which allows using the + FILE_SHARE_DELETE flag on Windows (CASSANDRA-4050) + * Remove CQL2 (CASSANDRA-5918) + * Add Thrift get_multi_slice call (CASSANDRA-6757) + * Optimize fetching multiple cells by name (CASSANDRA-6933) + * Allow compilation in java 8 (CASSANDRA-7028) + * Make incremental repair default (CASSANDRA-7250) + * Enable code coverage thru JaCoCo (CASSANDRA-7226) + * Switch external naming of 'column families' to 'tables' (CASSANDRA-4369) + * Shorten SSTable path (CASSANDRA-6962) + * Use unsafe mutations for most unit tests (CASSANDRA-6969) + * Fix race condition during calculation of pending ranges (CASSANDRA-7390) + * Fail on very large batch sizes (CASSANDRA-8011) + * improve concurrency of repair (CASSANDRA-6455) + + 2.1.2 + * (cqlsh) Fix SELECT ... TOKEN() function broken in C* 2.1.1 (CASSANDRA-8258) * Fix Cassandra crash when running on JDK8 update 40 (CASSANDRA-8209) * Optimize partitioner tokens (CASSANDRA-8230) * Improve compaction of repaired/unrepaired sstables (CASSANDRA-8004) http://git-wip-us.apache.org/repos/asf/cassandra/blob/8856934f/pylib/cqlshlib/cql3handling.py -- diff --cc pylib/cqlshlib/cql3handling.py index 6d333a4,b1179ca..b2999a7 --- a/pylib/cqlshlib/cql3handling.py +++ b/pylib/cqlshlib/cql3handling.py @@@ -209,7 -206,7 +209,8 @@@ JUNK ::= /([ \t\r\f\v]+|(--|[/][/])[^\n ::= "{" ":" ( "," ":" )* "}" ; - ::= ( ":" ":" )? - ::= | "TOKEN" ++ ::= ( ":" ":" )? ++ | "TOKEN" ; ::=
[3/5] git commit: (cqlsh) SELECT ... TOKEN() function broken in C* 2.1.1
(cqlsh) SELECT ... TOKEN() function broken in C* 2.1.1 patch by Philip Thompson; reviewed by Mikhail Stepura for CASSANDRA-8258 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/85150290 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/85150290 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/85150290 Branch: refs/heads/trunk Commit: 8515029020dba0ac7ddda36832f3aa32a58ca738 Parents: a9f65bc Author: Philip Thompson Authored: Wed Nov 5 15:31:10 2014 -0800 Committer: Mikhail Stepura Committed: Wed Nov 5 15:31:10 2014 -0800 -- CHANGES.txt | 1 + pylib/cqlshlib/cql3handling.py | 2 +- pylib/cqlshlib/test/test_cql_parsing.py | 9 - 3 files changed, 10 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/85150290/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 2b9e10c..ee18be0 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.2 + * (cqlsh) Fix SELECT ... TOKEN() function broken in C* 2.1.1 (CASSANDRA-8258) * Fix Cassandra crash when running on JDK8 update 40 (CASSANDRA-8209) * Optimize partitioner tokens (CASSANDRA-8230) * Improve compaction of repaired/unrepaired sstables (CASSANDRA-8004) http://git-wip-us.apache.org/repos/asf/cassandra/blob/85150290/pylib/cqlshlib/cql3handling.py -- diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py index e12e7e1..b1179ca 100644 --- a/pylib/cqlshlib/cql3handling.py +++ b/pylib/cqlshlib/cql3handling.py @@ -206,7 +206,7 @@ JUNK ::= /([ \t\r\f\v]+|(--|[/][/])[^\n\r]*([\n\r]|$)|[/][*].*?[*][/])/ ; ::= "{" ":" ( "," ":" )* "}" ; - ::= + ::= | "TOKEN" ; ::= http://git-wip-us.apache.org/repos/asf/cassandra/blob/85150290/pylib/cqlshlib/test/test_cql_parsing.py -- diff --git a/pylib/cqlshlib/test/test_cql_parsing.py b/pylib/cqlshlib/test/test_cql_parsing.py index 7e4e6f3..f88b839 100644 --- a/pylib/cqlshlib/test/test_cql_parsing.py +++ b/pylib/cqlshlib/test/test_cql_parsing.py @@ -18,10 +18,12 @@ # for Thrift connections, and $CQL_TEST_PORT to the associated port. from .basecase import BaseTestCase, cqlsh +from .cassconnect import get_test_keyspace, testrun_cqlsh, testcall_cqlsh class TestCqlParsing(BaseTestCase): def setUp(self): -pass +self.cqlsh_runner = testrun_cqlsh(cqlver=cqlsh.DEFAULT_CQLVER, env={'COLUMNS': '10'}) +self.cqlsh = self.cqlsh_runner.__enter__() def tearDown(self): pass @@ -85,3 +87,8 @@ class TestCqlParsing(BaseTestCase): def test_parse_drop_index(self): pass + +def test_parse_select_token(self): +self.cqlsh.cmd_and_response('INSERT INTO has_all_types (num) VALUES (1);') +response = self.cqlsh.cmd_and_response("SELECT token(num) from has_all_types where num=1;") +self.assertIn('-4069959284402364209', response)
[1/5] git commit: Abort liveRatio calculation if the memtable is flushed patch by Oleg Anastasyev; reviewed by jbellis for CASSANDRA-8164
Repository: cassandra Updated Branches: refs/heads/cassandra-2.1 a9f65bcf2 -> 851502902 refs/heads/trunk 19c2d22e9 -> 8856934fc Abort liveRatio calculation if the memtable is flushed patch by Oleg Anastasyev; reviewed by jbellis for CASSANDRA-8164 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/65f79900 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/65f79900 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/65f79900 Branch: refs/heads/trunk Commit: 65f7990085230dd9da9bbae584c6502c8b6c8bf3 Parents: 89257bc Author: Jonathan Ellis Authored: Wed Nov 5 16:45:01 2014 -0600 Committer: Jonathan Ellis Committed: Wed Nov 5 16:45:01 2014 -0600 -- CHANGES.txt| 1 + src/java/org/apache/cassandra/db/Memtable.java | 6 ++ 2 files changed, 7 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/65f79900/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index d5f607f..a469bbf 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.0.12: + * Abort liveRatio calculation if the memtable is flushed (CASSANDRA-8164) * Correctly handle non-text column names in cql3 (CASSANDRA-8178) * Fix deletion for indexes on primary key columns (CASSANDRA-8206) * Add 'nodetool statusgossip' (CASSANDRA-8125) http://git-wip-us.apache.org/repos/asf/cassandra/blob/65f79900/src/java/org/apache/cassandra/db/Memtable.java -- diff --git a/src/java/org/apache/cassandra/db/Memtable.java b/src/java/org/apache/cassandra/db/Memtable.java index 0d55bb2..0b186dc 100644 --- a/src/java/org/apache/cassandra/db/Memtable.java +++ b/src/java/org/apache/cassandra/db/Memtable.java @@ -450,6 +450,12 @@ public class Memtable { deepSize += memtable.meter.measureDeep(entry.getKey()) + memtable.meter.measureDeep(entry.getValue()); objects += entry.getValue().getColumnCount(); + +if (memtable != cfs.getMemtableThreadSafe()) +{ +// this memtable is flushing or already flushed +return; +} } double newRatio = (double) deepSize / memtable.currentSize.get();
[2/3] git commit: Add junitreport target.
Add junitreport target. patch by Mikhail Stepura; reviewed by Brandon Williams and Michael Shuler for CASSANDRA-6482 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a8072ae3 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a8072ae3 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a8072ae3 Branch: refs/heads/trunk Commit: a8072ae3befcac147271418ce5879b23bbba5aff Parents: 25be464 Author: Mikhail Stepura Authored: Mon Nov 3 13:58:05 2014 -0800 Committer: Mikhail Stepura Committed: Mon Nov 3 14:45:46 2014 -0800 -- build.xml | 6 ++ 1 file changed, 6 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/a8072ae3/build.xml -- diff --git a/build.xml b/build.xml index 84b10ed..9562a37 100644 --- a/build.xml +++ b/build.xml @@ -1128,6 +1128,12 @@ + + + + + +
[1/3] git commit: Add junitreport target.
Repository: cassandra Updated Branches: refs/heads/cassandra-2.1 25be46497 -> a8072ae3b refs/heads/trunk c93cbb295 -> 02a20f70b Add junitreport target. patch by Mikhail Stepura; reviewed by Brandon Williams and Michael Shuler for CASSANDRA-6482 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a8072ae3 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a8072ae3 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a8072ae3 Branch: refs/heads/cassandra-2.1 Commit: a8072ae3befcac147271418ce5879b23bbba5aff Parents: 25be464 Author: Mikhail Stepura Authored: Mon Nov 3 13:58:05 2014 -0800 Committer: Mikhail Stepura Committed: Mon Nov 3 14:45:46 2014 -0800 -- build.xml | 6 ++ 1 file changed, 6 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/a8072ae3/build.xml -- diff --git a/build.xml b/build.xml index 84b10ed..9562a37 100644 --- a/build.xml +++ b/build.xml @@ -1128,6 +1128,12 @@ + + + + + +
[3/3] git commit: Merge branch 'cassandra-2.1' into trunk
Merge branch 'cassandra-2.1' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/02a20f70 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/02a20f70 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/02a20f70 Branch: refs/heads/trunk Commit: 02a20f70b0c3ae3b904cb1879927463fb5f8a85b Parents: c93cbb2 a8072ae Author: Mikhail Stepura Authored: Mon Nov 3 14:46:20 2014 -0800 Committer: Mikhail Stepura Committed: Mon Nov 3 14:46:20 2014 -0800 -- build.xml | 6 ++ 1 file changed, 6 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/02a20f70/build.xml --
[6/6] git commit: Merge branch 'cassandra-2.1' into trunk
Merge branch 'cassandra-2.1' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/13c4719f Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/13c4719f Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/13c4719f Branch: refs/heads/trunk Commit: 13c4719f772bc43d15a22f903f6c46353a0fc349 Parents: c55cbc7 e57d027 Author: Mikhail Stepura Authored: Tue Oct 14 10:38:42 2014 -0700 Committer: Mikhail Stepura Committed: Tue Oct 14 10:38:42 2014 -0700 -- CHANGES.txt| 1 + pylib/cqlshlib/cql3handling.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/13c4719f/CHANGES.txt -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/13c4719f/pylib/cqlshlib/cql3handling.py --
[4/6] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1
Merge branch 'cassandra-2.0' into cassandra-2.1 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/e57d027c Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e57d027c Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e57d027c Branch: refs/heads/trunk Commit: e57d027c94ad6e0c447cd3162e92517db017ee25 Parents: b76dc97 1d02d7b Author: Mikhail Stepura Authored: Tue Oct 14 10:38:30 2014 -0700 Committer: Mikhail Stepura Committed: Tue Oct 14 10:38:30 2014 -0700 -- CHANGES.txt| 1 + pylib/cqlshlib/cql3handling.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/e57d027c/CHANGES.txt -- diff --cc CHANGES.txt index bbe6982,8b462f1..74647c8 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,76 -1,5 +1,77 @@@ -2.0.11: +2.1.1 + * Fix high memory use due to tracking reads on incrementally opened sstable readers (CASSANDRA-8066) + * Fix EXECUTE request with skipMetadata=false returning no metadata + (CASSANDRA-8054) + * Allow concurrent use of CQLBulkOutputFormat (CASSANDRA-7776) + * Shutdown JVM on OOM (CASSANDRA-7507) + * Upgrade netty version and enable epoll event loop (CASSANDRA-7761) + * Don't duplicate sstables smaller than split size when using + the sstablesplitter tool (CASSANDRA-7616) + * Avoid re-parsing already prepared statements (CASSANDRA-7923) + * Fix some Thrift slice deletions and updates of COMPACT STORAGE + tables with some clustering columns omitted (CASSANDRA-7990) + * Fix filtering for CONTAINS on sets (CASSANDRA-8033) + * Properly track added size (CASSANDRA-7239) + * Allow compilation in java 8 (CASSANDRA-7208) + * Fix Assertion error on RangeTombstoneList diff (CASSANDRA-8013) + * Release references to overlapping sstables during compaction (CASSANDRA-7819) + * Send notification when opening compaction results early (CASSANDRA-8034) + * Make native server start block until properly bound (CASSANDRA-7885) + * (cqlsh) Fix IPv6 support (CASSANDRA-7988) + * Ignore fat clients when checking for endpoint collision (CASSANDRA-7939) + * Make sstablerepairedset take a list of files (CASSANDRA-7995) + * (cqlsh) Tab completeion for indexes on map keys (CASSANDRA-7972) + * (cqlsh) Fix UDT field selection in select clause (CASSANDRA-7891) + * Fix resource leak in event of corrupt sstable + * (cqlsh) Add command line option for cqlshrc file path (CASSANDRA-7131) + * Provide visibility into prepared statements churn (CASSANDRA-7921, CASSANDRA-7930) + * Invalidate prepared statements when their keyspace or table is + dropped (CASSANDRA-7566) + * cassandra-stress: fix support for NetworkTopologyStrategy (CASSANDRA-7945) + * Fix saving caches when a table is dropped (CASSANDRA-7784) + * Add better error checking of new stress profile (CASSANDRA-7716) + * Use ThreadLocalRandom and remove FBUtilities.threadLocalRandom (CASSANDRA-7934) + * Prevent operator mistakes due to simultaneous bootstrap (CASSANDRA-7069) + * cassandra-stress supports whitelist mode for node config (CASSANDRA-7658) + * GCInspector more closely tracks GC; cassandra-stress and nodetool report it (CASSANDRA-7916) + * nodetool won't output bogus ownership info without a keyspace (CASSANDRA-7173) + * Add human readable option to nodetool commands (CASSANDRA-5433) + * Don't try to set repairedAt on old sstables (CASSANDRA-7913) + * Add metrics for tracking PreparedStatement use (CASSANDRA-7719) + * (cqlsh) tab-completion for triggers (CASSANDRA-7824) + * (cqlsh) Support for query paging (CASSANDRA-7514) + * (cqlsh) Show progress of COPY operations (CASSANDRA-7789) + * Add syntax to remove multiple elements from a map (CASSANDRA-6599) + * Support non-equals conditions in lightweight transactions (CASSANDRA-6839) + * Add IF [NOT] EXISTS to create/drop triggers (CASSANDRA-7606) + * (cqlsh) Display the current logged-in user (CASSANDRA-7785) + * (cqlsh) Don't ignore CTRL-C during COPY FROM execution (CASSANDRA-7815) + * (cqlsh) Order UDTs according to cross-type dependencies in DESCRIBE + output (CASSANDRA-7659) + * (cqlsh) Fix handling of CAS statement results (CASSANDRA-7671) + * (cqlsh) COPY TO/FROM improvements (CASSANDRA-7405) + * Support list index operations with conditions (CASSANDRA-7499) + * Add max live/tombstoned cells to nodetool cfstats output (CASSANDRA-7731) + * Validate IPv6 wildcard addresses properly (CASSANDRA-7680) + * (cqlsh) Error when tracing query (CASSANDRA-7613) + * Avoid IOOBE when building SyntaxError message snippet (CASSANDRA-7569) + * SSTableExport uses correct validator to create string representation of partition + keys (CASSANDRA-74
[2/6] git commit: Fix autocompletion for alter keyspace
Fix autocompletion for alter keyspace patch by Rajanarayanan Thottuvaikkatumana; reviewed by Mikhail Stepura for CASSANDRA-8021 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/1d02d7b3 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/1d02d7b3 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/1d02d7b3 Branch: refs/heads/cassandra-2.1 Commit: 1d02d7b34eafd0594ffc87608ac816fb5af39b89 Parents: cc8eeef Author: Rajanarayanan Thottuvaikkatumana Authored: Tue Oct 14 10:36:53 2014 -0700 Committer: Mikhail Stepura Committed: Tue Oct 14 10:36:53 2014 -0700 -- CHANGES.txt| 1 + pylib/cqlshlib/cql3handling.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/1d02d7b3/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 2faea63..8b462f1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.0.11: + * (cqlsh) Fix autocompletion for alter keyspace (CASSANDRA-8021) * Create backup directories for commitlog archiving during startup (CASSANDRA-8111) * Reduce totalBlockFor() for LOCAL_* consistency levels (CASSANDRA-8058) * Fix merging schemas with re-dropped keyspaces (CASSANDRA-7256) http://git-wip-us.apache.org/repos/asf/cassandra/blob/1d02d7b3/pylib/cqlshlib/cql3handling.py -- diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py index 01818ca..c08088a 100644 --- a/pylib/cqlshlib/cql3handling.py +++ b/pylib/cqlshlib/cql3handling.py @@ -993,7 +993,7 @@ def alter_table_col_completer(ctxt, cass): explain_completion('alterInstructions', 'newcol', '') syntax_rules += r''' - ::= "ALTER" ( "KEYSPACE" | "SCHEMA" ) ks= + ::= "ALTER" wat=( "KEYSPACE" | "SCHEMA" ) ks= "WITH" ( "AND" )* ; '''
[3/6] git commit: Fix autocompletion for alter keyspace
Fix autocompletion for alter keyspace patch by Rajanarayanan Thottuvaikkatumana; reviewed by Mikhail Stepura for CASSANDRA-8021 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/1d02d7b3 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/1d02d7b3 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/1d02d7b3 Branch: refs/heads/trunk Commit: 1d02d7b34eafd0594ffc87608ac816fb5af39b89 Parents: cc8eeef Author: Rajanarayanan Thottuvaikkatumana Authored: Tue Oct 14 10:36:53 2014 -0700 Committer: Mikhail Stepura Committed: Tue Oct 14 10:36:53 2014 -0700 -- CHANGES.txt| 1 + pylib/cqlshlib/cql3handling.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/1d02d7b3/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 2faea63..8b462f1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.0.11: + * (cqlsh) Fix autocompletion for alter keyspace (CASSANDRA-8021) * Create backup directories for commitlog archiving during startup (CASSANDRA-8111) * Reduce totalBlockFor() for LOCAL_* consistency levels (CASSANDRA-8058) * Fix merging schemas with re-dropped keyspaces (CASSANDRA-7256) http://git-wip-us.apache.org/repos/asf/cassandra/blob/1d02d7b3/pylib/cqlshlib/cql3handling.py -- diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py index 01818ca..c08088a 100644 --- a/pylib/cqlshlib/cql3handling.py +++ b/pylib/cqlshlib/cql3handling.py @@ -993,7 +993,7 @@ def alter_table_col_completer(ctxt, cass): explain_completion('alterInstructions', 'newcol', '') syntax_rules += r''' - ::= "ALTER" ( "KEYSPACE" | "SCHEMA" ) ks= + ::= "ALTER" wat=( "KEYSPACE" | "SCHEMA" ) ks= "WITH" ( "AND" )* ; '''
[5/6] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1
Merge branch 'cassandra-2.0' into cassandra-2.1 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/e57d027c Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e57d027c Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e57d027c Branch: refs/heads/cassandra-2.1 Commit: e57d027c94ad6e0c447cd3162e92517db017ee25 Parents: b76dc97 1d02d7b Author: Mikhail Stepura Authored: Tue Oct 14 10:38:30 2014 -0700 Committer: Mikhail Stepura Committed: Tue Oct 14 10:38:30 2014 -0700 -- CHANGES.txt| 1 + pylib/cqlshlib/cql3handling.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/e57d027c/CHANGES.txt -- diff --cc CHANGES.txt index bbe6982,8b462f1..74647c8 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,76 -1,5 +1,77 @@@ -2.0.11: +2.1.1 + * Fix high memory use due to tracking reads on incrementally opened sstable readers (CASSANDRA-8066) + * Fix EXECUTE request with skipMetadata=false returning no metadata + (CASSANDRA-8054) + * Allow concurrent use of CQLBulkOutputFormat (CASSANDRA-7776) + * Shutdown JVM on OOM (CASSANDRA-7507) + * Upgrade netty version and enable epoll event loop (CASSANDRA-7761) + * Don't duplicate sstables smaller than split size when using + the sstablesplitter tool (CASSANDRA-7616) + * Avoid re-parsing already prepared statements (CASSANDRA-7923) + * Fix some Thrift slice deletions and updates of COMPACT STORAGE + tables with some clustering columns omitted (CASSANDRA-7990) + * Fix filtering for CONTAINS on sets (CASSANDRA-8033) + * Properly track added size (CASSANDRA-7239) + * Allow compilation in java 8 (CASSANDRA-7208) + * Fix Assertion error on RangeTombstoneList diff (CASSANDRA-8013) + * Release references to overlapping sstables during compaction (CASSANDRA-7819) + * Send notification when opening compaction results early (CASSANDRA-8034) + * Make native server start block until properly bound (CASSANDRA-7885) + * (cqlsh) Fix IPv6 support (CASSANDRA-7988) + * Ignore fat clients when checking for endpoint collision (CASSANDRA-7939) + * Make sstablerepairedset take a list of files (CASSANDRA-7995) + * (cqlsh) Tab completeion for indexes on map keys (CASSANDRA-7972) + * (cqlsh) Fix UDT field selection in select clause (CASSANDRA-7891) + * Fix resource leak in event of corrupt sstable + * (cqlsh) Add command line option for cqlshrc file path (CASSANDRA-7131) + * Provide visibility into prepared statements churn (CASSANDRA-7921, CASSANDRA-7930) + * Invalidate prepared statements when their keyspace or table is + dropped (CASSANDRA-7566) + * cassandra-stress: fix support for NetworkTopologyStrategy (CASSANDRA-7945) + * Fix saving caches when a table is dropped (CASSANDRA-7784) + * Add better error checking of new stress profile (CASSANDRA-7716) + * Use ThreadLocalRandom and remove FBUtilities.threadLocalRandom (CASSANDRA-7934) + * Prevent operator mistakes due to simultaneous bootstrap (CASSANDRA-7069) + * cassandra-stress supports whitelist mode for node config (CASSANDRA-7658) + * GCInspector more closely tracks GC; cassandra-stress and nodetool report it (CASSANDRA-7916) + * nodetool won't output bogus ownership info without a keyspace (CASSANDRA-7173) + * Add human readable option to nodetool commands (CASSANDRA-5433) + * Don't try to set repairedAt on old sstables (CASSANDRA-7913) + * Add metrics for tracking PreparedStatement use (CASSANDRA-7719) + * (cqlsh) tab-completion for triggers (CASSANDRA-7824) + * (cqlsh) Support for query paging (CASSANDRA-7514) + * (cqlsh) Show progress of COPY operations (CASSANDRA-7789) + * Add syntax to remove multiple elements from a map (CASSANDRA-6599) + * Support non-equals conditions in lightweight transactions (CASSANDRA-6839) + * Add IF [NOT] EXISTS to create/drop triggers (CASSANDRA-7606) + * (cqlsh) Display the current logged-in user (CASSANDRA-7785) + * (cqlsh) Don't ignore CTRL-C during COPY FROM execution (CASSANDRA-7815) + * (cqlsh) Order UDTs according to cross-type dependencies in DESCRIBE + output (CASSANDRA-7659) + * (cqlsh) Fix handling of CAS statement results (CASSANDRA-7671) + * (cqlsh) COPY TO/FROM improvements (CASSANDRA-7405) + * Support list index operations with conditions (CASSANDRA-7499) + * Add max live/tombstoned cells to nodetool cfstats output (CASSANDRA-7731) + * Validate IPv6 wildcard addresses properly (CASSANDRA-7680) + * (cqlsh) Error when tracing query (CASSANDRA-7613) + * Avoid IOOBE when building SyntaxError message snippet (CASSANDRA-7569) + * SSTableExport uses correct validator to create string representation of partition + keys (CASS
[1/6] git commit: Fix autocompletion for alter keyspace
Repository: cassandra Updated Branches: refs/heads/cassandra-2.0 cc8eeefe8 -> 1d02d7b34 refs/heads/cassandra-2.1 b76dc9727 -> e57d027c9 refs/heads/trunk c55cbc763 -> 13c4719f7 Fix autocompletion for alter keyspace patch by Rajanarayanan Thottuvaikkatumana; reviewed by Mikhail Stepura for CASSANDRA-8021 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/1d02d7b3 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/1d02d7b3 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/1d02d7b3 Branch: refs/heads/cassandra-2.0 Commit: 1d02d7b34eafd0594ffc87608ac816fb5af39b89 Parents: cc8eeef Author: Rajanarayanan Thottuvaikkatumana Authored: Tue Oct 14 10:36:53 2014 -0700 Committer: Mikhail Stepura Committed: Tue Oct 14 10:36:53 2014 -0700 -- CHANGES.txt| 1 + pylib/cqlshlib/cql3handling.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/1d02d7b3/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 2faea63..8b462f1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.0.11: + * (cqlsh) Fix autocompletion for alter keyspace (CASSANDRA-8021) * Create backup directories for commitlog archiving during startup (CASSANDRA-8111) * Reduce totalBlockFor() for LOCAL_* consistency levels (CASSANDRA-8058) * Fix merging schemas with re-dropped keyspaces (CASSANDRA-7256) http://git-wip-us.apache.org/repos/asf/cassandra/blob/1d02d7b3/pylib/cqlshlib/cql3handling.py -- diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py index 01818ca..c08088a 100644 --- a/pylib/cqlshlib/cql3handling.py +++ b/pylib/cqlshlib/cql3handling.py @@ -993,7 +993,7 @@ def alter_table_col_completer(ctxt, cass): explain_completion('alterInstructions', 'newcol', '') syntax_rules += r''' - ::= "ALTER" ( "KEYSPACE" | "SCHEMA" ) ks= + ::= "ALTER" wat=( "KEYSPACE" | "SCHEMA" ) ks= "WITH" ( "AND" )* ; '''
[2/3] git commit: (cqlsh) Tab completeion for indexes on map keys.
(cqlsh) Tab completeion for indexes on map keys. patch by Philip Thompson; reviewed by Mikhail Stepura for CASSANDRA-7972 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6e5dd232 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6e5dd232 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6e5dd232 Branch: refs/heads/trunk Commit: 6e5dd2329d61eaea47e857c4660d61acfe2d7ff5 Parents: 7e49ed3 Author: Philip Thompson Authored: Fri Sep 19 18:23:58 2014 -0700 Committer: Mikhail Stepura Committed: Fri Sep 19 18:23:58 2014 -0700 -- CHANGES.txt| 1 + pylib/cqlshlib/cql3handling.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/6e5dd232/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 7384829..2f8a95b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.1 + * (cqlsh) Tab completeion for indexes on map keys (CASSANDRA-7972) * (cqlsh) Fix UDT field selection in select clause (CASSANDRA-7891) * Fix resource leak in event of corrupt sstable * (cqlsh) Add command line option for cqlshrc file path (CASSANDRA-7131) http://git-wip-us.apache.org/repos/asf/cassandra/blob/6e5dd232/pylib/cqlshlib/cql3handling.py -- diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py index 994f358..0b5cc8f 100644 --- a/pylib/cqlshlib/cql3handling.py +++ b/pylib/cqlshlib/cql3handling.py @@ -982,7 +982,7 @@ def create_cf_composite_primary_key_comma_completer(ctxt, cass): syntax_rules += r''' ::= "CREATE" "CUSTOM"? "INDEX" ("IF" "NOT" "EXISTS")? indexname=? "ON" - cf= "(" col= ")" + cf= ( "(" col= ")" | "(" "KEYS" "(" col= ")" ")") ( "USING" ( "WITH" "OPTIONS" "=" )? )? ;
[3/3] git commit: Merge branch 'cassandra-2.1' into trunk
Merge branch 'cassandra-2.1' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/cfb7acea Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/cfb7acea Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/cfb7acea Branch: refs/heads/trunk Commit: cfb7aceac5f4c53767c1f1b95656c0ca33946851 Parents: 2a59f81 6e5dd23 Author: Mikhail Stepura Authored: Fri Sep 19 18:24:17 2014 -0700 Committer: Mikhail Stepura Committed: Fri Sep 19 18:24:17 2014 -0700 -- CHANGES.txt| 1 + pylib/cqlshlib/cql3handling.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/cfb7acea/CHANGES.txt -- diff --cc CHANGES.txt index a55488f,2f8a95b..0f94df9 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,29 -1,5 +1,30 @@@ +3.0 + * Make assassinate a first class command (CASSANDRA-7935) + * Support IN clause on any clustering column (CASSANDRA-4762) + * Improve compaction logging (CASSANDRA-7818) + * Remove YamlFileNetworkTopologySnitch (CASSANDRA-7917) + * Support Java source code for user-defined functions (CASSANDRA-7562) + * Require arg types to disambiguate UDF drops (CASSANDRA-7812) + * Do anticompaction in groups (CASSANDRA-6851) + * Verify that UDF class methods are static (CASSANDRA-7781) + * Support pure user-defined functions (CASSANDRA-7395, 7740) + * Permit configurable timestamps with cassandra-stress (CASSANDRA-7416) + * Move sstable RandomAccessReader to nio2, which allows using the + FILE_SHARE_DELETE flag on Windows (CASSANDRA-4050) + * Remove CQL2 (CASSANDRA-5918) + * Add Thrift get_multi_slice call (CASSANDRA-6757) + * Optimize fetching multiple cells by name (CASSANDRA-6933) + * Allow compilation in java 8 (CASSANDRA-7028) + * Make incremental repair default (CASSANDRA-7250) + * Enable code coverage thru JaCoCo (CASSANDRA-7226) + * Switch external naming of 'column families' to 'tables' (CASSANDRA-4369) + * Shorten SSTable path (CASSANDRA-6962) + * Use unsafe mutations for most unit tests (CASSANDRA-6969) + * Fix race condition during calculation of pending ranges (CASSANDRA-7390) + + 2.1.1 + * (cqlsh) Tab completeion for indexes on map keys (CASSANDRA-7972) * (cqlsh) Fix UDT field selection in select clause (CASSANDRA-7891) * Fix resource leak in event of corrupt sstable * (cqlsh) Add command line option for cqlshrc file path (CASSANDRA-7131) http://git-wip-us.apache.org/repos/asf/cassandra/blob/cfb7acea/pylib/cqlshlib/cql3handling.py --
[1/3] git commit: (cqlsh) Tab completeion for indexes on map keys.
Repository: cassandra Updated Branches: refs/heads/cassandra-2.1 7e49ed3e0 -> 6e5dd2329 refs/heads/trunk 2a59f815e -> cfb7aceac (cqlsh) Tab completeion for indexes on map keys. patch by Philip Thompson; reviewed by Mikhail Stepura for CASSANDRA-7972 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6e5dd232 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6e5dd232 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6e5dd232 Branch: refs/heads/cassandra-2.1 Commit: 6e5dd2329d61eaea47e857c4660d61acfe2d7ff5 Parents: 7e49ed3 Author: Philip Thompson Authored: Fri Sep 19 18:23:58 2014 -0700 Committer: Mikhail Stepura Committed: Fri Sep 19 18:23:58 2014 -0700 -- CHANGES.txt| 1 + pylib/cqlshlib/cql3handling.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/6e5dd232/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 7384829..2f8a95b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.1 + * (cqlsh) Tab completeion for indexes on map keys (CASSANDRA-7972) * (cqlsh) Fix UDT field selection in select clause (CASSANDRA-7891) * Fix resource leak in event of corrupt sstable * (cqlsh) Add command line option for cqlshrc file path (CASSANDRA-7131) http://git-wip-us.apache.org/repos/asf/cassandra/blob/6e5dd232/pylib/cqlshlib/cql3handling.py -- diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py index 994f358..0b5cc8f 100644 --- a/pylib/cqlshlib/cql3handling.py +++ b/pylib/cqlshlib/cql3handling.py @@ -982,7 +982,7 @@ def create_cf_composite_primary_key_comma_completer(ctxt, cass): syntax_rules += r''' ::= "CREATE" "CUSTOM"? "INDEX" ("IF" "NOT" "EXISTS")? indexname=? "ON" - cf= "(" col= ")" + cf= ( "(" col= ")" | "(" "KEYS" "(" col= ")" ")") ( "USING" ( "WITH" "OPTIONS" "=" )? )? ;
[1/3] git commit: (cqlsh) Add command line option for cqlshrc file path.
Repository: cassandra Updated Branches: refs/heads/cassandra-2.1 3dd2f0064 -> 146b8e397 refs/heads/trunk a810c477d -> e9f94447e (cqlsh) Add command line option for cqlshrc file path. patch by Aaron Ploetz; reviewed by Mikhail Stepura for CASSANDRA-7131 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/146b8e39 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/146b8e39 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/146b8e39 Branch: refs/heads/cassandra-2.1 Commit: 146b8e39777ec19f9651d65caec00bb6c7c033c6 Parents: 3dd2f00 Author: Aaron Ploetz Authored: Thu Sep 18 13:30:43 2014 -0700 Committer: Mikhail Stepura Committed: Thu Sep 18 13:30:43 2014 -0700 -- CHANGES.txt | 1 + bin/cqlsh | 46 ++ 2 files changed, 31 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/146b8e39/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index dfcd36d..a34e0b1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.1 + * (cqlsh) Add command line option for cqlshrc file path (CASSANDRA-7131) * Provide visibility into prepared statements churn (CASSANDRA-7921) * Invalidate prepared statements when their keyspace or table is dropped (CASSANDRA-7566) http://git-wip-us.apache.org/repos/asf/cassandra/blob/146b8e39/bin/cqlsh -- diff --git a/bin/cqlsh b/bin/cqlsh index fa5de05..763a828 100755 --- a/bin/cqlsh +++ b/bin/cqlsh @@ -124,22 +124,6 @@ from cqlshlib.formatting import format_by_type, formatter_for, format_value_utyp from cqlshlib.util import trim_if_present from cqlshlib.tracing import print_trace_session, print_trace -HISTORY_DIR = os.path.expanduser(os.path.join('~', '.cassandra')) -CONFIG_FILE = os.path.join(HISTORY_DIR, 'cqlshrc') -HISTORY = os.path.join(HISTORY_DIR, 'cqlsh_history') -if not os.path.exists(HISTORY_DIR): -try: -os.mkdir(HISTORY_DIR) -except OSError: -print '\nWarning: Cannot create directory at `%s`. Command history will not be saved.\n' % HISTORY_DIR - -OLD_CONFIG_FILE = os.path.expanduser(os.path.join('~', '.cqlshrc')) -if os.path.exists(OLD_CONFIG_FILE): -os.rename(OLD_CONFIG_FILE, CONFIG_FILE) -OLD_HISTORY = os.path.expanduser(os.path.join('~', '.cqlsh_history')) -if os.path.exists(OLD_HISTORY): -os.rename(OLD_HISTORY, HISTORY) - DEFAULT_HOST = '127.0.0.1' DEFAULT_PORT = 9042 DEFAULT_CQLVER = '3.2.0' @@ -173,11 +157,41 @@ parser.add_option('-k', '--keyspace', help='Authenticate to the given keyspace.' parser.add_option("-f", "--file", help="Execute commands from FILE, then exit") parser.add_option('--debug', action='store_true', help='Show additional debugging information') +parser.add_option("--cqlshrc", help="Specify an alternative cqlshrc file location.") parser.add_option('--cqlversion', default=DEFAULT_CQLVER, help='Specify a particular CQL version (default: %default).' ' Examples: "3.0.3", "3.1.0"') parser.add_option("-e", "--execute", help='Execute the statement and quit.') +optvalues = optparse.Values() +(options, arguments) = parser.parse_args(sys.argv[1:], values=optvalues) + +#BEGIN history/config definition +HISTORY_DIR = os.path.expanduser(os.path.join('~', '.cassandra')) + +if hasattr(options, 'cqlshrc'): +CONFIG_FILE = options.cqlshrc +if not os.path.exists(CONFIG_FILE): +print '\nWarning: Specified cqlshrc location `%s` does not exist. Using `%s` instead.\n' % (CONFIG_FILE, HISTORY_DIR) +CONFIG_FILE = os.path.join(HISTORY_DIR, 'cqlshrc') +else: +CONFIG_FILE = os.path.join(HISTORY_DIR, 'cqlshrc') + +HISTORY = os.path.join(HISTORY_DIR, 'cqlsh_history') +if not os.path.exists(HISTORY_DIR): +try: +os.mkdir(HISTORY_DIR) +except OSError: +print '\nWarning: Cannot create directory at `%s`. Command history will not be saved.\n' % HISTORY_DIR + +OLD_CONFIG_FILE = os.path.expanduser(os.path.join('~', '.cqlshrc')) +if os.path.exists(OLD_CONFIG_FILE): +os.rename(OLD_CONFIG_FILE, CONFIG_FILE) +OLD_HISTORY = os.path.expanduser(os.path.join('~', '.cqlsh_history')) +if os.path.exists(OLD_HISTORY): +os.rename(OLD_HISTORY, HISTORY) +#END history/config definition + CQL_ERRORS = ( cassandra.AlreadyExists, cassandra.AuthenticationFailed, cassandra.InvalidRequest, cassandra.Timeout, cassandra.Unauthorized, cassandra.OperationTimedOut,
[3/3] git commit: Merge branch 'cassandra-2.1' into trunk
Merge branch 'cassandra-2.1' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/e9f94447 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e9f94447 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e9f94447 Branch: refs/heads/trunk Commit: e9f94447ed3f53b5f6050dda6772f44c5daaabc1 Parents: a810c47 146b8e3 Author: Mikhail Stepura Authored: Thu Sep 18 13:31:08 2014 -0700 Committer: Mikhail Stepura Committed: Thu Sep 18 13:31:08 2014 -0700 -- CHANGES.txt | 1 + bin/cqlsh | 46 ++ 2 files changed, 31 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/e9f94447/CHANGES.txt -- diff --cc CHANGES.txt index 254fe2b,a34e0b1..ddc115e --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,29 -1,5 +1,30 @@@ +3.0 + * Make assassinate a first class command (CASSANDRA-7935) + * Support IN clause on any clustering column (CASSANDRA-4762) + * Improve compaction logging (CASSANDRA-7818) + * Remove YamlFileNetworkTopologySnitch (CASSANDRA-7917) + * Support Java source code for user-defined functions (CASSANDRA-7562) + * Require arg types to disambiguate UDF drops (CASSANDRA-7812) + * Do anticompaction in groups (CASSANDRA-6851) + * Verify that UDF class methods are static (CASSANDRA-7781) + * Support pure user-defined functions (CASSANDRA-7395, 7740) + * Permit configurable timestamps with cassandra-stress (CASSANDRA-7416) + * Move sstable RandomAccessReader to nio2, which allows using the + FILE_SHARE_DELETE flag on Windows (CASSANDRA-4050) + * Remove CQL2 (CASSANDRA-5918) + * Add Thrift get_multi_slice call (CASSANDRA-6757) + * Optimize fetching multiple cells by name (CASSANDRA-6933) + * Allow compilation in java 8 (CASSANDRA-7028) + * Make incremental repair default (CASSANDRA-7250) + * Enable code coverage thru JaCoCo (CASSANDRA-7226) + * Switch external naming of 'column families' to 'tables' (CASSANDRA-4369) + * Shorten SSTable path (CASSANDRA-6962) + * Use unsafe mutations for most unit tests (CASSANDRA-6969) + * Fix race condition during calculation of pending ranges (CASSANDRA-7390) + + 2.1.1 + * (cqlsh) Add command line option for cqlshrc file path (CASSANDRA-7131) * Provide visibility into prepared statements churn (CASSANDRA-7921) * Invalidate prepared statements when their keyspace or table is dropped (CASSANDRA-7566)
[2/3] git commit: (cqlsh) Add command line option for cqlshrc file path.
(cqlsh) Add command line option for cqlshrc file path. patch by Aaron Ploetz; reviewed by Mikhail Stepura for CASSANDRA-7131 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/146b8e39 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/146b8e39 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/146b8e39 Branch: refs/heads/trunk Commit: 146b8e39777ec19f9651d65caec00bb6c7c033c6 Parents: 3dd2f00 Author: Aaron Ploetz Authored: Thu Sep 18 13:30:43 2014 -0700 Committer: Mikhail Stepura Committed: Thu Sep 18 13:30:43 2014 -0700 -- CHANGES.txt | 1 + bin/cqlsh | 46 ++ 2 files changed, 31 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/146b8e39/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index dfcd36d..a34e0b1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.1 + * (cqlsh) Add command line option for cqlshrc file path (CASSANDRA-7131) * Provide visibility into prepared statements churn (CASSANDRA-7921) * Invalidate prepared statements when their keyspace or table is dropped (CASSANDRA-7566) http://git-wip-us.apache.org/repos/asf/cassandra/blob/146b8e39/bin/cqlsh -- diff --git a/bin/cqlsh b/bin/cqlsh index fa5de05..763a828 100755 --- a/bin/cqlsh +++ b/bin/cqlsh @@ -124,22 +124,6 @@ from cqlshlib.formatting import format_by_type, formatter_for, format_value_utyp from cqlshlib.util import trim_if_present from cqlshlib.tracing import print_trace_session, print_trace -HISTORY_DIR = os.path.expanduser(os.path.join('~', '.cassandra')) -CONFIG_FILE = os.path.join(HISTORY_DIR, 'cqlshrc') -HISTORY = os.path.join(HISTORY_DIR, 'cqlsh_history') -if not os.path.exists(HISTORY_DIR): -try: -os.mkdir(HISTORY_DIR) -except OSError: -print '\nWarning: Cannot create directory at `%s`. Command history will not be saved.\n' % HISTORY_DIR - -OLD_CONFIG_FILE = os.path.expanduser(os.path.join('~', '.cqlshrc')) -if os.path.exists(OLD_CONFIG_FILE): -os.rename(OLD_CONFIG_FILE, CONFIG_FILE) -OLD_HISTORY = os.path.expanduser(os.path.join('~', '.cqlsh_history')) -if os.path.exists(OLD_HISTORY): -os.rename(OLD_HISTORY, HISTORY) - DEFAULT_HOST = '127.0.0.1' DEFAULT_PORT = 9042 DEFAULT_CQLVER = '3.2.0' @@ -173,11 +157,41 @@ parser.add_option('-k', '--keyspace', help='Authenticate to the given keyspace.' parser.add_option("-f", "--file", help="Execute commands from FILE, then exit") parser.add_option('--debug', action='store_true', help='Show additional debugging information') +parser.add_option("--cqlshrc", help="Specify an alternative cqlshrc file location.") parser.add_option('--cqlversion', default=DEFAULT_CQLVER, help='Specify a particular CQL version (default: %default).' ' Examples: "3.0.3", "3.1.0"') parser.add_option("-e", "--execute", help='Execute the statement and quit.') +optvalues = optparse.Values() +(options, arguments) = parser.parse_args(sys.argv[1:], values=optvalues) + +#BEGIN history/config definition +HISTORY_DIR = os.path.expanduser(os.path.join('~', '.cassandra')) + +if hasattr(options, 'cqlshrc'): +CONFIG_FILE = options.cqlshrc +if not os.path.exists(CONFIG_FILE): +print '\nWarning: Specified cqlshrc location `%s` does not exist. Using `%s` instead.\n' % (CONFIG_FILE, HISTORY_DIR) +CONFIG_FILE = os.path.join(HISTORY_DIR, 'cqlshrc') +else: +CONFIG_FILE = os.path.join(HISTORY_DIR, 'cqlshrc') + +HISTORY = os.path.join(HISTORY_DIR, 'cqlsh_history') +if not os.path.exists(HISTORY_DIR): +try: +os.mkdir(HISTORY_DIR) +except OSError: +print '\nWarning: Cannot create directory at `%s`. Command history will not be saved.\n' % HISTORY_DIR + +OLD_CONFIG_FILE = os.path.expanduser(os.path.join('~', '.cqlshrc')) +if os.path.exists(OLD_CONFIG_FILE): +os.rename(OLD_CONFIG_FILE, CONFIG_FILE) +OLD_HISTORY = os.path.expanduser(os.path.join('~', '.cqlsh_history')) +if os.path.exists(OLD_HISTORY): +os.rename(OLD_HISTORY, HISTORY) +#END history/config definition + CQL_ERRORS = ( cassandra.AlreadyExists, cassandra.AuthenticationFailed, cassandra.InvalidRequest, cassandra.Timeout, cassandra.Unauthorized, cassandra.OperationTimedOut,
[2/6] git commit: Ninja: fixed CHANGES.txt for CASSANDRA-7828
Ninja: fixed CHANGES.txt for CASSANDRA-7828 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f0d7802a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f0d7802a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f0d7802a Branch: refs/heads/cassandra-2.1 Commit: f0d7802a008d4b1cb4b742c97bf2263379e78dc6 Parents: 8aa3c3a Author: Mikhail Stepura Authored: Tue Sep 9 15:22:35 2014 -0700 Committer: Mikhail Stepura Committed: Tue Sep 9 15:22:35 2014 -0700 -- CHANGES.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f0d7802a/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 747df0d..273fed9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,8 @@ * Always send Paxos commit to all replicas (CASSANDRA-7479) * Make disruptor_thrift_server invocation pool configurable (CASSANDRA-7594) * Make repair no-op when RF=1 (CASSANDRA-7864) +Merged from 1.2: + * Don't index tombstones (CASSANDRA-7828) 2.0.10 @@ -81,7 +83,6 @@ * Fix sstableloader unable to connect encrypted node (CASSANDRA-7585) * Make StreamReceiveTask thread safe and gc friendly (CASSANDRA-7795) Merged from 1.2: - * Don't index tombstones (CASSANDRA-7828 * Don't allow compacted sstables to be marked as compacting (CASSANDRA-7145) * Track expired tombstones (CASSANDRA-7810) * Validate empty cell names from counter updates (CASSANDRA-7798)
[5/6] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1
Merge branch 'cassandra-2.0' into cassandra-2.1 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/284f0762 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/284f0762 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/284f0762 Branch: refs/heads/cassandra-2.1 Commit: 284f07626230a74be0f5c466458bdc5c7375117a Parents: 1456ec8 f0d7802 Author: Mikhail Stepura Authored: Tue Sep 9 15:23:14 2014 -0700 Committer: Mikhail Stepura Committed: Tue Sep 9 15:23:14 2014 -0700 -- --
[3/6] git commit: Ninja: fixed CHANGES.txt for CASSANDRA-7828
Ninja: fixed CHANGES.txt for CASSANDRA-7828 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f0d7802a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f0d7802a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f0d7802a Branch: refs/heads/trunk Commit: f0d7802a008d4b1cb4b742c97bf2263379e78dc6 Parents: 8aa3c3a Author: Mikhail Stepura Authored: Tue Sep 9 15:22:35 2014 -0700 Committer: Mikhail Stepura Committed: Tue Sep 9 15:22:35 2014 -0700 -- CHANGES.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f0d7802a/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 747df0d..273fed9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,8 @@ * Always send Paxos commit to all replicas (CASSANDRA-7479) * Make disruptor_thrift_server invocation pool configurable (CASSANDRA-7594) * Make repair no-op when RF=1 (CASSANDRA-7864) +Merged from 1.2: + * Don't index tombstones (CASSANDRA-7828) 2.0.10 @@ -81,7 +83,6 @@ * Fix sstableloader unable to connect encrypted node (CASSANDRA-7585) * Make StreamReceiveTask thread safe and gc friendly (CASSANDRA-7795) Merged from 1.2: - * Don't index tombstones (CASSANDRA-7828 * Don't allow compacted sstables to be marked as compacting (CASSANDRA-7145) * Track expired tombstones (CASSANDRA-7810) * Validate empty cell names from counter updates (CASSANDRA-7798)
[4/6] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1
Merge branch 'cassandra-2.0' into cassandra-2.1 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/284f0762 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/284f0762 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/284f0762 Branch: refs/heads/trunk Commit: 284f07626230a74be0f5c466458bdc5c7375117a Parents: 1456ec8 f0d7802 Author: Mikhail Stepura Authored: Tue Sep 9 15:23:14 2014 -0700 Committer: Mikhail Stepura Committed: Tue Sep 9 15:23:14 2014 -0700 -- --
[6/6] git commit: Merge branch 'cassandra-2.1' into trunk
Merge branch 'cassandra-2.1' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6d22f6df Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6d22f6df Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6d22f6df Branch: refs/heads/trunk Commit: 6d22f6df60d6c811d954b67e9cbbfe183133fc3e Parents: b1774b7 284f076 Author: Mikhail Stepura Authored: Tue Sep 9 15:23:31 2014 -0700 Committer: Mikhail Stepura Committed: Tue Sep 9 15:23:31 2014 -0700 -- --
[1/6] git commit: Ninja: fixed CHANGES.txt for CASSANDRA-7828
Repository: cassandra Updated Branches: refs/heads/cassandra-2.0 8aa3c3a6a -> f0d7802a0 refs/heads/cassandra-2.1 1456ec831 -> 284f07626 refs/heads/trunk b1774b787 -> 6d22f6df6 Ninja: fixed CHANGES.txt for CASSANDRA-7828 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f0d7802a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f0d7802a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f0d7802a Branch: refs/heads/cassandra-2.0 Commit: f0d7802a008d4b1cb4b742c97bf2263379e78dc6 Parents: 8aa3c3a Author: Mikhail Stepura Authored: Tue Sep 9 15:22:35 2014 -0700 Committer: Mikhail Stepura Committed: Tue Sep 9 15:22:35 2014 -0700 -- CHANGES.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f0d7802a/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 747df0d..273fed9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,8 @@ * Always send Paxos commit to all replicas (CASSANDRA-7479) * Make disruptor_thrift_server invocation pool configurable (CASSANDRA-7594) * Make repair no-op when RF=1 (CASSANDRA-7864) +Merged from 1.2: + * Don't index tombstones (CASSANDRA-7828) 2.0.10 @@ -81,7 +83,6 @@ * Fix sstableloader unable to connect encrypted node (CASSANDRA-7585) * Make StreamReceiveTask thread safe and gc friendly (CASSANDRA-7795) Merged from 1.2: - * Don't index tombstones (CASSANDRA-7828 * Don't allow compacted sstables to be marked as compacting (CASSANDRA-7145) * Track expired tombstones (CASSANDRA-7810) * Validate empty cell names from counter updates (CASSANDRA-7798)
[1/3] git commit: (cqlsh) tab completion for triggers
Repository: cassandra Updated Branches: refs/heads/cassandra-2.1 bbbdec63a -> 1456ec831 refs/heads/trunk b86705027 -> b1774b787 (cqlsh) tab completion for triggers patch by Mikhail Stepura; reviewed by Tyler Hobbs for CASSANDRA-7824 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/1456ec83 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/1456ec83 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/1456ec83 Branch: refs/heads/cassandra-2.1 Commit: 1456ec83186f4e91a80129f6487416b81d7a92b2 Parents: bbbdec6 Author: Mikhail Stepura Authored: Thu Aug 28 16:10:36 2014 -0700 Committer: Mikhail Stepura Committed: Tue Sep 9 15:03:57 2014 -0700 -- CHANGES.txt| 1 + bin/cqlsh | 8 doc/cql3/CQL.textile | 33 + pylib/cqlshlib/cql3handling.py | 24 4 files changed, 66 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/1456ec83/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index c4698d6..1706faf 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.1 + * (cqlsh) tab-completion for triggers (CASSANDRA-7824) * (cqlsh): Support for query paging (CASSANDRA-7514) * (cqlsh): Show progress of COPY operations (CASSANDRA-7789) * Add syntax to remove multiple elements from a map (CASSANDRA-6599) http://git-wip-us.apache.org/repos/asf/cassandra/blob/1456ec83/bin/cqlsh -- diff --git a/bin/cqlsh b/bin/cqlsh index d61a008..fa5de05 100755 --- a/bin/cqlsh +++ b/bin/cqlsh @@ -711,6 +711,14 @@ class Shell(cmd.Cmd): return cql3handling.UserTypesMeta.from_layout(data) +def get_trigger_names(self, ksname=None): +if ksname is None: +ksname = self.current_keyspace + +return [trigger.name +for table in self.get_keyspace_meta(ksname).tables.values() +for trigger in table.triggers.values()] + def reset_statement(self): self.reset_prompt() self.statement.truncate(0) http://git-wip-us.apache.org/repos/asf/cassandra/blob/1456ec83/doc/cql3/CQL.textile -- diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile index 611bbb8..3b322d5 100644 --- a/doc/cql3/CQL.textile +++ b/doc/cql3/CQL.textile @@ -540,6 +540,39 @@ The @DROP TYPE@ statement results in the immediate, irreversible removal of a ty If the type does not exist, an error will be returned unless @IF EXISTS@ is used, in which case the operation is a no-op. +h3(#createTriggerStmt). CREATE TRIGGER + +__Syntax:__ + +bc(syntax).. + ::= CREATE TRIGGER ( IF NOT EXISTS )? ( )? +ON +USING + +p. +__Sample:__ + +bc(sample). +CREATE TRIGGER myTrigger ON myTable USING 'org.apache.cassandra.triggers.InvertedIndex'; + +The actual logic that makes up the trigger can be written in any Java (JVM) language and exists outside the database. You place the trigger code in a @lib/triggers@ subdirectory of the Cassandra installation directory, it loads during cluster startup, and exists on every node that participates in a cluster. The trigger defined on a table fires before a requested DML statement occurs, which ensures the atomicity of the transaction. + +h3(#dropTriggerStmt). DROP TRIGGER + +__Syntax:__ + +bc(syntax).. + ::= DROP TRIGGER ( IF EXISTS )? ( )? +ON + +p. +__Sample:__ + +bc(sample). +DROP TRIGGER myTrigger ON myTable; + +@DROP TRIGGER@ statement removes the registration of a trigger created using @CREATE TRIGGER@. + h2(#dataManipulation). Data Manipulation h3(#insertStmt). INSERT http://git-wip-us.apache.org/repos/asf/cassandra/blob/1456ec83/pylib/cqlshlib/cql3handling.py -- diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py index e58f41d..43882de 100644 --- a/pylib/cqlshlib/cql3handling.py +++ b/pylib/cqlshlib/cql3handling.py @@ -228,10 +228,12 @@ JUNK ::= /([ \t\r\f\v]+|(--|[/][/])[^\n\r]*([\n\r]|$)|[/][*].*?[*][/])/ ; | | | + | | | | | + | | | | @@ -1153,6 +1155,28 @@ def username_name_completer(ctxt, cass): session = cass.session return [maybe_quote(row.
[3/3] git commit: Merge branch 'cassandra-2.1' into trunk
Merge branch 'cassandra-2.1' into trunk Conflicts: pylib/cqlshlib/cql3handling.py Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b1774b78 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b1774b78 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b1774b78 Branch: refs/heads/trunk Commit: b1774b7879e4deff0f60cb8496ef59e81ba167b7 Parents: b867050 1456ec8 Author: Mikhail Stepura Authored: Tue Sep 9 15:13:12 2014 -0700 Committer: Mikhail Stepura Committed: Tue Sep 9 15:13:12 2014 -0700 -- CHANGES.txt| 1 + bin/cqlsh | 8 doc/cql3/CQL.textile | 33 + pylib/cqlshlib/cql3handling.py | 24 4 files changed, 66 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/b1774b78/CHANGES.txt -- diff --cc CHANGES.txt index c151969,1706faf..f264cd7 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,24 -1,5 +1,25 @@@ +3.0 + * Support Java source code for user-defined functions (CASSANDRA-7562) + * Require arg types to disambiguate UDF drops (CASSANDRA-7812) + * Do anticompaction in groups (CASSANDRA-6851) + * Verify that UDF class methods are static (CASSANDRA-7781) + * Support pure user-defined functions (CASSANDRA-7395, 7740) + * Permit configurable timestamps with cassandra-stress (CASSANDRA-7416) + * Move sstable RandomAccessReader to nio2, which allows using the + FILE_SHARE_DELETE flag on Windows (CASSANDRA-4050) + * Remove CQL2 (CASSANDRA-5918) + * Add Thrift get_multi_slice call (CASSANDRA-6757) + * Optimize fetching multiple cells by name (CASSANDRA-6933) + * Allow compilation in java 8 (CASSANDRA-7028) + * Make incremental repair default (CASSANDRA-7250) + * Enable code coverage thru JaCoCo (CASSANDRA-7226) + * Switch external naming of 'column families' to 'tables' (CASSANDRA-4369) + * Shorten SSTable path (CASSANDRA-6962) + * Use unsafe mutations for most unit tests (CASSANDRA-6969) + * Fix race condition during calculation of pending ranges (CASSANDRA-7390) + 2.1.1 + * (cqlsh) tab-completion for triggers (CASSANDRA-7824) * (cqlsh): Support for query paging (CASSANDRA-7514) * (cqlsh): Show progress of COPY operations (CASSANDRA-7789) * Add syntax to remove multiple elements from a map (CASSANDRA-6599) http://git-wip-us.apache.org/repos/asf/cassandra/blob/b1774b78/pylib/cqlshlib/cql3handling.py -- diff --cc pylib/cqlshlib/cql3handling.py index 9512a8b,43882de..63d6a69 --- a/pylib/cqlshlib/cql3handling.py +++ b/pylib/cqlshlib/cql3handling.py @@@ -228,12 -228,12 +228,14 @@@ JUNK ::= /([ \t\r\f\v]+|(--|[/][/])[^\n | | | + | + | | | | | + | + | | | |
[2/3] git commit: (cqlsh) tab completion for triggers
(cqlsh) tab completion for triggers patch by Mikhail Stepura; reviewed by Tyler Hobbs for CASSANDRA-7824 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/1456ec83 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/1456ec83 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/1456ec83 Branch: refs/heads/trunk Commit: 1456ec83186f4e91a80129f6487416b81d7a92b2 Parents: bbbdec6 Author: Mikhail Stepura Authored: Thu Aug 28 16:10:36 2014 -0700 Committer: Mikhail Stepura Committed: Tue Sep 9 15:03:57 2014 -0700 -- CHANGES.txt| 1 + bin/cqlsh | 8 doc/cql3/CQL.textile | 33 + pylib/cqlshlib/cql3handling.py | 24 4 files changed, 66 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/1456ec83/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index c4698d6..1706faf 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.1 + * (cqlsh) tab-completion for triggers (CASSANDRA-7824) * (cqlsh): Support for query paging (CASSANDRA-7514) * (cqlsh): Show progress of COPY operations (CASSANDRA-7789) * Add syntax to remove multiple elements from a map (CASSANDRA-6599) http://git-wip-us.apache.org/repos/asf/cassandra/blob/1456ec83/bin/cqlsh -- diff --git a/bin/cqlsh b/bin/cqlsh index d61a008..fa5de05 100755 --- a/bin/cqlsh +++ b/bin/cqlsh @@ -711,6 +711,14 @@ class Shell(cmd.Cmd): return cql3handling.UserTypesMeta.from_layout(data) +def get_trigger_names(self, ksname=None): +if ksname is None: +ksname = self.current_keyspace + +return [trigger.name +for table in self.get_keyspace_meta(ksname).tables.values() +for trigger in table.triggers.values()] + def reset_statement(self): self.reset_prompt() self.statement.truncate(0) http://git-wip-us.apache.org/repos/asf/cassandra/blob/1456ec83/doc/cql3/CQL.textile -- diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile index 611bbb8..3b322d5 100644 --- a/doc/cql3/CQL.textile +++ b/doc/cql3/CQL.textile @@ -540,6 +540,39 @@ The @DROP TYPE@ statement results in the immediate, irreversible removal of a ty If the type does not exist, an error will be returned unless @IF EXISTS@ is used, in which case the operation is a no-op. +h3(#createTriggerStmt). CREATE TRIGGER + +__Syntax:__ + +bc(syntax).. + ::= CREATE TRIGGER ( IF NOT EXISTS )? ( )? +ON +USING + +p. +__Sample:__ + +bc(sample). +CREATE TRIGGER myTrigger ON myTable USING 'org.apache.cassandra.triggers.InvertedIndex'; + +The actual logic that makes up the trigger can be written in any Java (JVM) language and exists outside the database. You place the trigger code in a @lib/triggers@ subdirectory of the Cassandra installation directory, it loads during cluster startup, and exists on every node that participates in a cluster. The trigger defined on a table fires before a requested DML statement occurs, which ensures the atomicity of the transaction. + +h3(#dropTriggerStmt). DROP TRIGGER + +__Syntax:__ + +bc(syntax).. + ::= DROP TRIGGER ( IF EXISTS )? ( )? +ON + +p. +__Sample:__ + +bc(sample). +DROP TRIGGER myTrigger ON myTable; + +@DROP TRIGGER@ statement removes the registration of a trigger created using @CREATE TRIGGER@. + h2(#dataManipulation). Data Manipulation h3(#insertStmt). INSERT http://git-wip-us.apache.org/repos/asf/cassandra/blob/1456ec83/pylib/cqlshlib/cql3handling.py -- diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py index e58f41d..43882de 100644 --- a/pylib/cqlshlib/cql3handling.py +++ b/pylib/cqlshlib/cql3handling.py @@ -228,10 +228,12 @@ JUNK ::= /([ \t\r\f\v]+|(--|[/][/])[^\n\r]*([\n\r]|$)|[/][*].*?[*][/])/ ; | | | + | | | | | + | | | | @@ -1153,6 +1155,28 @@ def username_name_completer(ctxt, cass): session = cass.session return [maybe_quote(row.values()[0].replace("'", "''")) for row in session.execute("LIST USERS")] +syntax_rules += r''' + ::= "CREATE" "TRIGGER" ( "IF" "NOT" "EXIS
[03/10] git commit: Don't index tombstones.
Don't index tombstones. patch by Mikhail Stepura; reviewed by Aleksey Yeschenko for CASSANDRA-7828 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6860d6fa Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6860d6fa Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6860d6fa Branch: refs/heads/cassandra-2.1 Commit: 6860d6fad9e6af90ff7c2f4359a0bdc1226135b5 Parents: 8bef260 Author: Mikhail Stepura Authored: Mon Sep 8 12:01:37 2014 -0700 Committer: Mikhail Stepura Committed: Mon Sep 8 12:01:37 2014 -0700 -- CHANGES.txt | 1 + src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/6860d6fa/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 6c601e5..435b124 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 1.2.19 + * Don't index tombstones (CASSANDRA-7828) * Don't allow compacted sstables to be marked as compacting (CASSANDRA-7145) * Track expired tombstones (CASSANDRA-7810) * Validate empty cell names from counter updates (CASSANDRA-7798) http://git-wip-us.apache.org/repos/asf/cassandra/blob/6860d6fa/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java -- diff --git a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java index 7fefa13..8839228 100644 --- a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java +++ b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java @@ -443,7 +443,7 @@ public class SecondaryIndexManager { for (IColumn column : cf) { -if (index.indexes(column.name())) +if (column.isLive() && index.indexes(column.name())) ((PerColumnSecondaryIndex) index).insert(key, column); } }
[08/10] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1.0
Merge branch 'cassandra-2.0' into cassandra-2.1.0 Conflicts: CHANGES.txt src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/ad9f51fc Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ad9f51fc Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ad9f51fc Branch: refs/heads/cassandra-2.1 Commit: ad9f51fc5cc87ff744eee0ceb4abb05f5f3a3e24 Parents: f1f5f5f 8aa3c3a Author: Mikhail Stepura Authored: Mon Sep 8 12:20:51 2014 -0700 Committer: Mikhail Stepura Committed: Mon Sep 8 12:20:51 2014 -0700 -- CHANGES.txt | 1 + src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/ad9f51fc/CHANGES.txt -- diff --cc CHANGES.txt index 7737269,747df0d..c4698d6 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,77 -1,7 +1,78 @@@ -2.0.11: - * Explicitly disallowing mixing multi-column and single-column +2.1.1 + * (cqlsh): Support for query paging (CASSANDRA-7514) + * (cqlsh): Show progress of COPY operations (CASSANDRA-7789) + * Add syntax to remove multiple elements from a map (CASSANDRA-6599) + * Support non-equals conditions in lightweight transactions (CASSANDRA-6839) + * Add IF [NOT] EXISTS to create/drop triggers (CASSANDRA-7606) + * (cqlsh) Display the current logged-in user (CASSANDRA-7785) + * (cqlsh) Don't ignore CTRL-C during COPY FROM execution (CASSANDRA-7815) + * (cqlsh) Order UDTs according to cross-type dependencies in DESCRIBE + output (CASSANDRA-7659) + * (cqlsh) Fix handling of CAS statement results (CASSANDRA-7671) + * (cqlsh) COPY TO/FROM improvements (CASSANDRA-7405) + * Support list index operations with conditions (CASSANDRA-7499) + * Add max live/tombstoned cells to nodetool cfstats output (CASSANDRA-7731) + * Validate IPv6 wildcard addresses properly (CASSANDRA-7680) + * (cqlsh) Error when tracing query (CASSANDRA-7613) + * Avoid IOOBE when building SyntaxError message snippet (CASSANDRA-7569) + * SSTableExport uses correct validator to create string representation of partition + keys (CASSANDRA-7498) + * Avoid NPEs when receiving type changes for an unknown keyspace (CASSANDRA-7689) + * Add support for custom 2i validation (CASSANDRA-7575) + * Pig support for hadoop CqlInputFormat (CASSANDRA-6454) + * Add listen_interface and rpc_interface options (CASSANDRA-7417) + * Improve schema merge performance (CASSANDRA-7444) + * Adjust MT depth based on # of partition validating (CASSANDRA-5263) + * Optimise NativeCell comparisons (CASSANDRA-6755) + * Configurable client timeout for cqlsh (CASSANDRA-7516) + * Include snippet of CQL query near syntax error in messages (CASSANDRA-7111) +Merged from 2.0: + * Explicitly disallow mixing multi-column and single-column relations on clustering columns (CASSANDRA-7711) * Better error message when condition is set on PK column (CASSANDRA-7804) + * Don't send schema change responses and events for no-op DDL + statements (CASSANDRA-7600) + * (Hadoop) fix cluster initialisation for a split fetching (CASSANDRA-7774) + * Throw InvalidRequestException when queries contain relations on entire + collection columns (CASSANDRA-7506) + * (cqlsh) enable CTRL-R history search with libedit (CASSANDRA-7577) + * (Hadoop) allow ACFRW to limit nodes to local DC (CASSANDRA-7252) + * (cqlsh) cqlsh should automatically disable tracing when selecting + from system_traces (CASSANDRA-7641) + * (Hadoop) Add CqlOutputFormat (CASSANDRA-6927) + * Don't depend on cassandra config for nodetool ring (CASSANDRA-7508) + * (cqlsh) Fix failing cqlsh formatting tests (CASSANDRA-7703) + * Fix IncompatibleClassChangeError from hadoop2 (CASSANDRA-7229) + * Add 'nodetool sethintedhandoffthrottlekb' (CASSANDRA-7635) + * (cqlsh) Add tab-completion for CREATE/DROP USER IF [NOT] EXISTS (CASSANDRA-7611) + * Catch errors when the JVM pulls the rug out from GCInspector (CASSANDRA-5345) + * cqlsh fails when version number parts are not int (CASSANDRA-7524) +Merged from 1.2: ++ * Don't index tombstones (CASSANDRA-7828) + * Improve PasswordAuthenticator default super user setup (CASSANDRA-7788) + + +2.1.0 + * (cqlsh) Removed "ALTER TYPE RENAME TO " from tab-completion + (CASSANDRA-7895) + * Fixed IllegalStateException in anticompaction (CASSANDRA-7892) + * cqlsh: DESCRIBE support for frozen UDTs, tuples (CASSANDRA-7863) + * Avoid exposing internal classes over JMX (CASSANDRA-7879) + * Add null check for keys when freezing collection (CASSANDRA-7869) + * Improve stress workload realism (C
[05/10] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0
Merge branch 'cassandra-1.2' into cassandra-2.0 Conflicts: CHANGES.txt src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/8aa3c3a6 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8aa3c3a6 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8aa3c3a6 Branch: refs/heads/cassandra-2.1 Commit: 8aa3c3a6a36d4fd308e5a7b518871ec72fa632fe Parents: e6f307f 6860d6f Author: Mikhail Stepura Authored: Mon Sep 8 12:06:09 2014 -0700 Committer: Mikhail Stepura Committed: Mon Sep 8 12:06:09 2014 -0700 -- CHANGES.txt | 1 + src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/8aa3c3a6/CHANGES.txt -- diff --cc CHANGES.txt index 54fcc4f,435b124..747df0d --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,86 -1,5 +1,87 @@@ -1.2.19 - * Don't index tombstones (CASSANDRA-7828) +2.0.11: + * Explicitly disallowing mixing multi-column and single-column + relations on clustering columns (CASSANDRA-7711) + * Better error message when condition is set on PK column (CASSANDRA-7804) + * Forbid re-adding dropped counter columns (CASSANDRA-7831) + * Fix CFMetaData#isThriftCompatible() for PK-only tables (CASSANDRA-7832) + * Always reject inequality on the partition key without token() + (CASSANDRA-7722) + * Always send Paxos commit to all replicas (CASSANDRA-7479) + * Make disruptor_thrift_server invocation pool configurable (CASSANDRA-7594) + * Make repair no-op when RF=1 (CASSANDRA-7864) + + +2.0.10 + * Don't send schema change responses and events for no-op DDL + statements (CASSANDRA-7600) + * (Hadoop) fix cluster initialisation for a split fetching (CASSANDRA-7774) + * Configure system.paxos with LeveledCompactionStrategy (CASSANDRA-7753) + * Fix ALTER clustering column type from DateType to TimestampType when + using DESC clustering order (CASSANRDA-7797) + * Stop inheriting liveRatio and liveRatioComputedAt from previous + memtables (CASSANDRA-7796) + * Throw EOFException if we run out of chunks in compressed datafile + (CASSANDRA-7664) + * Throw InvalidRequestException when queries contain relations on entire + collection columns (CASSANDRA-7506) + * Fix PRSI handling of CQL3 row markers for row cleanup (CASSANDRA-7787) + * (cqlsh) enable CTRL-R history search with libedit (CASSANDRA-7577) + * Fix dropping collection when it's the last regular column (CASSANDRA-7744) + * Properly reject operations on list index with conditions (CASSANDRA-7499) + * (Hadoop) allow ACFRW to limit nodes to local DC (CASSANDRA-7252) + * (cqlsh) Wait up to 10 sec for a tracing session (CASSANDRA-7222) + * Fix NPE in FileCacheService.sizeInBytes (CASSANDRA-7756) + * (cqlsh) cqlsh should automatically disable tracing when selecting + from system_traces (CASSANDRA-7641) + * (Hadoop) Add CqlOutputFormat (CASSANDRA-6927) + * Don't depend on cassandra config for nodetool ring (CASSANDRA-7508) + * (cqlsh) Fix failing cqlsh formatting tests (CASSANDRA-7703) + * Fix MS expiring map timeout for Paxos messages (CASSANDRA-7752) + * Do not flush on truncate if durable_writes is false (CASSANDRA-7750) + * Give CRR a default input_cql Statement (CASSANDRA-7226) + * Better error message when adding a collection with the same name + than a previously dropped one (CASSANDRA-6276) + * Fix validation when adding static columns (CASSANDRA-7730) + * (Thrift) fix range deletion of supercolumns (CASSANDRA-7733) + * Fix potential AssertionError in RangeTombstoneList (CASSANDRA-7700) + * Validate arguments of blobAs* functions (CASSANDRA-7707) + * Fix potential AssertionError with 2ndary indexes (CASSANDRA-6612) + * Avoid logging CompactionInterrupted at ERROR (CASSANDRA-7694) + * Minor leak in sstable2jon (CASSANDRA-7709) + * Add cassandra.auto_bootstrap system property (CASSANDRA-7650) + * Remove CqlPagingRecordReader/CqlPagingInputFormat (CASSANDRA-7570) + * Fix IncompatibleClassChangeError from hadoop2 (CASSANDRA-7229) + * Add 'nodetool sethintedhandoffthrottlekb' (CASSANDRA-7635) + * Update java driver (for hadoop) (CASSANDRA-7618) + * Fix truncate to always flush (CASSANDRA-7511) + * Remove shuffle and taketoken (CASSANDRA-7601) + * Switch liveRatio-related log messages to DEBUG (CASSANDRA-7467) + * (cqlsh) Add tab-completion for CREATE/DROP USER IF [NOT] EXISTS (CASSANDRA-7611) + * Always merge ranges owned by a single node (CASSANDRA-6930) + * Pig support for hadoop CqlInputFormat (CASSANDRA-6454) + * Fix ReversedType(DateType) mapping to n
[09/10] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1.0
Merge branch 'cassandra-2.0' into cassandra-2.1.0 Conflicts: CHANGES.txt src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/ad9f51fc Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ad9f51fc Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ad9f51fc Branch: refs/heads/trunk Commit: ad9f51fc5cc87ff744eee0ceb4abb05f5f3a3e24 Parents: f1f5f5f 8aa3c3a Author: Mikhail Stepura Authored: Mon Sep 8 12:20:51 2014 -0700 Committer: Mikhail Stepura Committed: Mon Sep 8 12:20:51 2014 -0700 -- CHANGES.txt | 1 + src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/ad9f51fc/CHANGES.txt -- diff --cc CHANGES.txt index 7737269,747df0d..c4698d6 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,77 -1,7 +1,78 @@@ -2.0.11: - * Explicitly disallowing mixing multi-column and single-column +2.1.1 + * (cqlsh): Support for query paging (CASSANDRA-7514) + * (cqlsh): Show progress of COPY operations (CASSANDRA-7789) + * Add syntax to remove multiple elements from a map (CASSANDRA-6599) + * Support non-equals conditions in lightweight transactions (CASSANDRA-6839) + * Add IF [NOT] EXISTS to create/drop triggers (CASSANDRA-7606) + * (cqlsh) Display the current logged-in user (CASSANDRA-7785) + * (cqlsh) Don't ignore CTRL-C during COPY FROM execution (CASSANDRA-7815) + * (cqlsh) Order UDTs according to cross-type dependencies in DESCRIBE + output (CASSANDRA-7659) + * (cqlsh) Fix handling of CAS statement results (CASSANDRA-7671) + * (cqlsh) COPY TO/FROM improvements (CASSANDRA-7405) + * Support list index operations with conditions (CASSANDRA-7499) + * Add max live/tombstoned cells to nodetool cfstats output (CASSANDRA-7731) + * Validate IPv6 wildcard addresses properly (CASSANDRA-7680) + * (cqlsh) Error when tracing query (CASSANDRA-7613) + * Avoid IOOBE when building SyntaxError message snippet (CASSANDRA-7569) + * SSTableExport uses correct validator to create string representation of partition + keys (CASSANDRA-7498) + * Avoid NPEs when receiving type changes for an unknown keyspace (CASSANDRA-7689) + * Add support for custom 2i validation (CASSANDRA-7575) + * Pig support for hadoop CqlInputFormat (CASSANDRA-6454) + * Add listen_interface and rpc_interface options (CASSANDRA-7417) + * Improve schema merge performance (CASSANDRA-7444) + * Adjust MT depth based on # of partition validating (CASSANDRA-5263) + * Optimise NativeCell comparisons (CASSANDRA-6755) + * Configurable client timeout for cqlsh (CASSANDRA-7516) + * Include snippet of CQL query near syntax error in messages (CASSANDRA-7111) +Merged from 2.0: + * Explicitly disallow mixing multi-column and single-column relations on clustering columns (CASSANDRA-7711) * Better error message when condition is set on PK column (CASSANDRA-7804) + * Don't send schema change responses and events for no-op DDL + statements (CASSANDRA-7600) + * (Hadoop) fix cluster initialisation for a split fetching (CASSANDRA-7774) + * Throw InvalidRequestException when queries contain relations on entire + collection columns (CASSANDRA-7506) + * (cqlsh) enable CTRL-R history search with libedit (CASSANDRA-7577) + * (Hadoop) allow ACFRW to limit nodes to local DC (CASSANDRA-7252) + * (cqlsh) cqlsh should automatically disable tracing when selecting + from system_traces (CASSANDRA-7641) + * (Hadoop) Add CqlOutputFormat (CASSANDRA-6927) + * Don't depend on cassandra config for nodetool ring (CASSANDRA-7508) + * (cqlsh) Fix failing cqlsh formatting tests (CASSANDRA-7703) + * Fix IncompatibleClassChangeError from hadoop2 (CASSANDRA-7229) + * Add 'nodetool sethintedhandoffthrottlekb' (CASSANDRA-7635) + * (cqlsh) Add tab-completion for CREATE/DROP USER IF [NOT] EXISTS (CASSANDRA-7611) + * Catch errors when the JVM pulls the rug out from GCInspector (CASSANDRA-5345) + * cqlsh fails when version number parts are not int (CASSANDRA-7524) +Merged from 1.2: ++ * Don't index tombstones (CASSANDRA-7828) + * Improve PasswordAuthenticator default super user setup (CASSANDRA-7788) + + +2.1.0 + * (cqlsh) Removed "ALTER TYPE RENAME TO " from tab-completion + (CASSANDRA-7895) + * Fixed IllegalStateException in anticompaction (CASSANDRA-7892) + * cqlsh: DESCRIBE support for frozen UDTs, tuples (CASSANDRA-7863) + * Avoid exposing internal classes over JMX (CASSANDRA-7879) + * Add null check for keys when freezing collection (CASSANDRA-7869) + * Improve stress workload realism (CASSANDRA
[06/10] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0
Merge branch 'cassandra-1.2' into cassandra-2.0 Conflicts: CHANGES.txt src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/8aa3c3a6 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8aa3c3a6 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8aa3c3a6 Branch: refs/heads/cassandra-2.0 Commit: 8aa3c3a6a36d4fd308e5a7b518871ec72fa632fe Parents: e6f307f 6860d6f Author: Mikhail Stepura Authored: Mon Sep 8 12:06:09 2014 -0700 Committer: Mikhail Stepura Committed: Mon Sep 8 12:06:09 2014 -0700 -- CHANGES.txt | 1 + src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/8aa3c3a6/CHANGES.txt -- diff --cc CHANGES.txt index 54fcc4f,435b124..747df0d --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,86 -1,5 +1,87 @@@ -1.2.19 - * Don't index tombstones (CASSANDRA-7828) +2.0.11: + * Explicitly disallowing mixing multi-column and single-column + relations on clustering columns (CASSANDRA-7711) + * Better error message when condition is set on PK column (CASSANDRA-7804) + * Forbid re-adding dropped counter columns (CASSANDRA-7831) + * Fix CFMetaData#isThriftCompatible() for PK-only tables (CASSANDRA-7832) + * Always reject inequality on the partition key without token() + (CASSANDRA-7722) + * Always send Paxos commit to all replicas (CASSANDRA-7479) + * Make disruptor_thrift_server invocation pool configurable (CASSANDRA-7594) + * Make repair no-op when RF=1 (CASSANDRA-7864) + + +2.0.10 + * Don't send schema change responses and events for no-op DDL + statements (CASSANDRA-7600) + * (Hadoop) fix cluster initialisation for a split fetching (CASSANDRA-7774) + * Configure system.paxos with LeveledCompactionStrategy (CASSANDRA-7753) + * Fix ALTER clustering column type from DateType to TimestampType when + using DESC clustering order (CASSANRDA-7797) + * Stop inheriting liveRatio and liveRatioComputedAt from previous + memtables (CASSANDRA-7796) + * Throw EOFException if we run out of chunks in compressed datafile + (CASSANDRA-7664) + * Throw InvalidRequestException when queries contain relations on entire + collection columns (CASSANDRA-7506) + * Fix PRSI handling of CQL3 row markers for row cleanup (CASSANDRA-7787) + * (cqlsh) enable CTRL-R history search with libedit (CASSANDRA-7577) + * Fix dropping collection when it's the last regular column (CASSANDRA-7744) + * Properly reject operations on list index with conditions (CASSANDRA-7499) + * (Hadoop) allow ACFRW to limit nodes to local DC (CASSANDRA-7252) + * (cqlsh) Wait up to 10 sec for a tracing session (CASSANDRA-7222) + * Fix NPE in FileCacheService.sizeInBytes (CASSANDRA-7756) + * (cqlsh) cqlsh should automatically disable tracing when selecting + from system_traces (CASSANDRA-7641) + * (Hadoop) Add CqlOutputFormat (CASSANDRA-6927) + * Don't depend on cassandra config for nodetool ring (CASSANDRA-7508) + * (cqlsh) Fix failing cqlsh formatting tests (CASSANDRA-7703) + * Fix MS expiring map timeout for Paxos messages (CASSANDRA-7752) + * Do not flush on truncate if durable_writes is false (CASSANDRA-7750) + * Give CRR a default input_cql Statement (CASSANDRA-7226) + * Better error message when adding a collection with the same name + than a previously dropped one (CASSANDRA-6276) + * Fix validation when adding static columns (CASSANDRA-7730) + * (Thrift) fix range deletion of supercolumns (CASSANDRA-7733) + * Fix potential AssertionError in RangeTombstoneList (CASSANDRA-7700) + * Validate arguments of blobAs* functions (CASSANDRA-7707) + * Fix potential AssertionError with 2ndary indexes (CASSANDRA-6612) + * Avoid logging CompactionInterrupted at ERROR (CASSANDRA-7694) + * Minor leak in sstable2jon (CASSANDRA-7709) + * Add cassandra.auto_bootstrap system property (CASSANDRA-7650) + * Remove CqlPagingRecordReader/CqlPagingInputFormat (CASSANDRA-7570) + * Fix IncompatibleClassChangeError from hadoop2 (CASSANDRA-7229) + * Add 'nodetool sethintedhandoffthrottlekb' (CASSANDRA-7635) + * Update java driver (for hadoop) (CASSANDRA-7618) + * Fix truncate to always flush (CASSANDRA-7511) + * Remove shuffle and taketoken (CASSANDRA-7601) + * Switch liveRatio-related log messages to DEBUG (CASSANDRA-7467) + * (cqlsh) Add tab-completion for CREATE/DROP USER IF [NOT] EXISTS (CASSANDRA-7611) + * Always merge ranges owned by a single node (CASSANDRA-6930) + * Pig support for hadoop CqlInputFormat (CASSANDRA-6454) + * Fix ReversedType(DateType) mapping to n
[07/10] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0
Merge branch 'cassandra-1.2' into cassandra-2.0 Conflicts: CHANGES.txt src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/8aa3c3a6 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8aa3c3a6 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8aa3c3a6 Branch: refs/heads/trunk Commit: 8aa3c3a6a36d4fd308e5a7b518871ec72fa632fe Parents: e6f307f 6860d6f Author: Mikhail Stepura Authored: Mon Sep 8 12:06:09 2014 -0700 Committer: Mikhail Stepura Committed: Mon Sep 8 12:06:09 2014 -0700 -- CHANGES.txt | 1 + src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/8aa3c3a6/CHANGES.txt -- diff --cc CHANGES.txt index 54fcc4f,435b124..747df0d --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,86 -1,5 +1,87 @@@ -1.2.19 - * Don't index tombstones (CASSANDRA-7828) +2.0.11: + * Explicitly disallowing mixing multi-column and single-column + relations on clustering columns (CASSANDRA-7711) + * Better error message when condition is set on PK column (CASSANDRA-7804) + * Forbid re-adding dropped counter columns (CASSANDRA-7831) + * Fix CFMetaData#isThriftCompatible() for PK-only tables (CASSANDRA-7832) + * Always reject inequality on the partition key without token() + (CASSANDRA-7722) + * Always send Paxos commit to all replicas (CASSANDRA-7479) + * Make disruptor_thrift_server invocation pool configurable (CASSANDRA-7594) + * Make repair no-op when RF=1 (CASSANDRA-7864) + + +2.0.10 + * Don't send schema change responses and events for no-op DDL + statements (CASSANDRA-7600) + * (Hadoop) fix cluster initialisation for a split fetching (CASSANDRA-7774) + * Configure system.paxos with LeveledCompactionStrategy (CASSANDRA-7753) + * Fix ALTER clustering column type from DateType to TimestampType when + using DESC clustering order (CASSANRDA-7797) + * Stop inheriting liveRatio and liveRatioComputedAt from previous + memtables (CASSANDRA-7796) + * Throw EOFException if we run out of chunks in compressed datafile + (CASSANDRA-7664) + * Throw InvalidRequestException when queries contain relations on entire + collection columns (CASSANDRA-7506) + * Fix PRSI handling of CQL3 row markers for row cleanup (CASSANDRA-7787) + * (cqlsh) enable CTRL-R history search with libedit (CASSANDRA-7577) + * Fix dropping collection when it's the last regular column (CASSANDRA-7744) + * Properly reject operations on list index with conditions (CASSANDRA-7499) + * (Hadoop) allow ACFRW to limit nodes to local DC (CASSANDRA-7252) + * (cqlsh) Wait up to 10 sec for a tracing session (CASSANDRA-7222) + * Fix NPE in FileCacheService.sizeInBytes (CASSANDRA-7756) + * (cqlsh) cqlsh should automatically disable tracing when selecting + from system_traces (CASSANDRA-7641) + * (Hadoop) Add CqlOutputFormat (CASSANDRA-6927) + * Don't depend on cassandra config for nodetool ring (CASSANDRA-7508) + * (cqlsh) Fix failing cqlsh formatting tests (CASSANDRA-7703) + * Fix MS expiring map timeout for Paxos messages (CASSANDRA-7752) + * Do not flush on truncate if durable_writes is false (CASSANDRA-7750) + * Give CRR a default input_cql Statement (CASSANDRA-7226) + * Better error message when adding a collection with the same name + than a previously dropped one (CASSANDRA-6276) + * Fix validation when adding static columns (CASSANDRA-7730) + * (Thrift) fix range deletion of supercolumns (CASSANDRA-7733) + * Fix potential AssertionError in RangeTombstoneList (CASSANDRA-7700) + * Validate arguments of blobAs* functions (CASSANDRA-7707) + * Fix potential AssertionError with 2ndary indexes (CASSANDRA-6612) + * Avoid logging CompactionInterrupted at ERROR (CASSANDRA-7694) + * Minor leak in sstable2jon (CASSANDRA-7709) + * Add cassandra.auto_bootstrap system property (CASSANDRA-7650) + * Remove CqlPagingRecordReader/CqlPagingInputFormat (CASSANDRA-7570) + * Fix IncompatibleClassChangeError from hadoop2 (CASSANDRA-7229) + * Add 'nodetool sethintedhandoffthrottlekb' (CASSANDRA-7635) + * Update java driver (for hadoop) (CASSANDRA-7618) + * Fix truncate to always flush (CASSANDRA-7511) + * Remove shuffle and taketoken (CASSANDRA-7601) + * Switch liveRatio-related log messages to DEBUG (CASSANDRA-7467) + * (cqlsh) Add tab-completion for CREATE/DROP USER IF [NOT] EXISTS (CASSANDRA-7611) + * Always merge ranges owned by a single node (CASSANDRA-6930) + * Pig support for hadoop CqlInputFormat (CASSANDRA-6454) + * Fix ReversedType(DateType) mapping to native pr
[01/10] git commit: Don't index tombstones.
Repository: cassandra Updated Branches: refs/heads/cassandra-1.2 8bef2609a -> 6860d6fad refs/heads/cassandra-2.0 e6f307f4e -> 8aa3c3a6a refs/heads/cassandra-2.1 f1f5f5fd3 -> ad9f51fc5 refs/heads/trunk d641053ab -> 928815989 Don't index tombstones. patch by Mikhail Stepura; reviewed by Aleksey Yeschenko for CASSANDRA-7828 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6860d6fa Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6860d6fa Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6860d6fa Branch: refs/heads/cassandra-1.2 Commit: 6860d6fad9e6af90ff7c2f4359a0bdc1226135b5 Parents: 8bef260 Author: Mikhail Stepura Authored: Mon Sep 8 12:01:37 2014 -0700 Committer: Mikhail Stepura Committed: Mon Sep 8 12:01:37 2014 -0700 -- CHANGES.txt | 1 + src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/6860d6fa/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 6c601e5..435b124 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 1.2.19 + * Don't index tombstones (CASSANDRA-7828) * Don't allow compacted sstables to be marked as compacting (CASSANDRA-7145) * Track expired tombstones (CASSANDRA-7810) * Validate empty cell names from counter updates (CASSANDRA-7798) http://git-wip-us.apache.org/repos/asf/cassandra/blob/6860d6fa/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java -- diff --git a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java index 7fefa13..8839228 100644 --- a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java +++ b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java @@ -443,7 +443,7 @@ public class SecondaryIndexManager { for (IColumn column : cf) { -if (index.indexes(column.name())) +if (column.isLive() && index.indexes(column.name())) ((PerColumnSecondaryIndex) index).insert(key, column); } }
[10/10] git commit: Merge branch 'cassandra-2.1' into trunk
Merge branch 'cassandra-2.1' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/92881598 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/92881598 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/92881598 Branch: refs/heads/trunk Commit: 9288159898605f8f160b040dab46be2c089b30c8 Parents: d641053 ad9f51f Author: Mikhail Stepura Authored: Mon Sep 8 12:21:36 2014 -0700 Committer: Mikhail Stepura Committed: Mon Sep 8 12:21:36 2014 -0700 -- CHANGES.txt | 1 + src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/92881598/CHANGES.txt --
[02/10] git commit: Don't index tombstones.
Don't index tombstones. patch by Mikhail Stepura; reviewed by Aleksey Yeschenko for CASSANDRA-7828 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6860d6fa Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6860d6fa Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6860d6fa Branch: refs/heads/cassandra-2.0 Commit: 6860d6fad9e6af90ff7c2f4359a0bdc1226135b5 Parents: 8bef260 Author: Mikhail Stepura Authored: Mon Sep 8 12:01:37 2014 -0700 Committer: Mikhail Stepura Committed: Mon Sep 8 12:01:37 2014 -0700 -- CHANGES.txt | 1 + src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/6860d6fa/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 6c601e5..435b124 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 1.2.19 + * Don't index tombstones (CASSANDRA-7828) * Don't allow compacted sstables to be marked as compacting (CASSANDRA-7145) * Track expired tombstones (CASSANDRA-7810) * Validate empty cell names from counter updates (CASSANDRA-7798) http://git-wip-us.apache.org/repos/asf/cassandra/blob/6860d6fa/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java -- diff --git a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java index 7fefa13..8839228 100644 --- a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java +++ b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java @@ -443,7 +443,7 @@ public class SecondaryIndexManager { for (IColumn column : cf) { -if (index.indexes(column.name())) +if (column.isLive() && index.indexes(column.name())) ((PerColumnSecondaryIndex) index).insert(key, column); } }
[04/10] git commit: Don't index tombstones.
Don't index tombstones. patch by Mikhail Stepura; reviewed by Aleksey Yeschenko for CASSANDRA-7828 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6860d6fa Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6860d6fa Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6860d6fa Branch: refs/heads/trunk Commit: 6860d6fad9e6af90ff7c2f4359a0bdc1226135b5 Parents: 8bef260 Author: Mikhail Stepura Authored: Mon Sep 8 12:01:37 2014 -0700 Committer: Mikhail Stepura Committed: Mon Sep 8 12:01:37 2014 -0700 -- CHANGES.txt | 1 + src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/6860d6fa/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 6c601e5..435b124 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 1.2.19 + * Don't index tombstones (CASSANDRA-7828) * Don't allow compacted sstables to be marked as compacting (CASSANDRA-7145) * Track expired tombstones (CASSANDRA-7810) * Validate empty cell names from counter updates (CASSANDRA-7798) http://git-wip-us.apache.org/repos/asf/cassandra/blob/6860d6fa/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java -- diff --git a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java index 7fefa13..8839228 100644 --- a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java +++ b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java @@ -443,7 +443,7 @@ public class SecondaryIndexManager { for (IColumn column : cf) { -if (index.indexes(column.name())) +if (column.isLive() && index.indexes(column.name())) ((PerColumnSecondaryIndex) index).insert(key, column); } }
[3/3] git commit: Merge branch 'cassandra-2.1' into trunk
Merge branch 'cassandra-2.1' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f34e829a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f34e829a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f34e829a Branch: refs/heads/trunk Commit: f34e829a2f583bf8b6b06c3099abba35902a5b81 Parents: f203f0f f1f5f5f Author: Mikhail Stepura Authored: Sun Sep 7 20:09:56 2014 -0700 Committer: Mikhail Stepura Committed: Sun Sep 7 20:09:56 2014 -0700 -- CHANGES.txt | 1 + bin/cqlsh| 165 +- pylib/cqlshlib/test/test_cqlsh_completion.py | 2 +- 3 files changed, 97 insertions(+), 71 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f34e829a/CHANGES.txt -- diff --cc CHANGES.txt index 674a72d,7737269..a9be239 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,25 -1,5 +1,26 @@@ +3.0 + * Support Java source code for user-defined functions (CASSANDRA-7562) + * Require arg types to disambiguate UDF drops (CASSANDRA-7812) + * Do anticompaction in groups (CASSANDRA-6851) + * Verify that UDF class methods are static (CASSANDRA-7781) + * Support pure user-defined functions (CASSANDRA-7395, 7740) + * Permit configurable timestamps with cassandra-stress (CASSANDRA-7416) + * Move sstable RandomAccessReader to nio2, which allows using the + FILE_SHARE_DELETE flag on Windows (CASSANDRA-4050) + * Remove CQL2 (CASSANDRA-5918) + * Add Thrift get_multi_slice call (CASSANDRA-6757) + * Optimize fetching multiple cells by name (CASSANDRA-6933) + * Allow compilation in java 8 (CASSANDRA-7028) + * Make incremental repair default (CASSANDRA-7250) + * Enable code coverage thru JaCoCo (CASSANDRA-7226) + * Switch external naming of 'column families' to 'tables' (CASSANDRA-4369) + * Shorten SSTable path (CASSANDRA-6962) + * Use unsafe mutations for most unit tests (CASSANDRA-6969) + * Fix race condition during calculation of pending ranges (CASSANDRA-7390) + + 2.1.1 + * (cqlsh): Support for query paging (CASSANDRA-7514) * (cqlsh): Show progress of COPY operations (CASSANDRA-7789) * Add syntax to remove multiple elements from a map (CASSANDRA-6599) * Support non-equals conditions in lightweight transactions (CASSANDRA-6839)
[2/3] git commit: (cqlsh): Support for query paging
(cqlsh): Support for query paging patch by Mikhail Stepura; reviewed by Aleksey Yeschenko for CASSANDRA-7514 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f1f5f5fd Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f1f5f5fd Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f1f5f5fd Branch: refs/heads/trunk Commit: f1f5f5fd3ac9bcf20fd68bae2f639ab12e2c360d Parents: a44d641 Author: Mikhail Stepura Authored: Fri Aug 29 13:13:16 2014 -0700 Committer: Mikhail Stepura Committed: Sun Sep 7 20:09:14 2014 -0700 -- CHANGES.txt | 1 + bin/cqlsh| 165 +- pylib/cqlshlib/test/test_cqlsh_completion.py | 2 +- 3 files changed, 97 insertions(+), 71 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f1f5f5fd/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 18d6872..7737269 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.1 + * (cqlsh): Support for query paging (CASSANDRA-7514) * (cqlsh): Show progress of COPY operations (CASSANDRA-7789) * Add syntax to remove multiple elements from a map (CASSANDRA-6599) * Support non-equals conditions in lightweight transactions (CASSANDRA-6839) http://git-wip-us.apache.org/repos/asf/cassandra/blob/f1f5f5fd/bin/cqlsh -- diff --git a/bin/cqlsh b/bin/cqlsh index dfce885..d61a008 100755 --- a/bin/cqlsh +++ b/bin/cqlsh @@ -105,7 +105,7 @@ except ImportError, e: 'Module load path: %r\n\n' 'Error: %s\n' % (sys.executable, sys.path, e)) -from cassandra.cluster import Cluster +from cassandra.cluster import Cluster, PagedResult from cassandra.query import SimpleStatement, ordered_dict_factory from cassandra.policies import WhiteListRoundRobinPolicy from cassandra.metadata import protect_name, protect_names, protect_value @@ -147,7 +147,6 @@ DEFAULT_PROTOCOL_VERSION = 3 DEFAULT_TIME_FORMAT = '%Y-%m-%d %H:%M:%S%z' DEFAULT_FLOAT_PRECISION = 5 -DEFAULT_SELECT_LIMIT = 1 DEFAULT_MAX_TRACE_WAIT = 10 if readline is not None and readline.__doc__ is not None and 'libedit' in readline.__doc__: @@ -204,6 +203,7 @@ my_commands_ending_with_newline = ( 'debug', 'tracing', 'expand', +'paging', 'exit', 'quit' ) @@ -231,6 +231,7 @@ cqlsh_extra_syntax_rules = r''' | | | + | ; ::= ( "DESCRIBE" | "DESC" ) @@ -294,6 +295,9 @@ cqlsh_extra_syntax_rules = r''' ::= "EXPAND" ( switch=( "ON" | "OFF" ) )? ; + ::= "PAGING" ( switch=( "ON" | "OFF" ) )? + ; + ::= "exit" | "quit" ; @@ -481,8 +485,10 @@ class Shell(cmd.Cmd): stop = False last_hist = None shunted_query_out = None +use_paging = True csv_dialect_defaults = dict(delimiter=',', doublequote=False, escapechar='\\', quotechar='"') +default_page_size = 100 def __init__(self, hostname, port, color=False, username=None, password=None, encoding=None, stdin=None, tty=True, @@ -899,16 +905,12 @@ class Shell(cmd.Cmd): stop_tracing = ksname == 'system_traces' or (ksname is None and self.current_keyspace == 'system_traces') self.tracing_enabled = self.tracing_enabled and not stop_tracing statement = parsed.extract_orig() -with_default_limit = parsed.get_binding('limit') is None -if with_default_limit: -statement = "%s LIMIT %d;" % (statement[:-1], DEFAULT_SELECT_LIMIT) -self.perform_statement(statement, with_default_limit=with_default_limit) +self.perform_statement(statement) self.tracing_enabled = tracing_was_enabled -def perform_statement(self, statement, with_default_limit=False): -stmt = SimpleStatement(statement, consistency_level=self.consistency_level) -result = self.perform_simple_statement(stmt, - with_default_limit=with_default_limit) +def perform_statement(self, statement): +stmt = SimpleStatement(statement, consistency_level=self.consistency_level, fetch_size=self.default_page_size if self.use_paging else None) +result = self.perform_simple_statement(stmt) if self.tracing_enabled: if stmt.trace: print_trace(self, stmt.trace) @@ -924,7 +926,7 @@ class Shell(cmd.Cmd): cf = self.cql_unprotect_name(parsed.get_binding('cfname')) return self.get_table_meta(ks, cf) -def perform_simple_statement(self, st
[1/3] git commit: (cqlsh): Support for query paging
Repository: cassandra Updated Branches: refs/heads/cassandra-2.1 a44d641e8 -> f1f5f5fd3 refs/heads/trunk f203f0f3f -> f34e829a2 (cqlsh): Support for query paging patch by Mikhail Stepura; reviewed by Aleksey Yeschenko for CASSANDRA-7514 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f1f5f5fd Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f1f5f5fd Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f1f5f5fd Branch: refs/heads/cassandra-2.1 Commit: f1f5f5fd3ac9bcf20fd68bae2f639ab12e2c360d Parents: a44d641 Author: Mikhail Stepura Authored: Fri Aug 29 13:13:16 2014 -0700 Committer: Mikhail Stepura Committed: Sun Sep 7 20:09:14 2014 -0700 -- CHANGES.txt | 1 + bin/cqlsh| 165 +- pylib/cqlshlib/test/test_cqlsh_completion.py | 2 +- 3 files changed, 97 insertions(+), 71 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f1f5f5fd/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 18d6872..7737269 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.1 + * (cqlsh): Support for query paging (CASSANDRA-7514) * (cqlsh): Show progress of COPY operations (CASSANDRA-7789) * Add syntax to remove multiple elements from a map (CASSANDRA-6599) * Support non-equals conditions in lightweight transactions (CASSANDRA-6839) http://git-wip-us.apache.org/repos/asf/cassandra/blob/f1f5f5fd/bin/cqlsh -- diff --git a/bin/cqlsh b/bin/cqlsh index dfce885..d61a008 100755 --- a/bin/cqlsh +++ b/bin/cqlsh @@ -105,7 +105,7 @@ except ImportError, e: 'Module load path: %r\n\n' 'Error: %s\n' % (sys.executable, sys.path, e)) -from cassandra.cluster import Cluster +from cassandra.cluster import Cluster, PagedResult from cassandra.query import SimpleStatement, ordered_dict_factory from cassandra.policies import WhiteListRoundRobinPolicy from cassandra.metadata import protect_name, protect_names, protect_value @@ -147,7 +147,6 @@ DEFAULT_PROTOCOL_VERSION = 3 DEFAULT_TIME_FORMAT = '%Y-%m-%d %H:%M:%S%z' DEFAULT_FLOAT_PRECISION = 5 -DEFAULT_SELECT_LIMIT = 1 DEFAULT_MAX_TRACE_WAIT = 10 if readline is not None and readline.__doc__ is not None and 'libedit' in readline.__doc__: @@ -204,6 +203,7 @@ my_commands_ending_with_newline = ( 'debug', 'tracing', 'expand', +'paging', 'exit', 'quit' ) @@ -231,6 +231,7 @@ cqlsh_extra_syntax_rules = r''' | | | + | ; ::= ( "DESCRIBE" | "DESC" ) @@ -294,6 +295,9 @@ cqlsh_extra_syntax_rules = r''' ::= "EXPAND" ( switch=( "ON" | "OFF" ) )? ; + ::= "PAGING" ( switch=( "ON" | "OFF" ) )? + ; + ::= "exit" | "quit" ; @@ -481,8 +485,10 @@ class Shell(cmd.Cmd): stop = False last_hist = None shunted_query_out = None +use_paging = True csv_dialect_defaults = dict(delimiter=',', doublequote=False, escapechar='\\', quotechar='"') +default_page_size = 100 def __init__(self, hostname, port, color=False, username=None, password=None, encoding=None, stdin=None, tty=True, @@ -899,16 +905,12 @@ class Shell(cmd.Cmd): stop_tracing = ksname == 'system_traces' or (ksname is None and self.current_keyspace == 'system_traces') self.tracing_enabled = self.tracing_enabled and not stop_tracing statement = parsed.extract_orig() -with_default_limit = parsed.get_binding('limit') is None -if with_default_limit: -statement = "%s LIMIT %d;" % (statement[:-1], DEFAULT_SELECT_LIMIT) -self.perform_statement(statement, with_default_limit=with_default_limit) +self.perform_statement(statement) self.tracing_enabled = tracing_was_enabled -def perform_statement(self, statement, with_default_limit=False): -stmt = SimpleStatement(statement, consistency_level=self.consistency_level) -result = self.perform_simple_statement(stmt, - with_default_limit=with_default_limit) +def perform_statement(self, statement): +stmt = SimpleStatement(statement, consistency_level=self.consistency_level, fetch_size=self.default_page_size if self.use_paging else None) +result = self.perform_simple_statement(stmt) if self.tracing_enabled: if stmt.trace: print_trace(self, stmt.trace) @@ -924,7 +926,7 @@ class Shell(cmd.Cmd): cf =
[1/6] git commit: (cqlsh) Removed "ALTER TYPE RENAME TO " from tab-completion
Repository: cassandra Updated Branches: refs/heads/cassandra-2.1 4f3a9c0bd -> 9aff086a4 refs/heads/cassandra-2.1.0 838151cab -> 1b3afd817 refs/heads/trunk e1651cb07 -> 131097c2c (cqlsh) Removed "ALTER TYPE RENAME TO " from tab-completion patch by Mikhail Stepura; reviewed by for CASSANDRA-7895 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/1b3afd81 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/1b3afd81 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/1b3afd81 Branch: refs/heads/cassandra-2.1 Commit: 1b3afd8173cfe02abc86963c7e371f46f0f0952c Parents: 838151c Author: Mikhail Stepura Authored: Sat Sep 6 18:45:08 2014 -0700 Committer: Mikhail Stepura Committed: Sat Sep 6 18:45:08 2014 -0700 -- CHANGES.txt| 2 ++ pylib/cqlshlib/cql3handling.py | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/1b3afd81/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index ea9a05c..46836bf 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,6 @@ 2.1.0 + * (cqlsh) Removed "ALTER TYPE RENAME TO " from tab-completion + (CASSANDRA-7895) * Fixed IllegalStateException in anticompaction (CASSANDRA-7892) * cqlsh: DESCRIBE support for frozen UDTs, tuples (CASSANDRA-7863) * Avoid exposing internal classes over JMX (CASSANDRA-7879) http://git-wip-us.apache.org/repos/asf/cassandra/blob/1b3afd81/pylib/cqlshlib/cql3handling.py -- diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py index 92b3e58..744b9b1 100644 --- a/pylib/cqlshlib/cql3handling.py +++ b/pylib/cqlshlib/cql3handling.py @@ -1055,10 +1055,10 @@ syntax_rules += r''' ::= "ALTER" "TYPE" ut= ; - ::= "RENAME" "TO" typename= - | "ALTER" existcol= "TYPE" + ::= "ALTER" existcol= "TYPE" | "ADD" newcol= | "RENAME" existcol= "TO" newcol= + ( "AND" existcol= "TO" newcol= )* ; ''' @@ -1075,7 +1075,6 @@ def alter_type_field_completer(ctxt, cass): return map(maybe_escape_name, fields) explain_completion('alterInstructions', 'newcol', '') -explain_completion('alterTypeInstructions', 'typename', '') explain_completion('alterTypeInstructions', 'newcol', '')
[5/6] git commit: Merge branch 'cassandra-2.1.0' into cassandra-2.1
Merge branch 'cassandra-2.1.0' into cassandra-2.1 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/9aff086a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/9aff086a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/9aff086a Branch: refs/heads/cassandra-2.1 Commit: 9aff086a489759195f57439bb4c3e46062a0d3de Parents: 4f3a9c0 1b3afd8 Author: Mikhail Stepura Authored: Sat Sep 6 19:57:56 2014 -0700 Committer: Mikhail Stepura Committed: Sat Sep 6 19:57:56 2014 -0700 -- CHANGES.txt| 2 ++ pylib/cqlshlib/cql3handling.py | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/9aff086a/CHANGES.txt -- diff --cc CHANGES.txt index 5271a83,46836bf..a8fd129 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,56 -1,6 +1,58 @@@ +2.1.1 + * (cqlsh): Show progress of COPY operations (CASSANDRA-7789) + * Add syntax to remove multiple elements from a map (CASSANDRA-6599) + * Support non-equals conditions in lightweight transactions (CASSANDRA-6839) + * Add IF [NOT] EXISTS to create/drop triggers (CASSANDRA-7606) + * (cqlsh) Display the current logged-in user (CASSANDRA-7785) + * (cqlsh) Don't ignore CTRL-C during COPY FROM execution (CASSANDRA-7815) + * (cqlsh) Order UDTs according to cross-type dependencies in DESCRIBE + output (CASSANDRA-7659) + * (cqlsh) Fix handling of CAS statement results (CASSANDRA-7671) + * (cqlsh) COPY TO/FROM improvements (CASSANDRA-7405) + * Support list index operations with conditions (CASSANDRA-7499) + * Add max live/tombstoned cells to nodetool cfstats output (CASSANDRA-7731) + * Validate IPv6 wildcard addresses properly (CASSANDRA-7680) + * (cqlsh) Error when tracing query (CASSANDRA-7613) + * Avoid IOOBE when building SyntaxError message snippet (CASSANDRA-7569) + * SSTableExport uses correct validator to create string representation of partition + keys (CASSANDRA-7498) + * Avoid NPEs when receiving type changes for an unknown keyspace (CASSANDRA-7689) + * Add support for custom 2i validation (CASSANDRA-7575) + * Pig support for hadoop CqlInputFormat (CASSANDRA-6454) + * Add listen_interface and rpc_interface options (CASSANDRA-7417) + * Improve schema merge performance (CASSANDRA-7444) + * Adjust MT depth based on # of partition validating (CASSANDRA-5263) + * Optimise NativeCell comparisons (CASSANDRA-6755) + * Configurable client timeout for cqlsh (CASSANDRA-7516) + * Include snippet of CQL query near syntax error in messages (CASSANDRA-7111) +Merged from 2.0: + * Explicitly disallow mixing multi-column and single-column + relations on clustering columns (CASSANDRA-7711) + * Better error message when condition is set on PK column (CASSANDRA-7804) + * Don't send schema change responses and events for no-op DDL + statements (CASSANDRA-7600) + * (Hadoop) fix cluster initialisation for a split fetching (CASSANDRA-7774) + * Throw InvalidRequestException when queries contain relations on entire + collection columns (CASSANDRA-7506) + * (cqlsh) enable CTRL-R history search with libedit (CASSANDRA-7577) + * (Hadoop) allow ACFRW to limit nodes to local DC (CASSANDRA-7252) + * (cqlsh) cqlsh should automatically disable tracing when selecting + from system_traces (CASSANDRA-7641) + * (Hadoop) Add CqlOutputFormat (CASSANDRA-6927) + * Don't depend on cassandra config for nodetool ring (CASSANDRA-7508) + * (cqlsh) Fix failing cqlsh formatting tests (CASSANDRA-7703) + * Fix IncompatibleClassChangeError from hadoop2 (CASSANDRA-7229) + * Add 'nodetool sethintedhandoffthrottlekb' (CASSANDRA-7635) + * (cqlsh) Add tab-completion for CREATE/DROP USER IF [NOT] EXISTS (CASSANDRA-7611) + * Catch errors when the JVM pulls the rug out from GCInspector (CASSANDRA-5345) + * cqlsh fails when version number parts are not int (CASSANDRA-7524) +Merged from 1.2: + * Improve PasswordAuthenticator default super user setup (CASSANDRA-7788) + + 2.1.0 + * (cqlsh) Removed "ALTER TYPE RENAME TO " from tab-completion +(CASSANDRA-7895) * Fixed IllegalStateException in anticompaction (CASSANDRA-7892) * cqlsh: DESCRIBE support for frozen UDTs, tuples (CASSANDRA-7863) * Avoid exposing internal classes over JMX (CASSANDRA-7879) http://git-wip-us.apache.org/repos/asf/cassandra/blob/9aff086a/pylib/cqlshlib/cql3handling.py --
[3/6] git commit: (cqlsh) Removed "ALTER TYPE RENAME TO " from tab-completion
(cqlsh) Removed "ALTER TYPE RENAME TO " from tab-completion patch by Mikhail Stepura; reviewed by for CASSANDRA-7895 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/1b3afd81 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/1b3afd81 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/1b3afd81 Branch: refs/heads/trunk Commit: 1b3afd8173cfe02abc86963c7e371f46f0f0952c Parents: 838151c Author: Mikhail Stepura Authored: Sat Sep 6 18:45:08 2014 -0700 Committer: Mikhail Stepura Committed: Sat Sep 6 18:45:08 2014 -0700 -- CHANGES.txt| 2 ++ pylib/cqlshlib/cql3handling.py | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/1b3afd81/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index ea9a05c..46836bf 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,6 @@ 2.1.0 + * (cqlsh) Removed "ALTER TYPE RENAME TO " from tab-completion + (CASSANDRA-7895) * Fixed IllegalStateException in anticompaction (CASSANDRA-7892) * cqlsh: DESCRIBE support for frozen UDTs, tuples (CASSANDRA-7863) * Avoid exposing internal classes over JMX (CASSANDRA-7879) http://git-wip-us.apache.org/repos/asf/cassandra/blob/1b3afd81/pylib/cqlshlib/cql3handling.py -- diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py index 92b3e58..744b9b1 100644 --- a/pylib/cqlshlib/cql3handling.py +++ b/pylib/cqlshlib/cql3handling.py @@ -1055,10 +1055,10 @@ syntax_rules += r''' ::= "ALTER" "TYPE" ut= ; - ::= "RENAME" "TO" typename= - | "ALTER" existcol= "TYPE" + ::= "ALTER" existcol= "TYPE" | "ADD" newcol= | "RENAME" existcol= "TO" newcol= + ( "AND" existcol= "TO" newcol= )* ; ''' @@ -1075,7 +1075,6 @@ def alter_type_field_completer(ctxt, cass): return map(maybe_escape_name, fields) explain_completion('alterInstructions', 'newcol', '') -explain_completion('alterTypeInstructions', 'typename', '') explain_completion('alterTypeInstructions', 'newcol', '')
[6/6] git commit: Merge branch 'cassandra-2.1' into trunk
Merge branch 'cassandra-2.1' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/131097c2 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/131097c2 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/131097c2 Branch: refs/heads/trunk Commit: 131097c2cbf95fe5134ddc2bdd27ff79c9b4a8c7 Parents: e1651cb 9aff086 Author: Mikhail Stepura Authored: Sat Sep 6 19:58:09 2014 -0700 Committer: Mikhail Stepura Committed: Sat Sep 6 19:58:09 2014 -0700 -- CHANGES.txt| 2 ++ pylib/cqlshlib/cql3handling.py | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/131097c2/CHANGES.txt -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/131097c2/pylib/cqlshlib/cql3handling.py --
[2/6] git commit: (cqlsh) Removed "ALTER TYPE RENAME TO " from tab-completion
(cqlsh) Removed "ALTER TYPE RENAME TO " from tab-completion patch by Mikhail Stepura; reviewed by for CASSANDRA-7895 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/1b3afd81 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/1b3afd81 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/1b3afd81 Branch: refs/heads/cassandra-2.1.0 Commit: 1b3afd8173cfe02abc86963c7e371f46f0f0952c Parents: 838151c Author: Mikhail Stepura Authored: Sat Sep 6 18:45:08 2014 -0700 Committer: Mikhail Stepura Committed: Sat Sep 6 18:45:08 2014 -0700 -- CHANGES.txt| 2 ++ pylib/cqlshlib/cql3handling.py | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/1b3afd81/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index ea9a05c..46836bf 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,6 @@ 2.1.0 + * (cqlsh) Removed "ALTER TYPE RENAME TO " from tab-completion + (CASSANDRA-7895) * Fixed IllegalStateException in anticompaction (CASSANDRA-7892) * cqlsh: DESCRIBE support for frozen UDTs, tuples (CASSANDRA-7863) * Avoid exposing internal classes over JMX (CASSANDRA-7879) http://git-wip-us.apache.org/repos/asf/cassandra/blob/1b3afd81/pylib/cqlshlib/cql3handling.py -- diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py index 92b3e58..744b9b1 100644 --- a/pylib/cqlshlib/cql3handling.py +++ b/pylib/cqlshlib/cql3handling.py @@ -1055,10 +1055,10 @@ syntax_rules += r''' ::= "ALTER" "TYPE" ut= ; - ::= "RENAME" "TO" typename= - | "ALTER" existcol= "TYPE" + ::= "ALTER" existcol= "TYPE" | "ADD" newcol= | "RENAME" existcol= "TO" newcol= + ( "AND" existcol= "TO" newcol= )* ; ''' @@ -1075,7 +1075,6 @@ def alter_type_field_completer(ctxt, cass): return map(maybe_escape_name, fields) explain_completion('alterInstructions', 'newcol', '') -explain_completion('alterTypeInstructions', 'typename', '') explain_completion('alterTypeInstructions', 'newcol', '')
[4/6] git commit: Merge branch 'cassandra-2.1.0' into cassandra-2.1
Merge branch 'cassandra-2.1.0' into cassandra-2.1 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/9aff086a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/9aff086a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/9aff086a Branch: refs/heads/trunk Commit: 9aff086a489759195f57439bb4c3e46062a0d3de Parents: 4f3a9c0 1b3afd8 Author: Mikhail Stepura Authored: Sat Sep 6 19:57:56 2014 -0700 Committer: Mikhail Stepura Committed: Sat Sep 6 19:57:56 2014 -0700 -- CHANGES.txt| 2 ++ pylib/cqlshlib/cql3handling.py | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/9aff086a/CHANGES.txt -- diff --cc CHANGES.txt index 5271a83,46836bf..a8fd129 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,56 -1,6 +1,58 @@@ +2.1.1 + * (cqlsh): Show progress of COPY operations (CASSANDRA-7789) + * Add syntax to remove multiple elements from a map (CASSANDRA-6599) + * Support non-equals conditions in lightweight transactions (CASSANDRA-6839) + * Add IF [NOT] EXISTS to create/drop triggers (CASSANDRA-7606) + * (cqlsh) Display the current logged-in user (CASSANDRA-7785) + * (cqlsh) Don't ignore CTRL-C during COPY FROM execution (CASSANDRA-7815) + * (cqlsh) Order UDTs according to cross-type dependencies in DESCRIBE + output (CASSANDRA-7659) + * (cqlsh) Fix handling of CAS statement results (CASSANDRA-7671) + * (cqlsh) COPY TO/FROM improvements (CASSANDRA-7405) + * Support list index operations with conditions (CASSANDRA-7499) + * Add max live/tombstoned cells to nodetool cfstats output (CASSANDRA-7731) + * Validate IPv6 wildcard addresses properly (CASSANDRA-7680) + * (cqlsh) Error when tracing query (CASSANDRA-7613) + * Avoid IOOBE when building SyntaxError message snippet (CASSANDRA-7569) + * SSTableExport uses correct validator to create string representation of partition + keys (CASSANDRA-7498) + * Avoid NPEs when receiving type changes for an unknown keyspace (CASSANDRA-7689) + * Add support for custom 2i validation (CASSANDRA-7575) + * Pig support for hadoop CqlInputFormat (CASSANDRA-6454) + * Add listen_interface and rpc_interface options (CASSANDRA-7417) + * Improve schema merge performance (CASSANDRA-7444) + * Adjust MT depth based on # of partition validating (CASSANDRA-5263) + * Optimise NativeCell comparisons (CASSANDRA-6755) + * Configurable client timeout for cqlsh (CASSANDRA-7516) + * Include snippet of CQL query near syntax error in messages (CASSANDRA-7111) +Merged from 2.0: + * Explicitly disallow mixing multi-column and single-column + relations on clustering columns (CASSANDRA-7711) + * Better error message when condition is set on PK column (CASSANDRA-7804) + * Don't send schema change responses and events for no-op DDL + statements (CASSANDRA-7600) + * (Hadoop) fix cluster initialisation for a split fetching (CASSANDRA-7774) + * Throw InvalidRequestException when queries contain relations on entire + collection columns (CASSANDRA-7506) + * (cqlsh) enable CTRL-R history search with libedit (CASSANDRA-7577) + * (Hadoop) allow ACFRW to limit nodes to local DC (CASSANDRA-7252) + * (cqlsh) cqlsh should automatically disable tracing when selecting + from system_traces (CASSANDRA-7641) + * (Hadoop) Add CqlOutputFormat (CASSANDRA-6927) + * Don't depend on cassandra config for nodetool ring (CASSANDRA-7508) + * (cqlsh) Fix failing cqlsh formatting tests (CASSANDRA-7703) + * Fix IncompatibleClassChangeError from hadoop2 (CASSANDRA-7229) + * Add 'nodetool sethintedhandoffthrottlekb' (CASSANDRA-7635) + * (cqlsh) Add tab-completion for CREATE/DROP USER IF [NOT] EXISTS (CASSANDRA-7611) + * Catch errors when the JVM pulls the rug out from GCInspector (CASSANDRA-5345) + * cqlsh fails when version number parts are not int (CASSANDRA-7524) +Merged from 1.2: + * Improve PasswordAuthenticator default super user setup (CASSANDRA-7788) + + 2.1.0 + * (cqlsh) Removed "ALTER TYPE RENAME TO " from tab-completion +(CASSANDRA-7895) * Fixed IllegalStateException in anticompaction (CASSANDRA-7892) * cqlsh: DESCRIBE support for frozen UDTs, tuples (CASSANDRA-7863) * Avoid exposing internal classes over JMX (CASSANDRA-7879) http://git-wip-us.apache.org/repos/asf/cassandra/blob/9aff086a/pylib/cqlshlib/cql3handling.py --
[1/6] git commit: Fixed handling of non-intersecting ranges in anticompaction
Repository: cassandra Updated Branches: refs/heads/cassandra-2.1 7d215692f -> 4f3a9c0bd refs/heads/cassandra-2.1.0 5d5401d67 -> 838151cab refs/heads/trunk bd889dc41 -> e1651cb07 Fixed handling of non-intersecting ranges in anticompaction patch by Mikhail Stepura; reviewed by Yuki Morishita for CASSANDRA-7892 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/838151ca Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/838151ca Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/838151ca Branch: refs/heads/cassandra-2.1 Commit: 838151caba98f88ff583e01bad087d4ead4a764d Parents: 5d5401d Author: Mikhail Stepura Authored: Fri Sep 5 22:44:38 2014 -0700 Committer: Mikhail Stepura Committed: Sat Sep 6 17:05:27 2014 -0700 -- CHANGES.txt | 1 + .../db/compaction/CompactionManager.java| 1 + .../db/compaction/AntiCompactionTest.java | 76 ++-- 3 files changed, 58 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/838151ca/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 28c39e6..ea9a05c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.0 + * Fixed IllegalStateException in anticompaction (CASSANDRA-7892) * cqlsh: DESCRIBE support for frozen UDTs, tuples (CASSANDRA-7863) * Avoid exposing internal classes over JMX (CASSANDRA-7879) * Add null check for keys when freezing collection (CASSANDRA-7869) http://git-wip-us.apache.org/repos/asf/cassandra/blob/838151ca/src/java/org/apache/cassandra/db/compaction/CompactionManager.java -- diff --git a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java index 09c068f..33a750b 100644 --- a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java +++ b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java @@ -430,6 +430,7 @@ public class CompactionManager implements CompactionManagerMBean logger.info("SSTable {} ({}) does not intersect repaired range {}, not touching repairedAt.", sstable, sstableRange, r); nonAnticompacting.add(sstable); sstableIterator.remove(); +break; } else { http://git-wip-us.apache.org/repos/asf/cassandra/blob/838151ca/test/unit/org/apache/cassandra/db/compaction/AntiCompactionTest.java -- diff --git a/test/unit/org/apache/cassandra/db/compaction/AntiCompactionTest.java b/test/unit/org/apache/cassandra/db/compaction/AntiCompactionTest.java index b8637a8..6e1ac5f 100644 --- a/test/unit/org/apache/cassandra/db/compaction/AntiCompactionTest.java +++ b/test/unit/org/apache/cassandra/db/compaction/AntiCompactionTest.java @@ -17,12 +17,17 @@ */ package org.apache.cassandra.db.compaction; +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; + import java.io.IOException; import java.util.Arrays; import java.util.Collection; import java.util.List; import java.util.concurrent.ExecutionException; -import org.junit.Test; import org.apache.cassandra.SchemaLoader; import org.apache.cassandra.Util; @@ -37,9 +42,10 @@ import org.apache.cassandra.io.sstable.SSTableIdentityIterator; import org.apache.cassandra.io.sstable.SSTableReader; import org.apache.cassandra.io.sstable.SSTableScanner; import org.apache.cassandra.utils.ByteBufferUtil; -import static junit.framework.Assert.assertFalse; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import org.junit.After; +import org.junit.Test; + +import com.google.common.collect.Iterables; public class AntiCompactionTest extends SchemaLoader { @@ -49,22 +55,7 @@ public class AntiCompactionTest extends SchemaLoader @Test public void antiCompactOne() throws InterruptedException, ExecutionException, IOException { -Keyspace keyspace = Keyspace.open(KEYSPACE1); -ColumnFamilyStore store = keyspace.getColumnFamilyStore(CF); -store.disableAutoCompaction(); -long timestamp = System.currentTimeMillis(); -for (int i = 0; i < 10; i++) -{ -DecoratedKey key = Util.dk(Integer.toString(i)); -Mutation rm = new Mutation(KEYSPACE1, key.getKey()); -for (int j = 0; j < 10; j++) -rm.add("Standard1
[5/6] git commit: Merge branch 'cassandra-2.1.0' into cassandra-2.1
Merge branch 'cassandra-2.1.0' into cassandra-2.1 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/4f3a9c0b Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4f3a9c0b Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4f3a9c0b Branch: refs/heads/cassandra-2.1 Commit: 4f3a9c0bd7ac9dccae3e805c15331df32b8b0b2a Parents: 7d21569 838151c Author: Mikhail Stepura Authored: Sat Sep 6 17:09:03 2014 -0700 Committer: Mikhail Stepura Committed: Sat Sep 6 17:09:03 2014 -0700 -- CHANGES.txt | 1 + .../db/compaction/CompactionManager.java| 1 + .../db/compaction/AntiCompactionTest.java | 76 ++-- 3 files changed, 58 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/4f3a9c0b/CHANGES.txt -- diff --cc CHANGES.txt index de7c9da,ea9a05c..5271a83 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,56 -1,5 +1,57 @@@ +2.1.1 + * (cqlsh): Show progress of COPY operations (CASSANDRA-7789) + * Add syntax to remove multiple elements from a map (CASSANDRA-6599) + * Support non-equals conditions in lightweight transactions (CASSANDRA-6839) + * Add IF [NOT] EXISTS to create/drop triggers (CASSANDRA-7606) + * (cqlsh) Display the current logged-in user (CASSANDRA-7785) + * (cqlsh) Don't ignore CTRL-C during COPY FROM execution (CASSANDRA-7815) + * (cqlsh) Order UDTs according to cross-type dependencies in DESCRIBE + output (CASSANDRA-7659) + * (cqlsh) Fix handling of CAS statement results (CASSANDRA-7671) + * (cqlsh) COPY TO/FROM improvements (CASSANDRA-7405) + * Support list index operations with conditions (CASSANDRA-7499) + * Add max live/tombstoned cells to nodetool cfstats output (CASSANDRA-7731) + * Validate IPv6 wildcard addresses properly (CASSANDRA-7680) + * (cqlsh) Error when tracing query (CASSANDRA-7613) + * Avoid IOOBE when building SyntaxError message snippet (CASSANDRA-7569) + * SSTableExport uses correct validator to create string representation of partition + keys (CASSANDRA-7498) + * Avoid NPEs when receiving type changes for an unknown keyspace (CASSANDRA-7689) + * Add support for custom 2i validation (CASSANDRA-7575) + * Pig support for hadoop CqlInputFormat (CASSANDRA-6454) + * Add listen_interface and rpc_interface options (CASSANDRA-7417) + * Improve schema merge performance (CASSANDRA-7444) + * Adjust MT depth based on # of partition validating (CASSANDRA-5263) + * Optimise NativeCell comparisons (CASSANDRA-6755) + * Configurable client timeout for cqlsh (CASSANDRA-7516) + * Include snippet of CQL query near syntax error in messages (CASSANDRA-7111) +Merged from 2.0: + * Explicitly disallow mixing multi-column and single-column + relations on clustering columns (CASSANDRA-7711) + * Better error message when condition is set on PK column (CASSANDRA-7804) + * Don't send schema change responses and events for no-op DDL + statements (CASSANDRA-7600) + * (Hadoop) fix cluster initialisation for a split fetching (CASSANDRA-7774) + * Throw InvalidRequestException when queries contain relations on entire + collection columns (CASSANDRA-7506) + * (cqlsh) enable CTRL-R history search with libedit (CASSANDRA-7577) + * (Hadoop) allow ACFRW to limit nodes to local DC (CASSANDRA-7252) + * (cqlsh) cqlsh should automatically disable tracing when selecting + from system_traces (CASSANDRA-7641) + * (Hadoop) Add CqlOutputFormat (CASSANDRA-6927) + * Don't depend on cassandra config for nodetool ring (CASSANDRA-7508) + * (cqlsh) Fix failing cqlsh formatting tests (CASSANDRA-7703) + * Fix IncompatibleClassChangeError from hadoop2 (CASSANDRA-7229) + * Add 'nodetool sethintedhandoffthrottlekb' (CASSANDRA-7635) + * (cqlsh) Add tab-completion for CREATE/DROP USER IF [NOT] EXISTS (CASSANDRA-7611) + * Catch errors when the JVM pulls the rug out from GCInspector (CASSANDRA-5345) + * cqlsh fails when version number parts are not int (CASSANDRA-7524) +Merged from 1.2: + * Improve PasswordAuthenticator default super user setup (CASSANDRA-7788) + + 2.1.0 + * Fixed IllegalStateException in anticompaction (CASSANDRA-7892) * cqlsh: DESCRIBE support for frozen UDTs, tuples (CASSANDRA-7863) * Avoid exposing internal classes over JMX (CASSANDRA-7879) * Add null check for keys when freezing collection (CASSANDRA-7869) http://git-wip-us.apache.org/repos/asf/cassandra/blob/4f3a9c0b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java --
[4/6] git commit: Merge branch 'cassandra-2.1.0' into cassandra-2.1
Merge branch 'cassandra-2.1.0' into cassandra-2.1 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/4f3a9c0b Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4f3a9c0b Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4f3a9c0b Branch: refs/heads/trunk Commit: 4f3a9c0bd7ac9dccae3e805c15331df32b8b0b2a Parents: 7d21569 838151c Author: Mikhail Stepura Authored: Sat Sep 6 17:09:03 2014 -0700 Committer: Mikhail Stepura Committed: Sat Sep 6 17:09:03 2014 -0700 -- CHANGES.txt | 1 + .../db/compaction/CompactionManager.java| 1 + .../db/compaction/AntiCompactionTest.java | 76 ++-- 3 files changed, 58 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/4f3a9c0b/CHANGES.txt -- diff --cc CHANGES.txt index de7c9da,ea9a05c..5271a83 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,56 -1,5 +1,57 @@@ +2.1.1 + * (cqlsh): Show progress of COPY operations (CASSANDRA-7789) + * Add syntax to remove multiple elements from a map (CASSANDRA-6599) + * Support non-equals conditions in lightweight transactions (CASSANDRA-6839) + * Add IF [NOT] EXISTS to create/drop triggers (CASSANDRA-7606) + * (cqlsh) Display the current logged-in user (CASSANDRA-7785) + * (cqlsh) Don't ignore CTRL-C during COPY FROM execution (CASSANDRA-7815) + * (cqlsh) Order UDTs according to cross-type dependencies in DESCRIBE + output (CASSANDRA-7659) + * (cqlsh) Fix handling of CAS statement results (CASSANDRA-7671) + * (cqlsh) COPY TO/FROM improvements (CASSANDRA-7405) + * Support list index operations with conditions (CASSANDRA-7499) + * Add max live/tombstoned cells to nodetool cfstats output (CASSANDRA-7731) + * Validate IPv6 wildcard addresses properly (CASSANDRA-7680) + * (cqlsh) Error when tracing query (CASSANDRA-7613) + * Avoid IOOBE when building SyntaxError message snippet (CASSANDRA-7569) + * SSTableExport uses correct validator to create string representation of partition + keys (CASSANDRA-7498) + * Avoid NPEs when receiving type changes for an unknown keyspace (CASSANDRA-7689) + * Add support for custom 2i validation (CASSANDRA-7575) + * Pig support for hadoop CqlInputFormat (CASSANDRA-6454) + * Add listen_interface and rpc_interface options (CASSANDRA-7417) + * Improve schema merge performance (CASSANDRA-7444) + * Adjust MT depth based on # of partition validating (CASSANDRA-5263) + * Optimise NativeCell comparisons (CASSANDRA-6755) + * Configurable client timeout for cqlsh (CASSANDRA-7516) + * Include snippet of CQL query near syntax error in messages (CASSANDRA-7111) +Merged from 2.0: + * Explicitly disallow mixing multi-column and single-column + relations on clustering columns (CASSANDRA-7711) + * Better error message when condition is set on PK column (CASSANDRA-7804) + * Don't send schema change responses and events for no-op DDL + statements (CASSANDRA-7600) + * (Hadoop) fix cluster initialisation for a split fetching (CASSANDRA-7774) + * Throw InvalidRequestException when queries contain relations on entire + collection columns (CASSANDRA-7506) + * (cqlsh) enable CTRL-R history search with libedit (CASSANDRA-7577) + * (Hadoop) allow ACFRW to limit nodes to local DC (CASSANDRA-7252) + * (cqlsh) cqlsh should automatically disable tracing when selecting + from system_traces (CASSANDRA-7641) + * (Hadoop) Add CqlOutputFormat (CASSANDRA-6927) + * Don't depend on cassandra config for nodetool ring (CASSANDRA-7508) + * (cqlsh) Fix failing cqlsh formatting tests (CASSANDRA-7703) + * Fix IncompatibleClassChangeError from hadoop2 (CASSANDRA-7229) + * Add 'nodetool sethintedhandoffthrottlekb' (CASSANDRA-7635) + * (cqlsh) Add tab-completion for CREATE/DROP USER IF [NOT] EXISTS (CASSANDRA-7611) + * Catch errors when the JVM pulls the rug out from GCInspector (CASSANDRA-5345) + * cqlsh fails when version number parts are not int (CASSANDRA-7524) +Merged from 1.2: + * Improve PasswordAuthenticator default super user setup (CASSANDRA-7788) + + 2.1.0 + * Fixed IllegalStateException in anticompaction (CASSANDRA-7892) * cqlsh: DESCRIBE support for frozen UDTs, tuples (CASSANDRA-7863) * Avoid exposing internal classes over JMX (CASSANDRA-7879) * Add null check for keys when freezing collection (CASSANDRA-7869) http://git-wip-us.apache.org/repos/asf/cassandra/blob/4f3a9c0b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java --
[2/6] git commit: Fixed handling of non-intersecting ranges in anticompaction
Fixed handling of non-intersecting ranges in anticompaction patch by Mikhail Stepura; reviewed by Yuki Morishita for CASSANDRA-7892 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/838151ca Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/838151ca Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/838151ca Branch: refs/heads/cassandra-2.1.0 Commit: 838151caba98f88ff583e01bad087d4ead4a764d Parents: 5d5401d Author: Mikhail Stepura Authored: Fri Sep 5 22:44:38 2014 -0700 Committer: Mikhail Stepura Committed: Sat Sep 6 17:05:27 2014 -0700 -- CHANGES.txt | 1 + .../db/compaction/CompactionManager.java| 1 + .../db/compaction/AntiCompactionTest.java | 76 ++-- 3 files changed, 58 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/838151ca/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 28c39e6..ea9a05c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.0 + * Fixed IllegalStateException in anticompaction (CASSANDRA-7892) * cqlsh: DESCRIBE support for frozen UDTs, tuples (CASSANDRA-7863) * Avoid exposing internal classes over JMX (CASSANDRA-7879) * Add null check for keys when freezing collection (CASSANDRA-7869) http://git-wip-us.apache.org/repos/asf/cassandra/blob/838151ca/src/java/org/apache/cassandra/db/compaction/CompactionManager.java -- diff --git a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java index 09c068f..33a750b 100644 --- a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java +++ b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java @@ -430,6 +430,7 @@ public class CompactionManager implements CompactionManagerMBean logger.info("SSTable {} ({}) does not intersect repaired range {}, not touching repairedAt.", sstable, sstableRange, r); nonAnticompacting.add(sstable); sstableIterator.remove(); +break; } else { http://git-wip-us.apache.org/repos/asf/cassandra/blob/838151ca/test/unit/org/apache/cassandra/db/compaction/AntiCompactionTest.java -- diff --git a/test/unit/org/apache/cassandra/db/compaction/AntiCompactionTest.java b/test/unit/org/apache/cassandra/db/compaction/AntiCompactionTest.java index b8637a8..6e1ac5f 100644 --- a/test/unit/org/apache/cassandra/db/compaction/AntiCompactionTest.java +++ b/test/unit/org/apache/cassandra/db/compaction/AntiCompactionTest.java @@ -17,12 +17,17 @@ */ package org.apache.cassandra.db.compaction; +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; + import java.io.IOException; import java.util.Arrays; import java.util.Collection; import java.util.List; import java.util.concurrent.ExecutionException; -import org.junit.Test; import org.apache.cassandra.SchemaLoader; import org.apache.cassandra.Util; @@ -37,9 +42,10 @@ import org.apache.cassandra.io.sstable.SSTableIdentityIterator; import org.apache.cassandra.io.sstable.SSTableReader; import org.apache.cassandra.io.sstable.SSTableScanner; import org.apache.cassandra.utils.ByteBufferUtil; -import static junit.framework.Assert.assertFalse; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import org.junit.After; +import org.junit.Test; + +import com.google.common.collect.Iterables; public class AntiCompactionTest extends SchemaLoader { @@ -49,22 +55,7 @@ public class AntiCompactionTest extends SchemaLoader @Test public void antiCompactOne() throws InterruptedException, ExecutionException, IOException { -Keyspace keyspace = Keyspace.open(KEYSPACE1); -ColumnFamilyStore store = keyspace.getColumnFamilyStore(CF); -store.disableAutoCompaction(); -long timestamp = System.currentTimeMillis(); -for (int i = 0; i < 10; i++) -{ -DecoratedKey key = Util.dk(Integer.toString(i)); -Mutation rm = new Mutation(KEYSPACE1, key.getKey()); -for (int j = 0; j < 10; j++) -rm.add("Standard1", Util.cellname(Integer.toString(j)), - ByteBufferUtil.EMPTY_BYTE_BUFFER, - timestamp, - 0); -rm.apply();
[3/6] git commit: Fixed handling of non-intersecting ranges in anticompaction
Fixed handling of non-intersecting ranges in anticompaction patch by Mikhail Stepura; reviewed by Yuki Morishita for CASSANDRA-7892 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/838151ca Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/838151ca Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/838151ca Branch: refs/heads/trunk Commit: 838151caba98f88ff583e01bad087d4ead4a764d Parents: 5d5401d Author: Mikhail Stepura Authored: Fri Sep 5 22:44:38 2014 -0700 Committer: Mikhail Stepura Committed: Sat Sep 6 17:05:27 2014 -0700 -- CHANGES.txt | 1 + .../db/compaction/CompactionManager.java| 1 + .../db/compaction/AntiCompactionTest.java | 76 ++-- 3 files changed, 58 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/838151ca/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 28c39e6..ea9a05c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.0 + * Fixed IllegalStateException in anticompaction (CASSANDRA-7892) * cqlsh: DESCRIBE support for frozen UDTs, tuples (CASSANDRA-7863) * Avoid exposing internal classes over JMX (CASSANDRA-7879) * Add null check for keys when freezing collection (CASSANDRA-7869) http://git-wip-us.apache.org/repos/asf/cassandra/blob/838151ca/src/java/org/apache/cassandra/db/compaction/CompactionManager.java -- diff --git a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java index 09c068f..33a750b 100644 --- a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java +++ b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java @@ -430,6 +430,7 @@ public class CompactionManager implements CompactionManagerMBean logger.info("SSTable {} ({}) does not intersect repaired range {}, not touching repairedAt.", sstable, sstableRange, r); nonAnticompacting.add(sstable); sstableIterator.remove(); +break; } else { http://git-wip-us.apache.org/repos/asf/cassandra/blob/838151ca/test/unit/org/apache/cassandra/db/compaction/AntiCompactionTest.java -- diff --git a/test/unit/org/apache/cassandra/db/compaction/AntiCompactionTest.java b/test/unit/org/apache/cassandra/db/compaction/AntiCompactionTest.java index b8637a8..6e1ac5f 100644 --- a/test/unit/org/apache/cassandra/db/compaction/AntiCompactionTest.java +++ b/test/unit/org/apache/cassandra/db/compaction/AntiCompactionTest.java @@ -17,12 +17,17 @@ */ package org.apache.cassandra.db.compaction; +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; + import java.io.IOException; import java.util.Arrays; import java.util.Collection; import java.util.List; import java.util.concurrent.ExecutionException; -import org.junit.Test; import org.apache.cassandra.SchemaLoader; import org.apache.cassandra.Util; @@ -37,9 +42,10 @@ import org.apache.cassandra.io.sstable.SSTableIdentityIterator; import org.apache.cassandra.io.sstable.SSTableReader; import org.apache.cassandra.io.sstable.SSTableScanner; import org.apache.cassandra.utils.ByteBufferUtil; -import static junit.framework.Assert.assertFalse; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import org.junit.After; +import org.junit.Test; + +import com.google.common.collect.Iterables; public class AntiCompactionTest extends SchemaLoader { @@ -49,22 +55,7 @@ public class AntiCompactionTest extends SchemaLoader @Test public void antiCompactOne() throws InterruptedException, ExecutionException, IOException { -Keyspace keyspace = Keyspace.open(KEYSPACE1); -ColumnFamilyStore store = keyspace.getColumnFamilyStore(CF); -store.disableAutoCompaction(); -long timestamp = System.currentTimeMillis(); -for (int i = 0; i < 10; i++) -{ -DecoratedKey key = Util.dk(Integer.toString(i)); -Mutation rm = new Mutation(KEYSPACE1, key.getKey()); -for (int j = 0; j < 10; j++) -rm.add("Standard1", Util.cellname(Integer.toString(j)), - ByteBufferUtil.EMPTY_BYTE_BUFFER, - timestamp, - 0); -rm.apply(); -
[6/6] git commit: Merge branch 'cassandra-2.1' into trunk
Merge branch 'cassandra-2.1' into trunk Conflicts: test/unit/org/apache/cassandra/db/compaction/AntiCompactionTest.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/e1651cb0 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e1651cb0 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e1651cb0 Branch: refs/heads/trunk Commit: e1651cb07b7de35a2b7076b4b1c82572fee5ad63 Parents: bd889dc 4f3a9c0 Author: Mikhail Stepura Authored: Sat Sep 6 17:20:24 2014 -0700 Committer: Mikhail Stepura Committed: Sat Sep 6 17:20:24 2014 -0700 -- CHANGES.txt | 1 + .../db/compaction/CompactionManager.java| 1 + .../db/compaction/AntiCompactionTest.java | 49 3 files changed, 41 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/e1651cb0/CHANGES.txt -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/e1651cb0/src/java/org/apache/cassandra/db/compaction/CompactionManager.java -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/e1651cb0/test/unit/org/apache/cassandra/db/compaction/AntiCompactionTest.java -- diff --cc test/unit/org/apache/cassandra/db/compaction/AntiCompactionTest.java index f632a65,6e1ac5f..cd5dc7f --- a/test/unit/org/apache/cassandra/db/compaction/AntiCompactionTest.java +++ b/test/unit/org/apache/cassandra/db/compaction/AntiCompactionTest.java @@@ -23,15 -29,8 +29,9 @@@ import java.util.Collection import java.util.List; import java.util.concurrent.ExecutionException; - import org.apache.cassandra.config.KSMetaData; - import org.apache.cassandra.exceptions.ConfigurationException; - import org.apache.cassandra.locator.SimpleStrategy; - import org.junit.BeforeClass; - import org.junit.After; - import org.junit.Test; - import org.apache.cassandra.SchemaLoader; import org.apache.cassandra.Util; ++import org.apache.cassandra.config.KSMetaData; import org.apache.cassandra.db.ColumnFamilyStore; import org.apache.cassandra.db.DecoratedKey; import org.apache.cassandra.db.Keyspace; @@@ -39,39 -38,20 +39,44 @@@ import org.apache.cassandra.db.Mutation import org.apache.cassandra.dht.BytesToken; import org.apache.cassandra.dht.Range; import org.apache.cassandra.dht.Token; ++import org.apache.cassandra.exceptions.ConfigurationException; import org.apache.cassandra.io.sstable.SSTableIdentityIterator; import org.apache.cassandra.io.sstable.SSTableReader; import org.apache.cassandra.io.sstable.SSTableScanner; ++import org.apache.cassandra.locator.SimpleStrategy; +import org.apache.cassandra.service.ActiveRepairService; import org.apache.cassandra.utils.ByteBufferUtil; - import static junit.framework.Assert.assertFalse; - import static org.junit.Assert.assertEquals; - import static org.junit.Assert.assertTrue; ++ + import org.junit.After; ++import org.junit.BeforeClass; + import org.junit.Test; + + import com.google.common.collect.Iterables; -public class AntiCompactionTest extends SchemaLoader +public class AntiCompactionTest { -private static final String KEYSPACE1 = "Keyspace1"; +private static final String KEYSPACE1 = "AntiCompactionTest"; private static final String CF = "Standard1"; + +@BeforeClass +public static void defineSchema() throws ConfigurationException +{ +SchemaLoader.prepareServer(); +SchemaLoader.createKeyspace(KEYSPACE1, +SimpleStrategy.class, +KSMetaData.optsWithRF(1), +SchemaLoader.standardCFMD(KEYSPACE1, CF)); +} + +@After +public void truncateCF() +{ +Keyspace keyspace = Keyspace.open(KEYSPACE1); +ColumnFamilyStore store = keyspace.getColumnFamilyStore(CF); +store.truncateBlocking(); +} + @Test public void antiCompactOne() throws InterruptedException, ExecutionException, IOException { @@@ -157,50 -110,28 +162,74 @@@ { Keyspace keyspace = Keyspace.open(KEYSPACE1); ColumnFamilyStore store = keyspace.getColumnFamilyStore(CF); +store.setCompactionStrategyClass(compactionStrategy); store.disableAutoCompaction(); -long timestamp = System.currentTimeMillis(); -for (int i = 0; i < 10; i++) + +for (int table = 0; table < 10; table++) { -DecoratedKey key = Util.dk(Integer.toString(i)); -Mutation rm = new Mutation(KEYSPACE1, key.getKey()); -for (int j = 0; j < 10; j++) -rm.add("Standard1", Util.cellnam
[2/6] git commit: Ninja: cqlsh test fixed for 2.1.0
Ninja: cqlsh test fixed for 2.1.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/dd4fbbcd Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/dd4fbbcd Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/dd4fbbcd Branch: refs/heads/cassandra-2.1.0 Commit: dd4fbbcd8cce48d763b4ec93c97b09d80ebd532e Parents: 37c6b2f Author: Mikhail Stepura Authored: Thu Sep 4 13:31:50 2014 -0700 Committer: Mikhail Stepura Committed: Thu Sep 4 13:49:43 2014 -0700 -- pylib/cqlshlib/test/test_cqlsh_output.py | 77 + pylib/cqlshlib/test/test_keyspace_init.cql | 17 ++ 2 files changed, 20 insertions(+), 74 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/dd4fbbcd/pylib/cqlshlib/test/test_cqlsh_output.py -- diff --git a/pylib/cqlshlib/test/test_cqlsh_output.py b/pylib/cqlshlib/test/test_cqlsh_output.py index 6fb4f41..072dd23 100644 --- a/pylib/cqlshlib/test/test_cqlsh_output.py +++ b/pylib/cqlshlib/test/test_cqlsh_output.py @@ -101,25 +101,22 @@ class TestCqlshOutput(BaseTestCase): self.assertNoHasColors(c.read_to_next_prompt()) def test_no_prompt_or_colors_output(self): -# CQL queries and number of lines expected in output: -queries = (('select * from has_all_types limit 1;', 7), - ('select * from has_value_encoding_errors limit 1;', 8)) for termname in ('', 'dumb', 'vt100', 'xterm'): cqlshlog.debug('TERM=%r' % termname) -for cql, lines_expected in queries: -output, result = testcall_cqlsh(prompt=None, env={'TERM': termname}, -tty=False, input=cql + '\n') -output = output.splitlines() -for line in output: -self.assertNoHasColors(line) -self.assertNotRegexpMatches(line, r'^cqlsh\S*>') -self.assertEqual(len(output), lines_expected, - msg='output: %r' % '\n'.join(output)) -self.assertEqual(output[0], '') -self.assertNicelyFormattedTableHeader(output[1]) -self.assertNicelyFormattedTableRule(output[2]) -self.assertNicelyFormattedTableData(output[3]) -self.assertEqual(output[4].strip(), '') +query = 'select * from has_all_types limit 1;' +output, result = testcall_cqlsh(prompt=None, env={'TERM': termname}, +tty=False, input=query + '\n') +output = output.splitlines() +for line in output: +self.assertNoHasColors(line) +self.assertNotRegexpMatches(line, r'^cqlsh\S*>') +self.assertTrue(6 <= len(output) <= 8, + msg='output: %r' % '\n'.join(output)) +self.assertEqual(output[0], '') +self.assertNicelyFormattedTableHeader(output[1]) +self.assertNicelyFormattedTableRule(output[2]) +self.assertNicelyFormattedTableData(output[3]) +self.assertEqual(output[4].strip(), '') def test_color_output(self): for termname in ('xterm', 'unknown-garbage'): @@ -449,13 +446,11 @@ class TestCqlshOutput(BaseTestCase): G YYmmY 2 | \x00\x01\x02\x03\x04\x05control chars\x06\x07 G Y - 3 | \xfe\xffbyte order mark - G YYY 4 | fake special chars\x00\n G -(5 rows) +(4 rows) """), ), cqlver=cqlsh.DEFAULT_CQLVER) @@ -525,46 +520,6 @@ class TestCqlshOutput(BaseTestCase): # explicitly generate an exception on the deserialization of type X.. pass -def test_colval_decoding_errors(self): -self.assertCqlverQueriesGiveColoredOutput(( -("select * from has_value_encoding_errors;", r""" - pkey | utf8col - MMM ---+ - -A | '\x00\xff\x00\xff' -Y RR - - -(1 rows) - - - -Failed to decode value '\x00\xff\x00\xff' (for column 'utf8col') as text: 'utf8' codec can't decode byte 0xff in position 1: invalid start byte - R
[6/6] git commit: Merge branch 'cassandra-2.1' into trunk
Merge branch 'cassandra-2.1' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b74342a8 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b74342a8 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b74342a8 Branch: refs/heads/trunk Commit: b74342a8aaf775357b5087db35e8eefe2fbd4ed0 Parents: 2f3fab1 bd396ec Author: Mikhail Stepura Authored: Thu Sep 4 13:51:53 2014 -0700 Committer: Mikhail Stepura Committed: Thu Sep 4 13:51:53 2014 -0700 -- --
[1/6] git commit: Ninja: cqlsh test fixed for 2.1.0
Repository: cassandra Updated Branches: refs/heads/cassandra-2.1 c54126bb4 -> bd396ec8a refs/heads/cassandra-2.1.0 37c6b2f22 -> dd4fbbcd8 refs/heads/trunk 2f3fab14f -> b74342a8a Ninja: cqlsh test fixed for 2.1.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/dd4fbbcd Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/dd4fbbcd Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/dd4fbbcd Branch: refs/heads/cassandra-2.1 Commit: dd4fbbcd8cce48d763b4ec93c97b09d80ebd532e Parents: 37c6b2f Author: Mikhail Stepura Authored: Thu Sep 4 13:31:50 2014 -0700 Committer: Mikhail Stepura Committed: Thu Sep 4 13:49:43 2014 -0700 -- pylib/cqlshlib/test/test_cqlsh_output.py | 77 + pylib/cqlshlib/test/test_keyspace_init.cql | 17 ++ 2 files changed, 20 insertions(+), 74 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/dd4fbbcd/pylib/cqlshlib/test/test_cqlsh_output.py -- diff --git a/pylib/cqlshlib/test/test_cqlsh_output.py b/pylib/cqlshlib/test/test_cqlsh_output.py index 6fb4f41..072dd23 100644 --- a/pylib/cqlshlib/test/test_cqlsh_output.py +++ b/pylib/cqlshlib/test/test_cqlsh_output.py @@ -101,25 +101,22 @@ class TestCqlshOutput(BaseTestCase): self.assertNoHasColors(c.read_to_next_prompt()) def test_no_prompt_or_colors_output(self): -# CQL queries and number of lines expected in output: -queries = (('select * from has_all_types limit 1;', 7), - ('select * from has_value_encoding_errors limit 1;', 8)) for termname in ('', 'dumb', 'vt100', 'xterm'): cqlshlog.debug('TERM=%r' % termname) -for cql, lines_expected in queries: -output, result = testcall_cqlsh(prompt=None, env={'TERM': termname}, -tty=False, input=cql + '\n') -output = output.splitlines() -for line in output: -self.assertNoHasColors(line) -self.assertNotRegexpMatches(line, r'^cqlsh\S*>') -self.assertEqual(len(output), lines_expected, - msg='output: %r' % '\n'.join(output)) -self.assertEqual(output[0], '') -self.assertNicelyFormattedTableHeader(output[1]) -self.assertNicelyFormattedTableRule(output[2]) -self.assertNicelyFormattedTableData(output[3]) -self.assertEqual(output[4].strip(), '') +query = 'select * from has_all_types limit 1;' +output, result = testcall_cqlsh(prompt=None, env={'TERM': termname}, +tty=False, input=query + '\n') +output = output.splitlines() +for line in output: +self.assertNoHasColors(line) +self.assertNotRegexpMatches(line, r'^cqlsh\S*>') +self.assertTrue(6 <= len(output) <= 8, + msg='output: %r' % '\n'.join(output)) +self.assertEqual(output[0], '') +self.assertNicelyFormattedTableHeader(output[1]) +self.assertNicelyFormattedTableRule(output[2]) +self.assertNicelyFormattedTableData(output[3]) +self.assertEqual(output[4].strip(), '') def test_color_output(self): for termname in ('xterm', 'unknown-garbage'): @@ -449,13 +446,11 @@ class TestCqlshOutput(BaseTestCase): G YYmmY 2 | \x00\x01\x02\x03\x04\x05control chars\x06\x07 G Y - 3 | \xfe\xffbyte order mark - G YYY 4 | fake special chars\x00\n G -(5 rows) +(4 rows) """), ), cqlver=cqlsh.DEFAULT_CQLVER) @@ -525,46 +520,6 @@ class TestCqlshOutput(BaseTestCase): # explicitly generate an exception on the deserialization of type X.. pass -def test_colval_decoding_errors(self): -self.assertCqlverQueriesGiveColoredOutput(( -("select * from has_value_encoding_errors;", r""" - pkey | utf8col - MMM ---+ - -A | '\x00\xff\x00\xff' -Y RR - - -(1 rows) - - - -Failed to decode value '\x00\xff\x00\xff' (for column 'utf8col') as text: 'utf8' codec can't decode byte 0xff i
[4/6] git commit: Merge branch 'cassandra-2.1.0' into cassandra-2.1
Merge branch 'cassandra-2.1.0' into cassandra-2.1 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/bd396ec8 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/bd396ec8 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/bd396ec8 Branch: refs/heads/trunk Commit: bd396ec8acb74436fd84a9cf48542c49e08a17a6 Parents: c54126b dd4fbbc Author: Mikhail Stepura Authored: Thu Sep 4 13:51:39 2014 -0700 Committer: Mikhail Stepura Committed: Thu Sep 4 13:51:39 2014 -0700 -- --
[3/6] git commit: Ninja: cqlsh test fixed for 2.1.0
Ninja: cqlsh test fixed for 2.1.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/dd4fbbcd Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/dd4fbbcd Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/dd4fbbcd Branch: refs/heads/trunk Commit: dd4fbbcd8cce48d763b4ec93c97b09d80ebd532e Parents: 37c6b2f Author: Mikhail Stepura Authored: Thu Sep 4 13:31:50 2014 -0700 Committer: Mikhail Stepura Committed: Thu Sep 4 13:49:43 2014 -0700 -- pylib/cqlshlib/test/test_cqlsh_output.py | 77 + pylib/cqlshlib/test/test_keyspace_init.cql | 17 ++ 2 files changed, 20 insertions(+), 74 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/dd4fbbcd/pylib/cqlshlib/test/test_cqlsh_output.py -- diff --git a/pylib/cqlshlib/test/test_cqlsh_output.py b/pylib/cqlshlib/test/test_cqlsh_output.py index 6fb4f41..072dd23 100644 --- a/pylib/cqlshlib/test/test_cqlsh_output.py +++ b/pylib/cqlshlib/test/test_cqlsh_output.py @@ -101,25 +101,22 @@ class TestCqlshOutput(BaseTestCase): self.assertNoHasColors(c.read_to_next_prompt()) def test_no_prompt_or_colors_output(self): -# CQL queries and number of lines expected in output: -queries = (('select * from has_all_types limit 1;', 7), - ('select * from has_value_encoding_errors limit 1;', 8)) for termname in ('', 'dumb', 'vt100', 'xterm'): cqlshlog.debug('TERM=%r' % termname) -for cql, lines_expected in queries: -output, result = testcall_cqlsh(prompt=None, env={'TERM': termname}, -tty=False, input=cql + '\n') -output = output.splitlines() -for line in output: -self.assertNoHasColors(line) -self.assertNotRegexpMatches(line, r'^cqlsh\S*>') -self.assertEqual(len(output), lines_expected, - msg='output: %r' % '\n'.join(output)) -self.assertEqual(output[0], '') -self.assertNicelyFormattedTableHeader(output[1]) -self.assertNicelyFormattedTableRule(output[2]) -self.assertNicelyFormattedTableData(output[3]) -self.assertEqual(output[4].strip(), '') +query = 'select * from has_all_types limit 1;' +output, result = testcall_cqlsh(prompt=None, env={'TERM': termname}, +tty=False, input=query + '\n') +output = output.splitlines() +for line in output: +self.assertNoHasColors(line) +self.assertNotRegexpMatches(line, r'^cqlsh\S*>') +self.assertTrue(6 <= len(output) <= 8, + msg='output: %r' % '\n'.join(output)) +self.assertEqual(output[0], '') +self.assertNicelyFormattedTableHeader(output[1]) +self.assertNicelyFormattedTableRule(output[2]) +self.assertNicelyFormattedTableData(output[3]) +self.assertEqual(output[4].strip(), '') def test_color_output(self): for termname in ('xterm', 'unknown-garbage'): @@ -449,13 +446,11 @@ class TestCqlshOutput(BaseTestCase): G YYmmY 2 | \x00\x01\x02\x03\x04\x05control chars\x06\x07 G Y - 3 | \xfe\xffbyte order mark - G YYY 4 | fake special chars\x00\n G -(5 rows) +(4 rows) """), ), cqlver=cqlsh.DEFAULT_CQLVER) @@ -525,46 +520,6 @@ class TestCqlshOutput(BaseTestCase): # explicitly generate an exception on the deserialization of type X.. pass -def test_colval_decoding_errors(self): -self.assertCqlverQueriesGiveColoredOutput(( -("select * from has_value_encoding_errors;", r""" - pkey | utf8col - MMM ---+ - -A | '\x00\xff\x00\xff' -Y RR - - -(1 rows) - - - -Failed to decode value '\x00\xff\x00\xff' (for column 'utf8col') as text: 'utf8' codec can't decode byte 0xff in position 1: invalid start byte - RRR
[5/6] git commit: Merge branch 'cassandra-2.1.0' into cassandra-2.1
Merge branch 'cassandra-2.1.0' into cassandra-2.1 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/bd396ec8 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/bd396ec8 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/bd396ec8 Branch: refs/heads/cassandra-2.1 Commit: bd396ec8acb74436fd84a9cf48542c49e08a17a6 Parents: c54126b dd4fbbc Author: Mikhail Stepura Authored: Thu Sep 4 13:51:39 2014 -0700 Committer: Mikhail Stepura Committed: Thu Sep 4 13:51:39 2014 -0700 -- --
[3/3] git commit: Merge branch 'cassandra-2.1' into trunk
Merge branch 'cassandra-2.1' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/2f3fab14 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/2f3fab14 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/2f3fab14 Branch: refs/heads/trunk Commit: 2f3fab14f055fe64d5091171d2e7d54899fe63c5 Parents: befd0b9 c54126b Author: Mikhail Stepura Authored: Thu Sep 4 13:36:36 2014 -0700 Committer: Mikhail Stepura Committed: Thu Sep 4 13:36:36 2014 -0700 -- pylib/cqlshlib/test/test_keyspace_init.cql | 8 1 file changed, 4 insertions(+), 4 deletions(-) --
[1/3] git commit: Ninja: adjusted cqlsh tests for CASSANDRA-7857
Repository: cassandra Updated Branches: refs/heads/cassandra-2.1 76508213d -> c54126bb4 refs/heads/trunk befd0b900 -> 2f3fab14f Ninja: adjusted cqlsh tests for CASSANDRA-7857 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c54126bb Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c54126bb Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c54126bb Branch: refs/heads/cassandra-2.1 Commit: c54126bb47c90bdb67810d71f61e371088778bca Parents: 7650821 Author: Mikhail Stepura Authored: Thu Sep 4 13:36:13 2014 -0700 Committer: Mikhail Stepura Committed: Thu Sep 4 13:36:13 2014 -0700 -- pylib/cqlshlib/test/test_keyspace_init.cql | 8 1 file changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/c54126bb/pylib/cqlshlib/test/test_keyspace_init.cql -- diff --git a/pylib/cqlshlib/test/test_keyspace_init.cql b/pylib/cqlshlib/test/test_keyspace_init.cql index b8d600c..cd5ac75 100644 --- a/pylib/cqlshlib/test/test_keyspace_init.cql +++ b/pylib/cqlshlib/test/test_keyspace_init.cql @@ -196,8 +196,8 @@ CREATE TYPE phone_number ( CREATE TABLE users ( login text PRIMARY KEY, name text, -addresses set, -phone_numbers set +addresses set>, +phone_numbers set> ); insert into users (login, name, addresses, phone_numbers) @@ -229,8 +229,8 @@ CREATE TYPE tags ( CREATE TABLE songs ( title text PRIMARY KEY, band text, -info band_info_type, -tags tags +info frozen, +tags frozen ); insert into songs (title, band, info, tags)
[2/3] git commit: Ninja: adjusted cqlsh tests for CASSANDRA-7857
Ninja: adjusted cqlsh tests for CASSANDRA-7857 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c54126bb Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c54126bb Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c54126bb Branch: refs/heads/trunk Commit: c54126bb47c90bdb67810d71f61e371088778bca Parents: 7650821 Author: Mikhail Stepura Authored: Thu Sep 4 13:36:13 2014 -0700 Committer: Mikhail Stepura Committed: Thu Sep 4 13:36:13 2014 -0700 -- pylib/cqlshlib/test/test_keyspace_init.cql | 8 1 file changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/c54126bb/pylib/cqlshlib/test/test_keyspace_init.cql -- diff --git a/pylib/cqlshlib/test/test_keyspace_init.cql b/pylib/cqlshlib/test/test_keyspace_init.cql index b8d600c..cd5ac75 100644 --- a/pylib/cqlshlib/test/test_keyspace_init.cql +++ b/pylib/cqlshlib/test/test_keyspace_init.cql @@ -196,8 +196,8 @@ CREATE TYPE phone_number ( CREATE TABLE users ( login text PRIMARY KEY, name text, -addresses set, -phone_numbers set +addresses set>, +phone_numbers set> ); insert into users (login, name, addresses, phone_numbers) @@ -229,8 +229,8 @@ CREATE TYPE tags ( CREATE TABLE songs ( title text PRIMARY KEY, band text, -info band_info_type, -tags tags +info frozen, +tags frozen ); insert into songs (title, band, info, tags)
[5/8] git commit: Merge branch 'cassandra-2.1.0' into cassandra-2.1
Merge branch 'cassandra-2.1.0' into cassandra-2.1 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/75049648 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/75049648 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/75049648 Branch: refs/heads/trunk Commit: 750496488d05fb9cc498425dad2126bc953c8b5d Parents: 4018232 92a254a Author: Mikhail Stepura Authored: Mon Sep 1 12:18:09 2014 -0700 Committer: Mikhail Stepura Committed: Mon Sep 1 12:18:09 2014 -0700 -- --
[3/8] git commit: Allow triggers' names to be quoted identifiers
Allow triggers' names to be quoted identifiers patch by Mikhail Stepura; reviewed by Sylvain Lebresne for CASSANDRA-7847 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/92a254a7 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/92a254a7 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/92a254a7 Branch: refs/heads/trunk Commit: 92a254a7266aaa6c64745997f5912c54617bcd21 Parents: ef89045 Author: Mikhail Stepura Authored: Mon Sep 1 12:11:57 2014 -0700 Committer: Mikhail Stepura Committed: Mon Sep 1 12:11:57 2014 -0700 -- NEWS.txt | 3 +++ src/java/org/apache/cassandra/cql3/Cql.g | 8 2 files changed, 7 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/92a254a7/NEWS.txt -- diff --git a/NEWS.txt b/NEWS.txt index 9b521e4..db34fd3 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -47,6 +47,9 @@ New features longer a responsible for that range of keys. If you want the old behavior (due to a lost node perhaps) you can set the following property (-Dcassandra.consistent.rangemovement=false) + - It is now possible to use quoted identifiers in triggers' names. + WARNING: if you previously used triggers with capital letters in their + names, then you must quote them from now on. Upgrading - http://git-wip-us.apache.org/repos/asf/cassandra/blob/92a254a7/src/java/org/apache/cassandra/cql3/Cql.g -- diff --git a/src/java/org/apache/cassandra/cql3/Cql.g b/src/java/org/apache/cassandra/cql3/Cql.g index 948cd5e..1ff6ab2 100644 --- a/src/java/org/apache/cassandra/cql3/Cql.g +++ b/src/java/org/apache/cassandra/cql3/Cql.g @@ -587,16 +587,16 @@ indexIdent returns [IndexTarget id] * CREATE TRIGGER triggerName ON columnFamily USING 'triggerClass'; */ createTriggerStatement returns [CreateTriggerStatement expr] -: K_CREATE K_TRIGGER (name=IDENT) K_ON cf=columnFamilyName K_USING cls=STRING_LITERAL - { $expr = new CreateTriggerStatement(cf, $name.text, $cls.text); } +: K_CREATE K_TRIGGER (name=cident) K_ON cf=columnFamilyName K_USING cls=STRING_LITERAL + { $expr = new CreateTriggerStatement(cf, name.toString(), $cls.text); } ; /** * DROP TRIGGER triggerName ON columnFamily; */ dropTriggerStatement returns [DropTriggerStatement expr] -: K_DROP K_TRIGGER (name=IDENT) K_ON cf=columnFamilyName - { $expr = new DropTriggerStatement(cf, $name.text); } +: K_DROP K_TRIGGER (name=cident) K_ON cf=columnFamilyName + { $expr = new DropTriggerStatement(cf, name.toString()); } ; /**
[8/8] git commit: Merge branch 'cassandra-2.1' into trunk
Merge branch 'cassandra-2.1' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/873d0649 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/873d0649 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/873d0649 Branch: refs/heads/trunk Commit: 873d0649089c31e8216957762c33c6bc78466fb6 Parents: 54e7f96 e0d7c77 Author: Mikhail Stepura Authored: Mon Sep 1 12:20:30 2014 -0700 Committer: Mikhail Stepura Committed: Mon Sep 1 12:20:30 2014 -0700 -- NEWS.txt | 3 +++ src/java/org/apache/cassandra/cql3/Cql.g | 8 .../apache/cassandra/cql3/CreateTriggerStatementTest.java| 8 3 files changed, 15 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/873d0649/NEWS.txt -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/873d0649/src/java/org/apache/cassandra/cql3/Cql.g --
[4/8] git commit: Merge branch 'cassandra-2.1.0' into cassandra-2.1
Merge branch 'cassandra-2.1.0' into cassandra-2.1 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/75049648 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/75049648 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/75049648 Branch: refs/heads/cassandra-2.1 Commit: 750496488d05fb9cc498425dad2126bc953c8b5d Parents: 4018232 92a254a Author: Mikhail Stepura Authored: Mon Sep 1 12:18:09 2014 -0700 Committer: Mikhail Stepura Committed: Mon Sep 1 12:18:09 2014 -0700 -- --
[2/8] git commit: Allow triggers' names to be quoted identifiers
Allow triggers' names to be quoted identifiers patch by Mikhail Stepura; reviewed by Sylvain Lebresne for CASSANDRA-7847 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/92a254a7 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/92a254a7 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/92a254a7 Branch: refs/heads/cassandra-2.1.0 Commit: 92a254a7266aaa6c64745997f5912c54617bcd21 Parents: ef89045 Author: Mikhail Stepura Authored: Mon Sep 1 12:11:57 2014 -0700 Committer: Mikhail Stepura Committed: Mon Sep 1 12:11:57 2014 -0700 -- NEWS.txt | 3 +++ src/java/org/apache/cassandra/cql3/Cql.g | 8 2 files changed, 7 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/92a254a7/NEWS.txt -- diff --git a/NEWS.txt b/NEWS.txt index 9b521e4..db34fd3 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -47,6 +47,9 @@ New features longer a responsible for that range of keys. If you want the old behavior (due to a lost node perhaps) you can set the following property (-Dcassandra.consistent.rangemovement=false) + - It is now possible to use quoted identifiers in triggers' names. + WARNING: if you previously used triggers with capital letters in their + names, then you must quote them from now on. Upgrading - http://git-wip-us.apache.org/repos/asf/cassandra/blob/92a254a7/src/java/org/apache/cassandra/cql3/Cql.g -- diff --git a/src/java/org/apache/cassandra/cql3/Cql.g b/src/java/org/apache/cassandra/cql3/Cql.g index 948cd5e..1ff6ab2 100644 --- a/src/java/org/apache/cassandra/cql3/Cql.g +++ b/src/java/org/apache/cassandra/cql3/Cql.g @@ -587,16 +587,16 @@ indexIdent returns [IndexTarget id] * CREATE TRIGGER triggerName ON columnFamily USING 'triggerClass'; */ createTriggerStatement returns [CreateTriggerStatement expr] -: K_CREATE K_TRIGGER (name=IDENT) K_ON cf=columnFamilyName K_USING cls=STRING_LITERAL - { $expr = new CreateTriggerStatement(cf, $name.text, $cls.text); } +: K_CREATE K_TRIGGER (name=cident) K_ON cf=columnFamilyName K_USING cls=STRING_LITERAL + { $expr = new CreateTriggerStatement(cf, name.toString(), $cls.text); } ; /** * DROP TRIGGER triggerName ON columnFamily; */ dropTriggerStatement returns [DropTriggerStatement expr] -: K_DROP K_TRIGGER (name=IDENT) K_ON cf=columnFamilyName - { $expr = new DropTriggerStatement(cf, $name.text); } +: K_DROP K_TRIGGER (name=cident) K_ON cf=columnFamilyName + { $expr = new DropTriggerStatement(cf, name.toString()); } ; /**
[7/8] git commit: Allow triggers' names to be quoted identifiers
Allow triggers' names to be quoted identifiers patch by Mikhail Stepura; reviewed by Sylvain Lebresne for CASSANDRA-7847 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/e0d7c77f Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e0d7c77f Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e0d7c77f Branch: refs/heads/cassandra-2.1 Commit: e0d7c77f32140adeb51d0316179b95e33fb5834c Parents: 7504964 Author: Mikhail Stepura Authored: Thu Aug 28 17:04:13 2014 -0700 Committer: Mikhail Stepura Committed: Mon Sep 1 12:19:17 2014 -0700 -- NEWS.txt | 3 +++ src/java/org/apache/cassandra/cql3/Cql.g | 8 .../apache/cassandra/cql3/CreateTriggerStatementTest.java| 8 3 files changed, 15 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/e0d7c77f/NEWS.txt -- diff --git a/NEWS.txt b/NEWS.txt index 9b521e4..db34fd3 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -47,6 +47,9 @@ New features longer a responsible for that range of keys. If you want the old behavior (due to a lost node perhaps) you can set the following property (-Dcassandra.consistent.rangemovement=false) + - It is now possible to use quoted identifiers in triggers' names. + WARNING: if you previously used triggers with capital letters in their + names, then you must quote them from now on. Upgrading - http://git-wip-us.apache.org/repos/asf/cassandra/blob/e0d7c77f/src/java/org/apache/cassandra/cql3/Cql.g -- diff --git a/src/java/org/apache/cassandra/cql3/Cql.g b/src/java/org/apache/cassandra/cql3/Cql.g index 93df1b4..6bfda15 100644 --- a/src/java/org/apache/cassandra/cql3/Cql.g +++ b/src/java/org/apache/cassandra/cql3/Cql.g @@ -587,9 +587,9 @@ createTriggerStatement returns [CreateTriggerStatement expr] @init { boolean ifNotExists = false; } -: K_CREATE K_TRIGGER (K_IF K_NOT K_EXISTS { ifNotExists = true; } )? (name=IDENT) +: K_CREATE K_TRIGGER (K_IF K_NOT K_EXISTS { ifNotExists = true; } )? (name=cident) K_ON cf=columnFamilyName K_USING cls=STRING_LITERAL - { $expr = new CreateTriggerStatement(cf, $name.text, $cls.text, ifNotExists); } + { $expr = new CreateTriggerStatement(cf, name.toString(), $cls.text, ifNotExists); } ; /** @@ -597,8 +597,8 @@ createTriggerStatement returns [CreateTriggerStatement expr] */ dropTriggerStatement returns [DropTriggerStatement expr] @init { boolean ifExists = false; } -: K_DROP K_TRIGGER (K_IF K_EXISTS { ifExists = true; } )? (name=IDENT) K_ON cf=columnFamilyName - { $expr = new DropTriggerStatement(cf, $name.text, ifExists); } +: K_DROP K_TRIGGER (K_IF K_EXISTS { ifExists = true; } )? (name=cident) K_ON cf=columnFamilyName + { $expr = new DropTriggerStatement(cf, name.toString(), ifExists); } ; /** http://git-wip-us.apache.org/repos/asf/cassandra/blob/e0d7c77f/test/unit/org/apache/cassandra/cql3/CreateTriggerStatementTest.java -- diff --git a/test/unit/org/apache/cassandra/cql3/CreateTriggerStatementTest.java b/test/unit/org/apache/cassandra/cql3/CreateTriggerStatementTest.java index 39703cc..6557c16 100644 --- a/test/unit/org/apache/cassandra/cql3/CreateTriggerStatementTest.java +++ b/test/unit/org/apache/cassandra/cql3/CreateTriggerStatementTest.java @@ -43,6 +43,8 @@ public class CreateTriggerStatementTest extends CQLTester execute("CREATE TRIGGER trigger_2 ON %s USING '" + TestTrigger.class.getName() + "'"); assertTriggerExists("trigger_2", TestTrigger.class); assertInvalid("CREATE TRIGGER trigger_1 ON %s USING '" + TestTrigger.class.getName() + "'"); +execute("CREATE TRIGGER \"Trigger 3\" ON %s USING '" + TestTrigger.class.getName() + "'"); +assertTriggerExists("Trigger 3", TestTrigger.class); } @Test @@ -72,6 +74,12 @@ public class CreateTriggerStatementTest extends CQLTester assertTriggerExists("trigger_1", TestTrigger.class); assertInvalid("DROP TRIGGER trigger_2 ON %s"); + +execute("CREATE TRIGGER \"Trigger 3\" ON %s USING '" + TestTrigger.class.getName() + "'"); +assertTriggerExists("Trigger 3", TestTrigger.class); + +execute("DROP TRIGGER \"Trigger 3\" ON %s"); +assertTriggerDoesNotExists("Trigger 3", TestTrigger.class); } @Test
[6/8] git commit: Allow triggers' names to be quoted identifiers
Allow triggers' names to be quoted identifiers patch by Mikhail Stepura; reviewed by Sylvain Lebresne for CASSANDRA-7847 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/e0d7c77f Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e0d7c77f Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e0d7c77f Branch: refs/heads/trunk Commit: e0d7c77f32140adeb51d0316179b95e33fb5834c Parents: 7504964 Author: Mikhail Stepura Authored: Thu Aug 28 17:04:13 2014 -0700 Committer: Mikhail Stepura Committed: Mon Sep 1 12:19:17 2014 -0700 -- NEWS.txt | 3 +++ src/java/org/apache/cassandra/cql3/Cql.g | 8 .../apache/cassandra/cql3/CreateTriggerStatementTest.java| 8 3 files changed, 15 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/e0d7c77f/NEWS.txt -- diff --git a/NEWS.txt b/NEWS.txt index 9b521e4..db34fd3 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -47,6 +47,9 @@ New features longer a responsible for that range of keys. If you want the old behavior (due to a lost node perhaps) you can set the following property (-Dcassandra.consistent.rangemovement=false) + - It is now possible to use quoted identifiers in triggers' names. + WARNING: if you previously used triggers with capital letters in their + names, then you must quote them from now on. Upgrading - http://git-wip-us.apache.org/repos/asf/cassandra/blob/e0d7c77f/src/java/org/apache/cassandra/cql3/Cql.g -- diff --git a/src/java/org/apache/cassandra/cql3/Cql.g b/src/java/org/apache/cassandra/cql3/Cql.g index 93df1b4..6bfda15 100644 --- a/src/java/org/apache/cassandra/cql3/Cql.g +++ b/src/java/org/apache/cassandra/cql3/Cql.g @@ -587,9 +587,9 @@ createTriggerStatement returns [CreateTriggerStatement expr] @init { boolean ifNotExists = false; } -: K_CREATE K_TRIGGER (K_IF K_NOT K_EXISTS { ifNotExists = true; } )? (name=IDENT) +: K_CREATE K_TRIGGER (K_IF K_NOT K_EXISTS { ifNotExists = true; } )? (name=cident) K_ON cf=columnFamilyName K_USING cls=STRING_LITERAL - { $expr = new CreateTriggerStatement(cf, $name.text, $cls.text, ifNotExists); } + { $expr = new CreateTriggerStatement(cf, name.toString(), $cls.text, ifNotExists); } ; /** @@ -597,8 +597,8 @@ createTriggerStatement returns [CreateTriggerStatement expr] */ dropTriggerStatement returns [DropTriggerStatement expr] @init { boolean ifExists = false; } -: K_DROP K_TRIGGER (K_IF K_EXISTS { ifExists = true; } )? (name=IDENT) K_ON cf=columnFamilyName - { $expr = new DropTriggerStatement(cf, $name.text, ifExists); } +: K_DROP K_TRIGGER (K_IF K_EXISTS { ifExists = true; } )? (name=cident) K_ON cf=columnFamilyName + { $expr = new DropTriggerStatement(cf, name.toString(), ifExists); } ; /** http://git-wip-us.apache.org/repos/asf/cassandra/blob/e0d7c77f/test/unit/org/apache/cassandra/cql3/CreateTriggerStatementTest.java -- diff --git a/test/unit/org/apache/cassandra/cql3/CreateTriggerStatementTest.java b/test/unit/org/apache/cassandra/cql3/CreateTriggerStatementTest.java index 39703cc..6557c16 100644 --- a/test/unit/org/apache/cassandra/cql3/CreateTriggerStatementTest.java +++ b/test/unit/org/apache/cassandra/cql3/CreateTriggerStatementTest.java @@ -43,6 +43,8 @@ public class CreateTriggerStatementTest extends CQLTester execute("CREATE TRIGGER trigger_2 ON %s USING '" + TestTrigger.class.getName() + "'"); assertTriggerExists("trigger_2", TestTrigger.class); assertInvalid("CREATE TRIGGER trigger_1 ON %s USING '" + TestTrigger.class.getName() + "'"); +execute("CREATE TRIGGER \"Trigger 3\" ON %s USING '" + TestTrigger.class.getName() + "'"); +assertTriggerExists("Trigger 3", TestTrigger.class); } @Test @@ -72,6 +74,12 @@ public class CreateTriggerStatementTest extends CQLTester assertTriggerExists("trigger_1", TestTrigger.class); assertInvalid("DROP TRIGGER trigger_2 ON %s"); + +execute("CREATE TRIGGER \"Trigger 3\" ON %s USING '" + TestTrigger.class.getName() + "'"); +assertTriggerExists("Trigger 3", TestTrigger.class); + +execute("DROP TRIGGER \"Trigger 3\" ON %s"); +assertTriggerDoesNotExists("Trigger 3", TestTrigger.class); } @Test
[1/8] git commit: Allow triggers' names to be quoted identifiers
Repository: cassandra Updated Branches: refs/heads/cassandra-2.1 40182323f -> e0d7c77f3 refs/heads/cassandra-2.1.0 ef8904550 -> 92a254a72 refs/heads/trunk 54e7f96e4 -> 873d06490 Allow triggers' names to be quoted identifiers patch by Mikhail Stepura; reviewed by Sylvain Lebresne for CASSANDRA-7847 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/92a254a7 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/92a254a7 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/92a254a7 Branch: refs/heads/cassandra-2.1 Commit: 92a254a7266aaa6c64745997f5912c54617bcd21 Parents: ef89045 Author: Mikhail Stepura Authored: Mon Sep 1 12:11:57 2014 -0700 Committer: Mikhail Stepura Committed: Mon Sep 1 12:11:57 2014 -0700 -- NEWS.txt | 3 +++ src/java/org/apache/cassandra/cql3/Cql.g | 8 2 files changed, 7 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/92a254a7/NEWS.txt -- diff --git a/NEWS.txt b/NEWS.txt index 9b521e4..db34fd3 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -47,6 +47,9 @@ New features longer a responsible for that range of keys. If you want the old behavior (due to a lost node perhaps) you can set the following property (-Dcassandra.consistent.rangemovement=false) + - It is now possible to use quoted identifiers in triggers' names. + WARNING: if you previously used triggers with capital letters in their + names, then you must quote them from now on. Upgrading - http://git-wip-us.apache.org/repos/asf/cassandra/blob/92a254a7/src/java/org/apache/cassandra/cql3/Cql.g -- diff --git a/src/java/org/apache/cassandra/cql3/Cql.g b/src/java/org/apache/cassandra/cql3/Cql.g index 948cd5e..1ff6ab2 100644 --- a/src/java/org/apache/cassandra/cql3/Cql.g +++ b/src/java/org/apache/cassandra/cql3/Cql.g @@ -587,16 +587,16 @@ indexIdent returns [IndexTarget id] * CREATE TRIGGER triggerName ON columnFamily USING 'triggerClass'; */ createTriggerStatement returns [CreateTriggerStatement expr] -: K_CREATE K_TRIGGER (name=IDENT) K_ON cf=columnFamilyName K_USING cls=STRING_LITERAL - { $expr = new CreateTriggerStatement(cf, $name.text, $cls.text); } +: K_CREATE K_TRIGGER (name=cident) K_ON cf=columnFamilyName K_USING cls=STRING_LITERAL + { $expr = new CreateTriggerStatement(cf, name.toString(), $cls.text); } ; /** * DROP TRIGGER triggerName ON columnFamily; */ dropTriggerStatement returns [DropTriggerStatement expr] -: K_DROP K_TRIGGER (name=IDENT) K_ON cf=columnFamilyName - { $expr = new DropTriggerStatement(cf, $name.text); } +: K_DROP K_TRIGGER (name=cident) K_ON cf=columnFamilyName + { $expr = new DropTriggerStatement(cf, name.toString()); } ; /**
[3/3] git commit: Merge branch 'cassandra-2.1' into trunk
Merge branch 'cassandra-2.1' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b3178743 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b3178743 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b3178743 Branch: refs/heads/trunk Commit: b31787435a44fa8168fd18b4bfeb1d06544fb3af Parents: bf52074 d01250d Author: Mikhail Stepura Authored: Wed Aug 27 15:44:23 2014 -0700 Committer: Mikhail Stepura Committed: Wed Aug 27 15:44:23 2014 -0700 -- CHANGES.txt| 1 + bin/cqlsh | 27 + pylib/cqlshlib/async_insert.py | 13 pylib/cqlshlib/meter.py| 59 + 4 files changed, 79 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/b3178743/CHANGES.txt -- diff --cc CHANGES.txt index d33af9a,4fb773d..f04d6c5 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,23 -1,5 +1,24 @@@ +3.0 + * Do anticompaction in groups (CASSANDRA-6851) + * Verify that UDF class methods are static (CASSANDRA-7781) + * Support pure user-defined functions (CASSANDRA-7395, 7740) + * Permit configurable timestamps with cassandra-stress (CASSANDRA-7416) + * Move sstable RandomAccessReader to nio2, which allows using the + FILE_SHARE_DELETE flag on Windows (CASSANDRA-4050) + * Remove CQL2 (CASSANDRA-5918) + * Add Thrift get_multi_slice call (CASSANDRA-6757) + * Optimize fetching multiple cells by name (CASSANDRA-6933) + * Allow compilation in java 8 (CASSANDRA-7028) + * Make incremental repair default (CASSANDRA-7250) + * Enable code coverage thru JaCoCo (CASSANDRA-7226) + * Switch external naming of 'column families' to 'tables' (CASSANDRA-4369) + * Shorten SSTable path (CASSANDRA-6962) + * Use unsafe mutations for most unit tests (CASSANDRA-6969) + * Fix race condition during calculation of pending ranges (CASSANDRA-7390) + + 2.1.1 + * (cqlsh): Show progress of COPY operations (CASSANDRA-7789) * Add syntax to remove multiple elements from a map (CASSANDRA-6599) * Support non-equals conditions in lightweight transactions (CASSANDRA-6839) * Add IF [NOT] EXISTS to create/drop triggers (CASSANDRA-7606)
[2/3] git commit: (cqlsh): Show progress of COPY operations.
(cqlsh): Show progress of COPY operations. patch by Mikhail Stepura; reviewed by Tyler Hobbs for CASSANDRA-7789 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d01250d6 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d01250d6 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d01250d6 Branch: refs/heads/trunk Commit: d01250d63acf08c354bc400c957572bbd68f7ea6 Parents: c7f9c8d Author: Mikhail Stepura Authored: Wed Aug 20 11:55:50 2014 -0700 Committer: Mikhail Stepura Committed: Wed Aug 27 15:43:42 2014 -0700 -- CHANGES.txt| 1 + bin/cqlsh | 27 + pylib/cqlshlib/async_insert.py | 13 pylib/cqlshlib/meter.py| 59 + 4 files changed, 79 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/d01250d6/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 0f44c91..4fb773d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.1 + * (cqlsh): Show progress of COPY operations (CASSANDRA-7789) * Add syntax to remove multiple elements from a map (CASSANDRA-6599) * Support non-equals conditions in lightweight transactions (CASSANDRA-6839) * Add IF [NOT] EXISTS to create/drop triggers (CASSANDRA-7606) http://git-wip-us.apache.org/repos/asf/cassandra/blob/d01250d6/bin/cqlsh -- diff --git a/bin/cqlsh b/bin/cqlsh index c055771..dfce885 100755 --- a/bin/cqlsh +++ b/bin/cqlsh @@ -64,8 +64,6 @@ except ImportError: pass CQL_LIB_PREFIX = 'cassandra-driver-internal-only-' -FUTURES_LIB_PREFIX = 'futures-' -SIX_LIB_PREFIX = 'six-' CASSANDRA_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..') @@ -89,12 +87,13 @@ cql_zip = find_zip(CQL_LIB_PREFIX) if cql_zip: ver = os.path.splitext(os.path.basename(cql_zip))[0][len(CQL_LIB_PREFIX):] sys.path.insert(0, os.path.join(cql_zip, 'cassandra-driver-' + ver)) -futures_zip = find_zip(FUTURES_LIB_PREFIX) -if futures_zip: -sys.path.insert(0, futures_zip) -six_zip = find_zip(SIX_LIB_PREFIX) -if six_zip: -sys.path.insert(0, six_zip) + +third_parties = ('futures-', 'six-') + +for lib in third_parties: +lib_zip = find_zip(lib) +if lib_zip: +sys.path.insert(0, lib_zip) warnings.filterwarnings("ignore", r".*blist.*") try: @@ -118,7 +117,7 @@ cqlshlibdir = os.path.join(CASSANDRA_PATH, 'pylib') if os.path.isdir(cqlshlibdir): sys.path.insert(0, cqlshlibdir) -from cqlshlib import cqlhandling, cql3handling, pylexotron, sslhandling, async_insert +from cqlshlib import cqlhandling, cql3handling, pylexotron, sslhandling, async_insert, meter from cqlshlib.displaying import (RED, BLUE, CYAN, ANSI_RESET, COLUMN_NAME_COLORS, FormattedValue, colorme) from cqlshlib.formatting import format_by_type, formatter_for, format_value_utype @@ -1361,7 +1360,7 @@ class Shell(cmd.Cmd): linesource.close() elif self.tty: print -return rownum-1 +return rownum def create_insert_statement(self, columns, nullval, table_meta, row): @@ -1437,23 +1436,25 @@ class Shell(cmd.Cmd): except IOError, e: self.printerr("Can't open %r for writing: %s" % (fname, e)) return 0 +wmeter = meter.Meter() try: + dump = self.prep_export_dump(ks, cf, columns) writer = csv.writer(csvdest, **dialect_options) if header: writer.writerow(columns) -rows = 0 for row in dump: fmt = lambda v: \ format_value(v, output_encoding=encoding, nullval=nullval, time_format=self.display_time_format, float_precision=self.display_float_precision).strval writer.writerow(map(fmt, row.values())) -rows += 1 +wmeter.mark_written() +wmeter.done() finally: if do_close: csvdest.close() -return rows +return wmeter.num_finished() def prep_export_dump(self, ks, cf, columns): if columns is None: http://git-wip-us.apache.org/repos/asf/cassandra/blob/d01250d6/pylib/cqlshlib/async_insert.py -- diff --git a/pylib/cqlshlib/async_insert.py b/pylib/cqlshlib/async_insert.py index a4adcd2..d325716 100644 --- a/pylib/cqlshlib/async_insert.py +++ b/pylib/cqlshlib/async_insert.py @@ -14,11 +14,10 @@ # See the License for the spec
[1/3] git commit: (cqlsh): Show progress of COPY operations.
Repository: cassandra Updated Branches: refs/heads/cassandra-2.1 c7f9c8d21 -> d01250d63 refs/heads/trunk bf52074f6 -> b31787435 (cqlsh): Show progress of COPY operations. patch by Mikhail Stepura; reviewed by Tyler Hobbs for CASSANDRA-7789 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d01250d6 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d01250d6 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d01250d6 Branch: refs/heads/cassandra-2.1 Commit: d01250d63acf08c354bc400c957572bbd68f7ea6 Parents: c7f9c8d Author: Mikhail Stepura Authored: Wed Aug 20 11:55:50 2014 -0700 Committer: Mikhail Stepura Committed: Wed Aug 27 15:43:42 2014 -0700 -- CHANGES.txt| 1 + bin/cqlsh | 27 + pylib/cqlshlib/async_insert.py | 13 pylib/cqlshlib/meter.py| 59 + 4 files changed, 79 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/d01250d6/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 0f44c91..4fb773d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.1 + * (cqlsh): Show progress of COPY operations (CASSANDRA-7789) * Add syntax to remove multiple elements from a map (CASSANDRA-6599) * Support non-equals conditions in lightweight transactions (CASSANDRA-6839) * Add IF [NOT] EXISTS to create/drop triggers (CASSANDRA-7606) http://git-wip-us.apache.org/repos/asf/cassandra/blob/d01250d6/bin/cqlsh -- diff --git a/bin/cqlsh b/bin/cqlsh index c055771..dfce885 100755 --- a/bin/cqlsh +++ b/bin/cqlsh @@ -64,8 +64,6 @@ except ImportError: pass CQL_LIB_PREFIX = 'cassandra-driver-internal-only-' -FUTURES_LIB_PREFIX = 'futures-' -SIX_LIB_PREFIX = 'six-' CASSANDRA_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..') @@ -89,12 +87,13 @@ cql_zip = find_zip(CQL_LIB_PREFIX) if cql_zip: ver = os.path.splitext(os.path.basename(cql_zip))[0][len(CQL_LIB_PREFIX):] sys.path.insert(0, os.path.join(cql_zip, 'cassandra-driver-' + ver)) -futures_zip = find_zip(FUTURES_LIB_PREFIX) -if futures_zip: -sys.path.insert(0, futures_zip) -six_zip = find_zip(SIX_LIB_PREFIX) -if six_zip: -sys.path.insert(0, six_zip) + +third_parties = ('futures-', 'six-') + +for lib in third_parties: +lib_zip = find_zip(lib) +if lib_zip: +sys.path.insert(0, lib_zip) warnings.filterwarnings("ignore", r".*blist.*") try: @@ -118,7 +117,7 @@ cqlshlibdir = os.path.join(CASSANDRA_PATH, 'pylib') if os.path.isdir(cqlshlibdir): sys.path.insert(0, cqlshlibdir) -from cqlshlib import cqlhandling, cql3handling, pylexotron, sslhandling, async_insert +from cqlshlib import cqlhandling, cql3handling, pylexotron, sslhandling, async_insert, meter from cqlshlib.displaying import (RED, BLUE, CYAN, ANSI_RESET, COLUMN_NAME_COLORS, FormattedValue, colorme) from cqlshlib.formatting import format_by_type, formatter_for, format_value_utype @@ -1361,7 +1360,7 @@ class Shell(cmd.Cmd): linesource.close() elif self.tty: print -return rownum-1 +return rownum def create_insert_statement(self, columns, nullval, table_meta, row): @@ -1437,23 +1436,25 @@ class Shell(cmd.Cmd): except IOError, e: self.printerr("Can't open %r for writing: %s" % (fname, e)) return 0 +wmeter = meter.Meter() try: + dump = self.prep_export_dump(ks, cf, columns) writer = csv.writer(csvdest, **dialect_options) if header: writer.writerow(columns) -rows = 0 for row in dump: fmt = lambda v: \ format_value(v, output_encoding=encoding, nullval=nullval, time_format=self.display_time_format, float_precision=self.display_float_precision).strval writer.writerow(map(fmt, row.values())) -rows += 1 +wmeter.mark_written() +wmeter.done() finally: if do_close: csvdest.close() -return rows +return wmeter.num_finished() def prep_export_dump(self, ks, cf, columns): if columns is None: http://git-wip-us.apache.org/repos/asf/cassandra/blob/d01250d6/pylib/cqlshlib/async_insert.py -- diff --git a/pylib/cqlshlib/async_insert.py b/pylib/cqlshlib/async_insert.py index a4adcd2
[3/3] git commit: Merge branch 'cassandra-2.1' into trunk
Merge branch 'cassandra-2.1' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/bc9dc0f0 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/bc9dc0f0 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/bc9dc0f0 Branch: refs/heads/trunk Commit: bc9dc0f0a0c135f0697eb48e02c38199feb0e40f Parents: b281f33 854aab7 Author: Mikhail Stepura Authored: Thu Aug 21 19:57:54 2014 -0700 Committer: Mikhail Stepura Committed: Thu Aug 21 19:57:54 2014 -0700 -- CHANGES.txt | 1 + bin/cqlsh | 10 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc9dc0f0/CHANGES.txt -- diff --cc CHANGES.txt index bf861c9,5a1767a..711ca08 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,23 -1,5 +1,24 @@@ +3.0 + * Do anticompaction in groups (CASSANDRA-6851) + * Verify that UDF class methods are static (CASSANDRA-7781) + * Support pure user-defined functions (CASSANDRA-7395, 7740) + * Permit configurable timestamps with cassandra-stress (CASSANDRA-7416) + * Move sstable RandomAccessReader to nio2, which allows using the + FILE_SHARE_DELETE flag on Windows (CASSANDRA-4050) + * Remove CQL2 (CASSANDRA-5918) + * Add Thrift get_multi_slice call (CASSANDRA-6757) + * Optimize fetching multiple cells by name (CASSANDRA-6933) + * Allow compilation in java 8 (CASSANDRA-7028) + * Make incremental repair default (CASSANDRA-7250) + * Enable code coverage thru JaCoCo (CASSANDRA-7226) + * Switch external naming of 'column families' to 'tables' (CASSANDRA-4369) + * Shorten SSTable path (CASSANDRA-6962) + * Use unsafe mutations for most unit tests (CASSANDRA-6969) + * Fix race condition during calculation of pending ranges (CASSANDRA-7390) + + 2.1.1 + * (cqlsh) Display the current logged-in user (CASSANDRA-7785) * (cqlsh) Don't ignore CTRL-C during COPY FROM execution (CASSANDRA-7815) * (cqlsh) Order UDTs according to cross-type dependencies in DESCRIBE output (CASSANDRA-7659)
[1/3] git commit: (cqlsh) Display the current logged-in user
Repository: cassandra Updated Branches: refs/heads/cassandra-2.1 cc2f45237 -> 854aab79b refs/heads/trunk b281f33e4 -> bc9dc0f0a (cqlsh) Display the current logged-in user patch by Aaron Ploetz; reviewed by Mikhail Stepura for CASSANDRA-7785 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/854aab79 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/854aab79 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/854aab79 Branch: refs/heads/cassandra-2.1 Commit: 854aab79b7167cca29f237702ab92ba68fe56e08 Parents: cc2f452 Author: Aaron Ploetz Authored: Thu Aug 21 15:34:46 2014 -0700 Committer: Mikhail Stepura Committed: Thu Aug 21 19:57:20 2014 -0700 -- CHANGES.txt | 1 + bin/cqlsh | 10 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/854aab79/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index fc6c942..5a1767a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.1 + * (cqlsh) Display the current logged-in user (CASSANDRA-7785) * (cqlsh) Don't ignore CTRL-C during COPY FROM execution (CASSANDRA-7815) * (cqlsh) Order UDTs according to cross-type dependencies in DESCRIBE output (CASSANDRA-7659) http://git-wip-us.apache.org/repos/asf/cassandra/blob/854aab79/bin/cqlsh -- diff --git a/bin/cqlsh b/bin/cqlsh index 3fb972a..c055771 100755 --- a/bin/cqlsh +++ b/bin/cqlsh @@ -504,6 +504,7 @@ class Shell(cmd.Cmd): if not password: password = getpass.getpass() self.auth_provider = PlainTextAuthProvider(username=username, password=password) +self.username = username self.keyspace = keyspace self.tracing_enabled = tracing_enabled self.expand_enabled = expand_enabled @@ -712,9 +713,9 @@ class Shell(cmd.Cmd): def reset_prompt(self): if self.current_keyspace is None: -self.set_prompt(self.default_prompt) +self.set_prompt(self.default_prompt, True) else: -self.set_prompt(self.keyspace_prompt % self.current_keyspace) +self.set_prompt(self.keyspace_prompt % self.current_keyspace, True) def set_continue_prompt(self): if self.empty_lines >=3: @@ -1062,7 +1063,10 @@ class Shell(cmd.Cmd): return cqlruleset.cql_complete(stuff_to_complete, text, cassandra_conn=self, debug=debug_completion, startsymbol='cqlshCommand') -def set_prompt(self, prompt): +def set_prompt(self, prompt, prepend_user=False): +if prepend_user and self.username: +self.prompt = "%s@%s" % (self.username, prompt) +return self.prompt = prompt def cql_unprotect_name(self, namestr):
[2/3] git commit: (cqlsh) Display the current logged-in user
(cqlsh) Display the current logged-in user patch by Aaron Ploetz; reviewed by Mikhail Stepura for CASSANDRA-7785 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/854aab79 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/854aab79 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/854aab79 Branch: refs/heads/trunk Commit: 854aab79b7167cca29f237702ab92ba68fe56e08 Parents: cc2f452 Author: Aaron Ploetz Authored: Thu Aug 21 15:34:46 2014 -0700 Committer: Mikhail Stepura Committed: Thu Aug 21 19:57:20 2014 -0700 -- CHANGES.txt | 1 + bin/cqlsh | 10 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/854aab79/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index fc6c942..5a1767a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.1 + * (cqlsh) Display the current logged-in user (CASSANDRA-7785) * (cqlsh) Don't ignore CTRL-C during COPY FROM execution (CASSANDRA-7815) * (cqlsh) Order UDTs according to cross-type dependencies in DESCRIBE output (CASSANDRA-7659) http://git-wip-us.apache.org/repos/asf/cassandra/blob/854aab79/bin/cqlsh -- diff --git a/bin/cqlsh b/bin/cqlsh index 3fb972a..c055771 100755 --- a/bin/cqlsh +++ b/bin/cqlsh @@ -504,6 +504,7 @@ class Shell(cmd.Cmd): if not password: password = getpass.getpass() self.auth_provider = PlainTextAuthProvider(username=username, password=password) +self.username = username self.keyspace = keyspace self.tracing_enabled = tracing_enabled self.expand_enabled = expand_enabled @@ -712,9 +713,9 @@ class Shell(cmd.Cmd): def reset_prompt(self): if self.current_keyspace is None: -self.set_prompt(self.default_prompt) +self.set_prompt(self.default_prompt, True) else: -self.set_prompt(self.keyspace_prompt % self.current_keyspace) +self.set_prompt(self.keyspace_prompt % self.current_keyspace, True) def set_continue_prompt(self): if self.empty_lines >=3: @@ -1062,7 +1063,10 @@ class Shell(cmd.Cmd): return cqlruleset.cql_complete(stuff_to_complete, text, cassandra_conn=self, debug=debug_completion, startsymbol='cqlshCommand') -def set_prompt(self, prompt): +def set_prompt(self, prompt, prepend_user=False): +if prepend_user and self.username: +self.prompt = "%s@%s" % (self.username, prompt) +return self.prompt = prompt def cql_unprotect_name(self, namestr):
[2/3] git commit: Ninja: fixed cqlsh test (after 7d7d529)
Ninja: fixed cqlsh test (after 7d7d529) Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a37a0363 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a37a0363 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a37a0363 Branch: refs/heads/trunk Commit: a37a036321b11f0e0bd254a16024fca562fe7454 Parents: a323a1a Author: Mikhail Stepura Authored: Tue Aug 19 14:57:20 2014 -0700 Committer: Mikhail Stepura Committed: Tue Aug 19 14:57:20 2014 -0700 -- pylib/cqlshlib/test/test_cqlsh_completion.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/a37a0363/pylib/cqlshlib/test/test_cqlsh_completion.py -- diff --git a/pylib/cqlshlib/test/test_cqlsh_completion.py b/pylib/cqlshlib/test/test_cqlsh_completion.py index fc2dad9..8d3b7c4 100644 --- a/pylib/cqlshlib/test/test_cqlsh_completion.py +++ b/pylib/cqlshlib/test/test_cqlsh_completion.py @@ -153,10 +153,10 @@ class TestCqlshCompletion(CqlshCompletionCase): "{'class': 'SimpleStrategy', 'repl", "ication_factor'") self.trycompletions("create keyspace foo with replication =" "{'class': 'SimpleStrategy', 'replication_factor': ", '', -choices=('',)) +choices=('',)) self.trycompletions("create keyspace foo with replication =" "{'class': 'SimpleStrategy', 'replication_factor': 1", '', -choices=('',)) +choices=('',)) self.trycompletions("create keyspace foo with replication =" "{'class': 'SimpleStrategy', 'replication_factor': 1 ", '}') self.trycompletions("create keyspace foo with replication ="
[3/3] git commit: Merge branch 'cassandra-2.1' into trunk
Merge branch 'cassandra-2.1' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/501c3e56 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/501c3e56 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/501c3e56 Branch: refs/heads/trunk Commit: 501c3e564b4d73cec45cb16c38ea1656e3bc363d Parents: c69f257 a37a036 Author: Mikhail Stepura Authored: Tue Aug 19 14:57:48 2014 -0700 Committer: Mikhail Stepura Committed: Tue Aug 19 14:57:48 2014 -0700 -- pylib/cqlshlib/test/test_cqlsh_completion.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --
[1/3] git commit: Ninja: fixed cqlsh test (after 7d7d529)
Repository: cassandra Updated Branches: refs/heads/cassandra-2.1 a323a1a6d -> a37a03632 refs/heads/trunk c69f257f9 -> 501c3e564 Ninja: fixed cqlsh test (after 7d7d529) Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a37a0363 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a37a0363 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a37a0363 Branch: refs/heads/cassandra-2.1 Commit: a37a036321b11f0e0bd254a16024fca562fe7454 Parents: a323a1a Author: Mikhail Stepura Authored: Tue Aug 19 14:57:20 2014 -0700 Committer: Mikhail Stepura Committed: Tue Aug 19 14:57:20 2014 -0700 -- pylib/cqlshlib/test/test_cqlsh_completion.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/a37a0363/pylib/cqlshlib/test/test_cqlsh_completion.py -- diff --git a/pylib/cqlshlib/test/test_cqlsh_completion.py b/pylib/cqlshlib/test/test_cqlsh_completion.py index fc2dad9..8d3b7c4 100644 --- a/pylib/cqlshlib/test/test_cqlsh_completion.py +++ b/pylib/cqlshlib/test/test_cqlsh_completion.py @@ -153,10 +153,10 @@ class TestCqlshCompletion(CqlshCompletionCase): "{'class': 'SimpleStrategy', 'repl", "ication_factor'") self.trycompletions("create keyspace foo with replication =" "{'class': 'SimpleStrategy', 'replication_factor': ", '', -choices=('',)) +choices=('',)) self.trycompletions("create keyspace foo with replication =" "{'class': 'SimpleStrategy', 'replication_factor': 1", '', -choices=('',)) +choices=('',)) self.trycompletions("create keyspace foo with replication =" "{'class': 'SimpleStrategy', 'replication_factor': 1 ", '}') self.trycompletions("create keyspace foo with replication ="
[2/3] git commit: (cqlsh) COPY TO/FROM improvements
(cqlsh) COPY TO/FROM improvements patch by Mikhail Stepura; reviewed by Tyler Hobbs for CASSANDRA-7405 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a323a1a6 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a323a1a6 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a323a1a6 Branch: refs/heads/trunk Commit: a323a1a6d5f28ced1a51ba559055283f3eb356ff Parents: 3a03d4b Author: Mikhail Stepura Authored: Fri Aug 15 14:35:18 2014 -0700 Committer: Mikhail Stepura Committed: Tue Aug 19 13:22:24 2014 -0700 -- CHANGES.txt| 1 + bin/cqlsh | 50 pylib/cqlshlib/async_insert.py | 110 3 files changed, 135 insertions(+), 26 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/a323a1a6/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index d29a2db..6facab9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.1 + * (cqlsh) COPY TO/FROM improvements (CASSANDRA-7405) * Support list index operations with conditions (CASSANDRA-7499) * Add max live/tombstoned cells to nodetool cfstats output (CASSANDRA-7731) * Validate IPv6 wildcard addresses properly (CASSANDRA-7680) http://git-wip-us.apache.org/repos/asf/cassandra/blob/a323a1a6/bin/cqlsh -- diff --git a/bin/cqlsh b/bin/cqlsh index b65ae00..852f4f5 100755 --- a/bin/cqlsh +++ b/bin/cqlsh @@ -118,7 +118,7 @@ cqlshlibdir = os.path.join(CASSANDRA_PATH, 'pylib') if os.path.isdir(cqlshlibdir): sys.path.insert(0, cqlshlibdir) -from cqlshlib import cqlhandling, cql3handling, pylexotron, sslhandling +from cqlshlib import cqlhandling, cql3handling, pylexotron, sslhandling, async_insert from cqlshlib.displaying import (RED, BLUE, CYAN, ANSI_RESET, COLUMN_NAME_COLORS, FormattedValue, colorme) from cqlshlib.formatting import format_by_type, formatter_for, format_value_utype @@ -1348,27 +1348,33 @@ class Shell(cmd.Cmd): if header: linesource.next() table_meta = self.get_table_meta(ks, cf) -rownum = -1 reader = csv.reader(linesource, **dialect_options) -for rownum, row in enumerate(reader): -if len(row) != len(columns): -self.printerr("Record #%d (line %d) has the wrong number of fields " - "(%d instead of %d)." - % (rownum, reader.line_num, len(row), len(columns))) -return rownum -if not self.do_import_row(columns, nullval, table_meta, row): -self.printerr("Aborting import at record #%d (line %d). " - "Previously-inserted values still present." - % (rownum, reader.line_num)) -return rownum +from functools import partial +rownum, error = \ +async_insert.insert_concurrent(self.session, enumerate(reader, start=1), + partial( + self.create_insert_statement, + columns, nullval, + table_meta)) +if error: +self.printerr(str(error[0])) +self.printerr("Aborting import at record #%d. " + "Previously-inserted values still present." + % error[1]) finally: if do_close: linesource.close() elif self.tty: print -return rownum + 1 +return rownum-1 + +def create_insert_statement(self, columns, nullval, table_meta, row): + +if len(row) != len(columns): +raise ValueError( +"Record has the wrong number of fields (%d instead of %d)." +% (len(row), len(columns))) -def do_import_row(self, columns, nullval, table_meta, row): rowmap = {} primary_key_columns = [col.name for col in table_meta.primary_key] for name, value in zip(columns, row): @@ -1390,9 +1396,6 @@ class Shell(cmd.Cmd): return False else: rowmap[name] = 'null' -return self.do_import_insert(table_meta, rowmap) - -def do_import_insert(self, table_meta, rowmap): # would be nice to be able to use a prepared query here, but in order # to use that interface, we'd need to have all the input as native
[1/3] git commit: (cqlsh) COPY TO/FROM improvements
Repository: cassandra Updated Branches: refs/heads/cassandra-2.1 3a03d4bd5 -> a323a1a6d refs/heads/trunk 96addeedf -> c69f257f9 (cqlsh) COPY TO/FROM improvements patch by Mikhail Stepura; reviewed by Tyler Hobbs for CASSANDRA-7405 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a323a1a6 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a323a1a6 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a323a1a6 Branch: refs/heads/cassandra-2.1 Commit: a323a1a6d5f28ced1a51ba559055283f3eb356ff Parents: 3a03d4b Author: Mikhail Stepura Authored: Fri Aug 15 14:35:18 2014 -0700 Committer: Mikhail Stepura Committed: Tue Aug 19 13:22:24 2014 -0700 -- CHANGES.txt| 1 + bin/cqlsh | 50 pylib/cqlshlib/async_insert.py | 110 3 files changed, 135 insertions(+), 26 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/a323a1a6/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index d29a2db..6facab9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.1 + * (cqlsh) COPY TO/FROM improvements (CASSANDRA-7405) * Support list index operations with conditions (CASSANDRA-7499) * Add max live/tombstoned cells to nodetool cfstats output (CASSANDRA-7731) * Validate IPv6 wildcard addresses properly (CASSANDRA-7680) http://git-wip-us.apache.org/repos/asf/cassandra/blob/a323a1a6/bin/cqlsh -- diff --git a/bin/cqlsh b/bin/cqlsh index b65ae00..852f4f5 100755 --- a/bin/cqlsh +++ b/bin/cqlsh @@ -118,7 +118,7 @@ cqlshlibdir = os.path.join(CASSANDRA_PATH, 'pylib') if os.path.isdir(cqlshlibdir): sys.path.insert(0, cqlshlibdir) -from cqlshlib import cqlhandling, cql3handling, pylexotron, sslhandling +from cqlshlib import cqlhandling, cql3handling, pylexotron, sslhandling, async_insert from cqlshlib.displaying import (RED, BLUE, CYAN, ANSI_RESET, COLUMN_NAME_COLORS, FormattedValue, colorme) from cqlshlib.formatting import format_by_type, formatter_for, format_value_utype @@ -1348,27 +1348,33 @@ class Shell(cmd.Cmd): if header: linesource.next() table_meta = self.get_table_meta(ks, cf) -rownum = -1 reader = csv.reader(linesource, **dialect_options) -for rownum, row in enumerate(reader): -if len(row) != len(columns): -self.printerr("Record #%d (line %d) has the wrong number of fields " - "(%d instead of %d)." - % (rownum, reader.line_num, len(row), len(columns))) -return rownum -if not self.do_import_row(columns, nullval, table_meta, row): -self.printerr("Aborting import at record #%d (line %d). " - "Previously-inserted values still present." - % (rownum, reader.line_num)) -return rownum +from functools import partial +rownum, error = \ +async_insert.insert_concurrent(self.session, enumerate(reader, start=1), + partial( + self.create_insert_statement, + columns, nullval, + table_meta)) +if error: +self.printerr(str(error[0])) +self.printerr("Aborting import at record #%d. " + "Previously-inserted values still present." + % error[1]) finally: if do_close: linesource.close() elif self.tty: print -return rownum + 1 +return rownum-1 + +def create_insert_statement(self, columns, nullval, table_meta, row): + +if len(row) != len(columns): +raise ValueError( +"Record has the wrong number of fields (%d instead of %d)." +% (len(row), len(columns))) -def do_import_row(self, columns, nullval, table_meta, row): rowmap = {} primary_key_columns = [col.name for col in table_meta.primary_key] for name, value in zip(columns, row): @@ -1390,9 +1396,6 @@ class Shell(cmd.Cmd): return False else: rowmap[name] = 'null' -return self.do_import_insert(table_meta, rowmap) - -def do_import_insert(self, table_meta, rowmap): # would
[3/3] git commit: Merge branch 'cassandra-2.1' into trunk
Merge branch 'cassandra-2.1' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c69f257f Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c69f257f Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c69f257f Branch: refs/heads/trunk Commit: c69f257f9e5f14ce36f0aa8e91bc7eb13ce2d7b8 Parents: 96addee a323a1a Author: Mikhail Stepura Authored: Tue Aug 19 13:23:30 2014 -0700 Committer: Mikhail Stepura Committed: Tue Aug 19 13:23:30 2014 -0700 -- CHANGES.txt| 1 + bin/cqlsh | 50 pylib/cqlshlib/async_insert.py | 110 3 files changed, 135 insertions(+), 26 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/c69f257f/CHANGES.txt -- diff --cc CHANGES.txt index 283ce8d,6facab9..5655d39 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,22 -1,5 +1,23 @@@ +3.0 + * Verify that UDF class methods are static (CASSANDRA-7781) + * Support pure user-defined functions (CASSANDRA-7395) + * Permit configurable timestamps with cassandra-stress (CASSANDRA-7416) + * Move sstable RandomAccessReader to nio2, which allows using the + FILE_SHARE_DELETE flag on Windows (CASSANDRA-4050) + * Remove CQL2 (CASSANDRA-5918) + * Add Thrift get_multi_slice call (CASSANDRA-6757) + * Optimize fetching multiple cells by name (CASSANDRA-6933) + * Allow compilation in java 8 (CASSANDRA-7028) + * Make incremental repair default (CASSANDRA-7250) + * Enable code coverage thru JaCoCo (CASSANDRA-7226) + * Switch external naming of 'column families' to 'tables' (CASSANDRA-4369) + * Shorten SSTable path (CASSANDRA-6962) + * Use unsafe mutations for most unit tests (CASSANDRA-6969) + * Fix race condition during calculation of pending ranges (CASSANDRA-7390) + + 2.1.1 + * (cqlsh) COPY TO/FROM improvements (CASSANDRA-7405) * Support list index operations with conditions (CASSANDRA-7499) * Add max live/tombstoned cells to nodetool cfstats output (CASSANDRA-7731) * Validate IPv6 wildcard addresses properly (CASSANDRA-7680)
[04/11] git commit: CQLSH: wait up to 10 sec for a tracing session.
CQLSH: wait up to 10 sec for a tracing session. patch by Mikhail Stepura; reviewed by Tyler Hobbs for CASSANDRA-7222 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/115bbe43 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/115bbe43 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/115bbe43 Branch: refs/heads/cassandra-2.1 Commit: 115bbe435b6fe2cef99acc1cde2aa86f809de15d Parents: 563cea1 Author: Mikhail Stepura Authored: Wed Aug 13 13:35:48 2014 -0700 Committer: Mikhail Stepura Committed: Fri Aug 15 14:53:13 2014 -0700 -- CHANGES.txt | 1 + bin/cqlsh | 1 - pylib/cqlshlib/tracing.py | 58 +++--- 3 files changed, 33 insertions(+), 27 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/115bbe43/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index e335484..987c227 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.0.10 + * (cqlsh) Wait up to 10 sec for a tracing session (CASSANDRA-7222) * Fix NPE in FileCacheService.sizeInBytes (CASSANDRA-7756) * (cqlsh) cqlsh should automatically disable tracing when selecting from system_traces (CASSANDRA-7641) http://git-wip-us.apache.org/repos/asf/cassandra/blob/115bbe43/bin/cqlsh -- diff --git a/bin/cqlsh b/bin/cqlsh index 6aa397e..64d7bf5 100755 --- a/bin/cqlsh +++ b/bin/cqlsh @@ -911,7 +911,6 @@ class Shell(cmd.Cmd): result = self.perform_statement_untraced(statement, decoder=decoder, with_default_limit=with_default_limit) -time.sleep(0.5) # trace writes are async so we wait a little. print_trace_session(self, self.cursor, session_id) return result else: http://git-wip-us.apache.org/repos/asf/cassandra/blob/115bbe43/pylib/cqlshlib/tracing.py -- diff --git a/pylib/cqlshlib/tracing.py b/pylib/cqlshlib/tracing.py index fe0f71e..6dd4b14 100644 --- a/pylib/cqlshlib/tracing.py +++ b/pylib/cqlshlib/tracing.py @@ -21,9 +21,10 @@ from cqlshlib.displaying import MAGENTA TRACING_KS = 'system_traces' SESSIONS_CF = 'sessions' EVENTS_CF = 'events' +MAX_WAIT = 10.0 def print_trace_session(shell, cursor, session_id): -rows = fetch_trace_session(cursor, session_id) +rows = fetch_trace_session(cursor, session_id) if not rows: shell.printerr("Session %s wasn't found." % session_id) return @@ -41,35 +42,40 @@ def print_trace_session(shell, cursor, session_id): shell.writeresult('') def fetch_trace_session(cursor, session_id): -cursor.execute("SELECT request, coordinator, started_at, duration " - "FROM %s.%s " - "WHERE session_id = %s" % (TRACING_KS, SESSIONS_CF, session_id), - consistency_level='ONE') -session = cursor.fetchone() -if not session: -return [] -(request, coordinator, started_at, duration) = session -cursor.execute("SELECT activity, event_id, source, source_elapsed " - "FROM %s.%s " - "WHERE session_id = %s" % (TRACING_KS, EVENTS_CF, session_id), - consistency_level='ONE') -events = cursor.fetchall() +start = time.time() +while True: +time_spent = time.time() - start +if time_spent >= MAX_WAIT: +return [] +cursor.execute("SELECT request, coordinator, started_at, duration " + "FROM %s.%s " + "WHERE session_id = %s" % (TRACING_KS, SESSIONS_CF, session_id), + consistency_level='ONE') +session = cursor.fetchone() -rows = [] -# append header row (from sessions table). -rows.append([request, format_timestamp(started_at), coordinator, 0]) -# append main rows (from events table). -for activity, event_id, source, source_elapsed in events: -rows.append([activity, format_timeuuid(event_id), source, source_elapsed]) -# append footer row (from sessions table). -if duration: +if not session or session[3] is None: #session[3] is a duration +time.sleep(0.5) +continue + +(request, coordinator, started_at, duration) = session +cursor.execute("SELECT activity, event_id, source, source_elapsed " + "FROM %s.%s " + "WHERE session_id = %s" % (TRACING_KS, EVENTS_CF, session_id), + consistency_level='ONE') +events = cursor
[09/11] git commit: Merge branch 'cassandra-2.1.0' into cassandra-2.1
Merge branch 'cassandra-2.1.0' into cassandra-2.1 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/ff9c6316 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ff9c6316 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ff9c6316 Branch: refs/heads/trunk Commit: ff9c6316365ab4aa523fab466da16118dc2494b0 Parents: 96d0331 d087317 Author: Mikhail Stepura Authored: Fri Aug 15 14:56:28 2014 -0700 Committer: Mikhail Stepura Committed: Fri Aug 15 14:56:28 2014 -0700 -- --
[07/11] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1.0
Merge branch 'cassandra-2.0' into cassandra-2.1.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d087317f Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d087317f Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d087317f Branch: refs/heads/cassandra-2.1 Commit: d087317fdd0a2b35c0ee7473d6c83f0b24ced27d Parents: f2d6057 115bbe4 Author: Mikhail Stepura Authored: Fri Aug 15 14:55:25 2014 -0700 Committer: Mikhail Stepura Committed: Fri Aug 15 14:55:25 2014 -0700 -- --
[02/11] git commit: CQLSH: wait up to 10 sec for a tracing session.
CQLSH: wait up to 10 sec for a tracing session. patch by Mikhail Stepura; reviewed by Tyler Hobbs for CASSANDRA-7222 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/115bbe43 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/115bbe43 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/115bbe43 Branch: refs/heads/cassandra-2.0 Commit: 115bbe435b6fe2cef99acc1cde2aa86f809de15d Parents: 563cea1 Author: Mikhail Stepura Authored: Wed Aug 13 13:35:48 2014 -0700 Committer: Mikhail Stepura Committed: Fri Aug 15 14:53:13 2014 -0700 -- CHANGES.txt | 1 + bin/cqlsh | 1 - pylib/cqlshlib/tracing.py | 58 +++--- 3 files changed, 33 insertions(+), 27 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/115bbe43/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index e335484..987c227 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.0.10 + * (cqlsh) Wait up to 10 sec for a tracing session (CASSANDRA-7222) * Fix NPE in FileCacheService.sizeInBytes (CASSANDRA-7756) * (cqlsh) cqlsh should automatically disable tracing when selecting from system_traces (CASSANDRA-7641) http://git-wip-us.apache.org/repos/asf/cassandra/blob/115bbe43/bin/cqlsh -- diff --git a/bin/cqlsh b/bin/cqlsh index 6aa397e..64d7bf5 100755 --- a/bin/cqlsh +++ b/bin/cqlsh @@ -911,7 +911,6 @@ class Shell(cmd.Cmd): result = self.perform_statement_untraced(statement, decoder=decoder, with_default_limit=with_default_limit) -time.sleep(0.5) # trace writes are async so we wait a little. print_trace_session(self, self.cursor, session_id) return result else: http://git-wip-us.apache.org/repos/asf/cassandra/blob/115bbe43/pylib/cqlshlib/tracing.py -- diff --git a/pylib/cqlshlib/tracing.py b/pylib/cqlshlib/tracing.py index fe0f71e..6dd4b14 100644 --- a/pylib/cqlshlib/tracing.py +++ b/pylib/cqlshlib/tracing.py @@ -21,9 +21,10 @@ from cqlshlib.displaying import MAGENTA TRACING_KS = 'system_traces' SESSIONS_CF = 'sessions' EVENTS_CF = 'events' +MAX_WAIT = 10.0 def print_trace_session(shell, cursor, session_id): -rows = fetch_trace_session(cursor, session_id) +rows = fetch_trace_session(cursor, session_id) if not rows: shell.printerr("Session %s wasn't found." % session_id) return @@ -41,35 +42,40 @@ def print_trace_session(shell, cursor, session_id): shell.writeresult('') def fetch_trace_session(cursor, session_id): -cursor.execute("SELECT request, coordinator, started_at, duration " - "FROM %s.%s " - "WHERE session_id = %s" % (TRACING_KS, SESSIONS_CF, session_id), - consistency_level='ONE') -session = cursor.fetchone() -if not session: -return [] -(request, coordinator, started_at, duration) = session -cursor.execute("SELECT activity, event_id, source, source_elapsed " - "FROM %s.%s " - "WHERE session_id = %s" % (TRACING_KS, EVENTS_CF, session_id), - consistency_level='ONE') -events = cursor.fetchall() +start = time.time() +while True: +time_spent = time.time() - start +if time_spent >= MAX_WAIT: +return [] +cursor.execute("SELECT request, coordinator, started_at, duration " + "FROM %s.%s " + "WHERE session_id = %s" % (TRACING_KS, SESSIONS_CF, session_id), + consistency_level='ONE') +session = cursor.fetchone() -rows = [] -# append header row (from sessions table). -rows.append([request, format_timestamp(started_at), coordinator, 0]) -# append main rows (from events table). -for activity, event_id, source, source_elapsed in events: -rows.append([activity, format_timeuuid(event_id), source, source_elapsed]) -# append footer row (from sessions table). -if duration: +if not session or session[3] is None: #session[3] is a duration +time.sleep(0.5) +continue + +(request, coordinator, started_at, duration) = session +cursor.execute("SELECT activity, event_id, source, source_elapsed " + "FROM %s.%s " + "WHERE session_id = %s" % (TRACING_KS, EVENTS_CF, session_id), + consistency_level='ONE') +events = cursor
[06/11] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1.0
Merge branch 'cassandra-2.0' into cassandra-2.1.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d087317f Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d087317f Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d087317f Branch: refs/heads/cassandra-2.1.0 Commit: d087317fdd0a2b35c0ee7473d6c83f0b24ced27d Parents: f2d6057 115bbe4 Author: Mikhail Stepura Authored: Fri Aug 15 14:55:25 2014 -0700 Committer: Mikhail Stepura Committed: Fri Aug 15 14:55:25 2014 -0700 -- --
[10/11] git commit: Merge branch 'cassandra-2.1.0' into cassandra-2.1
Merge branch 'cassandra-2.1.0' into cassandra-2.1 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/ff9c6316 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ff9c6316 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ff9c6316 Branch: refs/heads/cassandra-2.1 Commit: ff9c6316365ab4aa523fab466da16118dc2494b0 Parents: 96d0331 d087317 Author: Mikhail Stepura Authored: Fri Aug 15 14:56:28 2014 -0700 Committer: Mikhail Stepura Committed: Fri Aug 15 14:56:28 2014 -0700 -- --
[05/11] git commit: CQLSH: wait up to 10 sec for a tracing session.
CQLSH: wait up to 10 sec for a tracing session. patch by Mikhail Stepura; reviewed by Tyler Hobbs for CASSANDRA-7222 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/115bbe43 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/115bbe43 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/115bbe43 Branch: refs/heads/trunk Commit: 115bbe435b6fe2cef99acc1cde2aa86f809de15d Parents: 563cea1 Author: Mikhail Stepura Authored: Wed Aug 13 13:35:48 2014 -0700 Committer: Mikhail Stepura Committed: Fri Aug 15 14:53:13 2014 -0700 -- CHANGES.txt | 1 + bin/cqlsh | 1 - pylib/cqlshlib/tracing.py | 58 +++--- 3 files changed, 33 insertions(+), 27 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/115bbe43/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index e335484..987c227 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.0.10 + * (cqlsh) Wait up to 10 sec for a tracing session (CASSANDRA-7222) * Fix NPE in FileCacheService.sizeInBytes (CASSANDRA-7756) * (cqlsh) cqlsh should automatically disable tracing when selecting from system_traces (CASSANDRA-7641) http://git-wip-us.apache.org/repos/asf/cassandra/blob/115bbe43/bin/cqlsh -- diff --git a/bin/cqlsh b/bin/cqlsh index 6aa397e..64d7bf5 100755 --- a/bin/cqlsh +++ b/bin/cqlsh @@ -911,7 +911,6 @@ class Shell(cmd.Cmd): result = self.perform_statement_untraced(statement, decoder=decoder, with_default_limit=with_default_limit) -time.sleep(0.5) # trace writes are async so we wait a little. print_trace_session(self, self.cursor, session_id) return result else: http://git-wip-us.apache.org/repos/asf/cassandra/blob/115bbe43/pylib/cqlshlib/tracing.py -- diff --git a/pylib/cqlshlib/tracing.py b/pylib/cqlshlib/tracing.py index fe0f71e..6dd4b14 100644 --- a/pylib/cqlshlib/tracing.py +++ b/pylib/cqlshlib/tracing.py @@ -21,9 +21,10 @@ from cqlshlib.displaying import MAGENTA TRACING_KS = 'system_traces' SESSIONS_CF = 'sessions' EVENTS_CF = 'events' +MAX_WAIT = 10.0 def print_trace_session(shell, cursor, session_id): -rows = fetch_trace_session(cursor, session_id) +rows = fetch_trace_session(cursor, session_id) if not rows: shell.printerr("Session %s wasn't found." % session_id) return @@ -41,35 +42,40 @@ def print_trace_session(shell, cursor, session_id): shell.writeresult('') def fetch_trace_session(cursor, session_id): -cursor.execute("SELECT request, coordinator, started_at, duration " - "FROM %s.%s " - "WHERE session_id = %s" % (TRACING_KS, SESSIONS_CF, session_id), - consistency_level='ONE') -session = cursor.fetchone() -if not session: -return [] -(request, coordinator, started_at, duration) = session -cursor.execute("SELECT activity, event_id, source, source_elapsed " - "FROM %s.%s " - "WHERE session_id = %s" % (TRACING_KS, EVENTS_CF, session_id), - consistency_level='ONE') -events = cursor.fetchall() +start = time.time() +while True: +time_spent = time.time() - start +if time_spent >= MAX_WAIT: +return [] +cursor.execute("SELECT request, coordinator, started_at, duration " + "FROM %s.%s " + "WHERE session_id = %s" % (TRACING_KS, SESSIONS_CF, session_id), + consistency_level='ONE') +session = cursor.fetchone() -rows = [] -# append header row (from sessions table). -rows.append([request, format_timestamp(started_at), coordinator, 0]) -# append main rows (from events table). -for activity, event_id, source, source_elapsed in events: -rows.append([activity, format_timeuuid(event_id), source, source_elapsed]) -# append footer row (from sessions table). -if duration: +if not session or session[3] is None: #session[3] is a duration +time.sleep(0.5) +continue + +(request, coordinator, started_at, duration) = session +cursor.execute("SELECT activity, event_id, source, source_elapsed " + "FROM %s.%s " + "WHERE session_id = %s" % (TRACING_KS, EVENTS_CF, session_id), + consistency_level='ONE') +events = cursor.fetchal