cassandra git commit: Add a check to cqlsh to require Python-2.7

2015-10-23 Thread blerer
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.2 bbaa9630c -> a5053fd94


Add a check to cqlsh to require Python-2.7

patch by Benjamin Lerer; reviewed by Stefania Alborghetti for CASSANDRA-10561


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

Branch: refs/heads/cassandra-2.2
Commit: a5053fd9447ae1d41e600418bf9fcb158398e8d0
Parents: bbaa963
Author: blerer 
Authored: Fri Oct 23 09:39:31 2015 +0200
Committer: blerer 
Committed: Fri Oct 23 09:39:31 2015 +0200

--
 bin/cqlsh.py | 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a5053fd9/bin/cqlsh.py
--
diff --git a/bin/cqlsh.py b/bin/cqlsh.py
index a15fb02..7f2d39b 100644
--- a/bin/cqlsh.py
+++ b/bin/cqlsh.py
@@ -51,6 +51,9 @@ from glob import glob
 from StringIO import StringIO
 from uuid import UUID
 
+if sys.version_info[0] != 2 or sys.version_info[1] != 7:
+sys.exit("\nCQL Shell supports only Python 2.7\n")
+
 description = "CQL Shell for Apache Cassandra"
 version = "5.0.1"
 



[3/4] cassandra git commit: Add a check to cqlsh to require Python-2.7

2015-10-23 Thread blerer
Add a check to cqlsh to require Python-2.7

patch by Benjamin Lerer; reviewed by Stefania Alborghetti for CASSANDRA-10561


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

Branch: refs/heads/cassandra-3.0
Commit: a5053fd9447ae1d41e600418bf9fcb158398e8d0
Parents: bbaa963
Author: blerer 
Authored: Fri Oct 23 09:39:31 2015 +0200
Committer: blerer 
Committed: Fri Oct 23 09:39:31 2015 +0200

--
 bin/cqlsh.py | 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a5053fd9/bin/cqlsh.py
--
diff --git a/bin/cqlsh.py b/bin/cqlsh.py
index a15fb02..7f2d39b 100644
--- a/bin/cqlsh.py
+++ b/bin/cqlsh.py
@@ -51,6 +51,9 @@ from glob import glob
 from StringIO import StringIO
 from uuid import UUID
 
+if sys.version_info[0] != 2 or sys.version_info[1] != 7:
+sys.exit("\nCQL Shell supports only Python 2.7\n")
+
 description = "CQL Shell for Apache Cassandra"
 version = "5.0.1"
 



[1/4] cassandra git commit: Make cqlsh support python-2.6 (FOLLOW-UP CASSANDRA-10415)

2015-10-23 Thread blerer
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.0 079890579 -> a63980868


Make cqlsh support python-2.6 (FOLLOW-UP CASSANDRA-10415)

patch by Stefania Alborghetti; reviewed by Benjamin Lerer for CASSANDRA-10415


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

Branch: refs/heads/cassandra-3.0
Commit: 5a1d376489e5884b381e3bee3afd22130945782d
Parents: 29ff1f2
Author: Stefania Alborghetti 
Authored: Thu Oct 22 10:12:04 2015 +0200
Committer: blerer 
Committed: Thu Oct 22 10:17:17 2015 +0200

--
 pylib/cqlshlib/cqlhandling.py| 2 +-
 pylib/cqlshlib/test/test_cqlsh_completion.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5a1d3764/pylib/cqlshlib/cqlhandling.py
--
diff --git a/pylib/cqlshlib/cqlhandling.py b/pylib/cqlshlib/cqlhandling.py
index 9ea30cd..6ee3cf5 100644
--- a/pylib/cqlshlib/cqlhandling.py
+++ b/pylib/cqlshlib/cqlhandling.py
@@ -63,7 +63,7 @@ class CqlParsingRuleSet(pylexotron.ParsingRuleSet):
 We cannot let resreved cql keywords be simple 'identifier' since this 
caused
 problems with completion, see CASSANDRA-10415
 """
-syntax = ' ::= /(' + '|'.join(r'\b{}\b'.format(k) 
for k in keywords) + ')/ ;'
+syntax = ' ::= /(' + '|'.join(r'\b%s\b' % (k,) 
for k in keywords) + ')/ ;'
 self.append_rules(syntax)
 
 def completer_for(self, rulename, symname):

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5a1d3764/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 5f7b6e4..04cee5d 100644
--- a/pylib/cqlshlib/test/test_cqlsh_completion.py
+++ b/pylib/cqlshlib/test/test_cqlsh_completion.py
@@ -76,7 +76,7 @@ class CqlshCompletionCase(BaseTestCase):
 # ensure the last line of the completion is the prompt
 prompt_regex = self.cqlsh.prompt.lstrip() + re.escape(inputstring)
 msg = ('Double-tab completion '
-   'does not print prompt for input "{}"'.format(inputstring))
+   'does not print prompt for input "%s"' % (inputstring, ))
 self.assertRegexpMatches(choice_lines[-1], prompt_regex, msg=msg)
 
 choice_lines = [line.strip() for line in choice_lines[:-1]]



[2/4] cassandra git commit: Merge branch cassandra-2.1 into cassandra-2.2

2015-10-23 Thread blerer
Merge branch cassandra-2.1 into cassandra-2.2


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

Branch: refs/heads/cassandra-3.0
Commit: bbaa9630c4be9a9451f69ddd25e045dc2e92c057
Parents: 12e38f7 5a1d376
Author: blerer 
Authored: Thu Oct 22 10:22:01 2015 +0200
Committer: blerer 
Committed: Thu Oct 22 10:22:12 2015 +0200

--

--




[4/4] cassandra git commit: Merge branch cassandra-2.2 into cassandra-3.0

2015-10-23 Thread blerer
Merge branch cassandra-2.2 into cassandra-3.0


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

Branch: refs/heads/cassandra-3.0
Commit: a639808688d951eb8306f6e52a0da5a04d2c6453
Parents: 0798905 a5053fd
Author: blerer 
Authored: Fri Oct 23 09:43:50 2015 +0200
Committer: blerer 
Committed: Fri Oct 23 09:44:01 2015 +0200

--
 bin/cqlsh.py | 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a6398086/bin/cqlsh.py
--



[4/5] cassandra git commit: Merge branch cassandra-2.2 into cassandra-3.0

2015-10-23 Thread blerer
Merge branch cassandra-2.2 into cassandra-3.0


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

Branch: refs/heads/trunk
Commit: a639808688d951eb8306f6e52a0da5a04d2c6453
Parents: 0798905 a5053fd
Author: blerer 
Authored: Fri Oct 23 09:43:50 2015 +0200
Committer: blerer 
Committed: Fri Oct 23 09:44:01 2015 +0200

--
 bin/cqlsh.py | 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a6398086/bin/cqlsh.py
--



[3/5] cassandra git commit: Add a check to cqlsh to require Python-2.7

2015-10-23 Thread blerer
Add a check to cqlsh to require Python-2.7

patch by Benjamin Lerer; reviewed by Stefania Alborghetti for CASSANDRA-10561


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

Branch: refs/heads/trunk
Commit: a5053fd9447ae1d41e600418bf9fcb158398e8d0
Parents: bbaa963
Author: blerer 
Authored: Fri Oct 23 09:39:31 2015 +0200
Committer: blerer 
Committed: Fri Oct 23 09:39:31 2015 +0200

--
 bin/cqlsh.py | 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a5053fd9/bin/cqlsh.py
--
diff --git a/bin/cqlsh.py b/bin/cqlsh.py
index a15fb02..7f2d39b 100644
--- a/bin/cqlsh.py
+++ b/bin/cqlsh.py
@@ -51,6 +51,9 @@ from glob import glob
 from StringIO import StringIO
 from uuid import UUID
 
+if sys.version_info[0] != 2 or sys.version_info[1] != 7:
+sys.exit("\nCQL Shell supports only Python 2.7\n")
+
 description = "CQL Shell for Apache Cassandra"
 version = "5.0.1"
 



[5/5] cassandra git commit: Merge branch cassandra-3.0 into trunk

2015-10-23 Thread blerer
Merge branch cassandra-3.0 into trunk


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

Branch: refs/heads/trunk
Commit: e43fbe0a79b66b1f68b271f7584f81a33a657401
Parents: 04fa645 a639808
Author: blerer 
Authored: Fri Oct 23 09:45:04 2015 +0200
Committer: blerer 
Committed: Fri Oct 23 09:45:09 2015 +0200

--
 bin/cqlsh.py | 3 +++
 1 file changed, 3 insertions(+)
--




[1/5] cassandra git commit: Make cqlsh support python-2.6 (FOLLOW-UP CASSANDRA-10415)

2015-10-23 Thread blerer
Repository: cassandra
Updated Branches:
  refs/heads/trunk 04fa64574 -> e43fbe0a7


Make cqlsh support python-2.6 (FOLLOW-UP CASSANDRA-10415)

patch by Stefania Alborghetti; reviewed by Benjamin Lerer for CASSANDRA-10415


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

Branch: refs/heads/trunk
Commit: 5a1d376489e5884b381e3bee3afd22130945782d
Parents: 29ff1f2
Author: Stefania Alborghetti 
Authored: Thu Oct 22 10:12:04 2015 +0200
Committer: blerer 
Committed: Thu Oct 22 10:17:17 2015 +0200

--
 pylib/cqlshlib/cqlhandling.py| 2 +-
 pylib/cqlshlib/test/test_cqlsh_completion.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5a1d3764/pylib/cqlshlib/cqlhandling.py
--
diff --git a/pylib/cqlshlib/cqlhandling.py b/pylib/cqlshlib/cqlhandling.py
index 9ea30cd..6ee3cf5 100644
--- a/pylib/cqlshlib/cqlhandling.py
+++ b/pylib/cqlshlib/cqlhandling.py
@@ -63,7 +63,7 @@ class CqlParsingRuleSet(pylexotron.ParsingRuleSet):
 We cannot let resreved cql keywords be simple 'identifier' since this 
caused
 problems with completion, see CASSANDRA-10415
 """
-syntax = ' ::= /(' + '|'.join(r'\b{}\b'.format(k) 
for k in keywords) + ')/ ;'
+syntax = ' ::= /(' + '|'.join(r'\b%s\b' % (k,) 
for k in keywords) + ')/ ;'
 self.append_rules(syntax)
 
 def completer_for(self, rulename, symname):

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5a1d3764/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 5f7b6e4..04cee5d 100644
--- a/pylib/cqlshlib/test/test_cqlsh_completion.py
+++ b/pylib/cqlshlib/test/test_cqlsh_completion.py
@@ -76,7 +76,7 @@ class CqlshCompletionCase(BaseTestCase):
 # ensure the last line of the completion is the prompt
 prompt_regex = self.cqlsh.prompt.lstrip() + re.escape(inputstring)
 msg = ('Double-tab completion '
-   'does not print prompt for input "{}"'.format(inputstring))
+   'does not print prompt for input "%s"' % (inputstring, ))
 self.assertRegexpMatches(choice_lines[-1], prompt_regex, msg=msg)
 
 choice_lines = [line.strip() for line in choice_lines[:-1]]



[2/5] cassandra git commit: Merge branch cassandra-2.1 into cassandra-2.2

2015-10-23 Thread blerer
Merge branch cassandra-2.1 into cassandra-2.2


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

Branch: refs/heads/trunk
Commit: bbaa9630c4be9a9451f69ddd25e045dc2e92c057
Parents: 12e38f7 5a1d376
Author: blerer 
Authored: Thu Oct 22 10:22:01 2015 +0200
Committer: blerer 
Committed: Thu Oct 22 10:22:12 2015 +0200

--

--




[05/10] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2

2015-10-23 Thread jmckenzie
Merge branch 'cassandra-2.1' into cassandra-2.2


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

Branch: refs/heads/cassandra-3.0
Commit: 013ce88512af839800597d1adc52689679a725a3
Parents: a5053fd 34b8d8f
Author: Joshua McKenzie 
Authored: Fri Oct 23 13:58:59 2015 -0400
Committer: Joshua McKenzie 
Committed: Fri Oct 23 13:58:59 2015 -0400

--
 pylib/cqlshlib/test/run_cqlsh.py |  2 +-
 pylib/cqlshlib/test/test_cqlsh_output.py | 10 +-
 2 files changed, 6 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/013ce885/pylib/cqlshlib/test/run_cqlsh.py
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/013ce885/pylib/cqlshlib/test/test_cqlsh_output.py
--



[10/10] cassandra git commit: Merge branch 'cassandra-3.0' into trunk

2015-10-23 Thread jmckenzie
Merge branch 'cassandra-3.0' into trunk


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

Branch: refs/heads/trunk
Commit: 87f16ca9ac52d8042563ce5198b776f355236617
Parents: 71d9dba 1d28a4a
Author: Joshua McKenzie 
Authored: Fri Oct 23 13:59:23 2015 -0400
Committer: Joshua McKenzie 
Committed: Fri Oct 23 13:59:23 2015 -0400

--
 pylib/cqlshlib/test/run_cqlsh.py |  2 +-
 pylib/cqlshlib/test/test_cqlsh_output.py | 10 +-
 2 files changed, 6 insertions(+), 6 deletions(-)
--




[02/10] cassandra git commit: Make cqlsh tests work when authentication is configured

2015-10-23 Thread jmckenzie
Make cqlsh tests work when authentication is configured

Patch by stefania; reviewed by aholmberg for CASSANDRA-10544


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

Branch: refs/heads/cassandra-2.2
Commit: 34b8d8fcbf528f21ac7869685e33214af381265c
Parents: 5a1d376
Author: Stefania Alborghetti 
Authored: Fri Oct 23 13:58:19 2015 -0400
Committer: Joshua McKenzie 
Committed: Fri Oct 23 13:58:19 2015 -0400

--
 pylib/cqlshlib/test/run_cqlsh.py |  2 +-
 pylib/cqlshlib/test/test_cqlsh_output.py | 10 +-
 2 files changed, 6 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/34b8d8fc/pylib/cqlshlib/test/run_cqlsh.py
--
diff --git a/pylib/cqlshlib/test/run_cqlsh.py b/pylib/cqlshlib/test/run_cqlsh.py
index 88b0ca6..cc929e1 100644
--- a/pylib/cqlshlib/test/run_cqlsh.py
+++ b/pylib/cqlshlib/test/run_cqlsh.py
@@ -27,7 +27,7 @@ import math
 from time import time
 from . import basecase
 
-DEFAULT_CQLSH_PROMPT = '\ncqlsh(:\S+)?> '
+DEFAULT_CQLSH_PROMPT = os.linesep + '(\S+@)?cqlsh(:\S+)?> '
 DEFAULT_CQLSH_TERM = 'xterm'
 
 cqlshlog = basecase.cqlshlog

http://git-wip-us.apache.org/repos/asf/cassandra/blob/34b8d8fc/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 64950e2..e3af8e8 100644
--- a/pylib/cqlshlib/test/test_cqlsh_output.py
+++ b/pylib/cqlshlib/test/test_cqlsh_output.py
@@ -522,26 +522,26 @@ class TestCqlshOutput(BaseTestCase):
 
 def test_prompt(self):
 with testrun_cqlsh(tty=True, keyspace=None, 
cqlver=cqlsh.DEFAULT_CQLVER) as c:
-self.assertEqual(c.output_header.splitlines()[-1], 'cqlsh> ')
+self.assertTrue(c.output_header.splitlines()[-1].endswith('cqlsh> 
'))
 
 c.send('\n')
 output = c.read_to_next_prompt().replace('\r\n', '\n')
-self.assertEqual(output, '\ncqlsh> ')
+self.assertTrue(output.endswith('cqlsh> '))
 
 cmd = "USE \"%s\";\n" % get_test_keyspace().replace('"', '""')
 c.send(cmd)
 output = c.read_to_next_prompt().replace('\r\n', '\n')
-self.assertEqual(output, '%scqlsh:%s> ' % (cmd, 
get_test_keyspace()))
+self.assertTrue(output.endswith('cqlsh:%s> ' % 
(get_test_keyspace(
 
 c.send('use system;\n')
 output = c.read_to_next_prompt().replace('\r\n', '\n')
-self.assertEqual(output, 'use system;\ncqlsh:system> ')
+self.assertTrue(output.endswith('cqlsh:system> '))
 
 c.send('use NONEXISTENTKEYSPACE;\n')
 outputlines = c.read_to_next_prompt().splitlines()
 
 self.assertEqual(outputlines[0], 'use NONEXISTENTKEYSPACE;')
-self.assertEqual(outputlines[2], 'cqlsh:system> ')
+self.assertTrue(outputlines[2].endswith('cqlsh:system> '))
 midline = ColoredText(outputlines[1])
 self.assertEqual(midline.plain(),
  'InvalidRequest: code=2200 [Invalid query] 
message="Keyspace \'nonexistentkeyspace\' does not exist"')



[04/10] cassandra git commit: Make cqlsh tests work when authentication is configured

2015-10-23 Thread jmckenzie
Make cqlsh tests work when authentication is configured

Patch by stefania; reviewed by aholmberg for CASSANDRA-10544


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

Branch: refs/heads/trunk
Commit: 34b8d8fcbf528f21ac7869685e33214af381265c
Parents: 5a1d376
Author: Stefania Alborghetti 
Authored: Fri Oct 23 13:58:19 2015 -0400
Committer: Joshua McKenzie 
Committed: Fri Oct 23 13:58:19 2015 -0400

--
 pylib/cqlshlib/test/run_cqlsh.py |  2 +-
 pylib/cqlshlib/test/test_cqlsh_output.py | 10 +-
 2 files changed, 6 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/34b8d8fc/pylib/cqlshlib/test/run_cqlsh.py
--
diff --git a/pylib/cqlshlib/test/run_cqlsh.py b/pylib/cqlshlib/test/run_cqlsh.py
index 88b0ca6..cc929e1 100644
--- a/pylib/cqlshlib/test/run_cqlsh.py
+++ b/pylib/cqlshlib/test/run_cqlsh.py
@@ -27,7 +27,7 @@ import math
 from time import time
 from . import basecase
 
-DEFAULT_CQLSH_PROMPT = '\ncqlsh(:\S+)?> '
+DEFAULT_CQLSH_PROMPT = os.linesep + '(\S+@)?cqlsh(:\S+)?> '
 DEFAULT_CQLSH_TERM = 'xterm'
 
 cqlshlog = basecase.cqlshlog

http://git-wip-us.apache.org/repos/asf/cassandra/blob/34b8d8fc/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 64950e2..e3af8e8 100644
--- a/pylib/cqlshlib/test/test_cqlsh_output.py
+++ b/pylib/cqlshlib/test/test_cqlsh_output.py
@@ -522,26 +522,26 @@ class TestCqlshOutput(BaseTestCase):
 
 def test_prompt(self):
 with testrun_cqlsh(tty=True, keyspace=None, 
cqlver=cqlsh.DEFAULT_CQLVER) as c:
-self.assertEqual(c.output_header.splitlines()[-1], 'cqlsh> ')
+self.assertTrue(c.output_header.splitlines()[-1].endswith('cqlsh> 
'))
 
 c.send('\n')
 output = c.read_to_next_prompt().replace('\r\n', '\n')
-self.assertEqual(output, '\ncqlsh> ')
+self.assertTrue(output.endswith('cqlsh> '))
 
 cmd = "USE \"%s\";\n" % get_test_keyspace().replace('"', '""')
 c.send(cmd)
 output = c.read_to_next_prompt().replace('\r\n', '\n')
-self.assertEqual(output, '%scqlsh:%s> ' % (cmd, 
get_test_keyspace()))
+self.assertTrue(output.endswith('cqlsh:%s> ' % 
(get_test_keyspace(
 
 c.send('use system;\n')
 output = c.read_to_next_prompt().replace('\r\n', '\n')
-self.assertEqual(output, 'use system;\ncqlsh:system> ')
+self.assertTrue(output.endswith('cqlsh:system> '))
 
 c.send('use NONEXISTENTKEYSPACE;\n')
 outputlines = c.read_to_next_prompt().splitlines()
 
 self.assertEqual(outputlines[0], 'use NONEXISTENTKEYSPACE;')
-self.assertEqual(outputlines[2], 'cqlsh:system> ')
+self.assertTrue(outputlines[2].endswith('cqlsh:system> '))
 midline = ColoredText(outputlines[1])
 self.assertEqual(midline.plain(),
  'InvalidRequest: code=2200 [Invalid query] 
message="Keyspace \'nonexistentkeyspace\' does not exist"')



[01/10] cassandra git commit: Make cqlsh tests work when authentication is configured

2015-10-23 Thread jmckenzie
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 5a1d37648 -> 34b8d8fcb
  refs/heads/cassandra-2.2 a5053fd94 -> 013ce8851
  refs/heads/cassandra-3.0 535c3ac75 -> 1d28a4acf
  refs/heads/trunk 71d9dba06 -> 87f16ca9a


Make cqlsh tests work when authentication is configured

Patch by stefania; reviewed by aholmberg for CASSANDRA-10544


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

Branch: refs/heads/cassandra-2.1
Commit: 34b8d8fcbf528f21ac7869685e33214af381265c
Parents: 5a1d376
Author: Stefania Alborghetti 
Authored: Fri Oct 23 13:58:19 2015 -0400
Committer: Joshua McKenzie 
Committed: Fri Oct 23 13:58:19 2015 -0400

--
 pylib/cqlshlib/test/run_cqlsh.py |  2 +-
 pylib/cqlshlib/test/test_cqlsh_output.py | 10 +-
 2 files changed, 6 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/34b8d8fc/pylib/cqlshlib/test/run_cqlsh.py
--
diff --git a/pylib/cqlshlib/test/run_cqlsh.py b/pylib/cqlshlib/test/run_cqlsh.py
index 88b0ca6..cc929e1 100644
--- a/pylib/cqlshlib/test/run_cqlsh.py
+++ b/pylib/cqlshlib/test/run_cqlsh.py
@@ -27,7 +27,7 @@ import math
 from time import time
 from . import basecase
 
-DEFAULT_CQLSH_PROMPT = '\ncqlsh(:\S+)?> '
+DEFAULT_CQLSH_PROMPT = os.linesep + '(\S+@)?cqlsh(:\S+)?> '
 DEFAULT_CQLSH_TERM = 'xterm'
 
 cqlshlog = basecase.cqlshlog

http://git-wip-us.apache.org/repos/asf/cassandra/blob/34b8d8fc/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 64950e2..e3af8e8 100644
--- a/pylib/cqlshlib/test/test_cqlsh_output.py
+++ b/pylib/cqlshlib/test/test_cqlsh_output.py
@@ -522,26 +522,26 @@ class TestCqlshOutput(BaseTestCase):
 
 def test_prompt(self):
 with testrun_cqlsh(tty=True, keyspace=None, 
cqlver=cqlsh.DEFAULT_CQLVER) as c:
-self.assertEqual(c.output_header.splitlines()[-1], 'cqlsh> ')
+self.assertTrue(c.output_header.splitlines()[-1].endswith('cqlsh> 
'))
 
 c.send('\n')
 output = c.read_to_next_prompt().replace('\r\n', '\n')
-self.assertEqual(output, '\ncqlsh> ')
+self.assertTrue(output.endswith('cqlsh> '))
 
 cmd = "USE \"%s\";\n" % get_test_keyspace().replace('"', '""')
 c.send(cmd)
 output = c.read_to_next_prompt().replace('\r\n', '\n')
-self.assertEqual(output, '%scqlsh:%s> ' % (cmd, 
get_test_keyspace()))
+self.assertTrue(output.endswith('cqlsh:%s> ' % 
(get_test_keyspace(
 
 c.send('use system;\n')
 output = c.read_to_next_prompt().replace('\r\n', '\n')
-self.assertEqual(output, 'use system;\ncqlsh:system> ')
+self.assertTrue(output.endswith('cqlsh:system> '))
 
 c.send('use NONEXISTENTKEYSPACE;\n')
 outputlines = c.read_to_next_prompt().splitlines()
 
 self.assertEqual(outputlines[0], 'use NONEXISTENTKEYSPACE;')
-self.assertEqual(outputlines[2], 'cqlsh:system> ')
+self.assertTrue(outputlines[2].endswith('cqlsh:system> '))
 midline = ColoredText(outputlines[1])
 self.assertEqual(midline.plain(),
  'InvalidRequest: code=2200 [Invalid query] 
message="Keyspace \'nonexistentkeyspace\' does not exist"')



[08/10] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0

2015-10-23 Thread jmckenzie
Merge branch 'cassandra-2.2' into cassandra-3.0


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

Branch: refs/heads/cassandra-3.0
Commit: 1d28a4acf816ee5fdd866627c6f23f3fc5f98a98
Parents: 535c3ac 013ce88
Author: Joshua McKenzie 
Authored: Fri Oct 23 13:59:14 2015 -0400
Committer: Joshua McKenzie 
Committed: Fri Oct 23 13:59:14 2015 -0400

--
 pylib/cqlshlib/test/run_cqlsh.py |  2 +-
 pylib/cqlshlib/test/test_cqlsh_output.py | 10 +-
 2 files changed, 6 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1d28a4ac/pylib/cqlshlib/test/test_cqlsh_output.py
--



[09/10] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0

2015-10-23 Thread jmckenzie
Merge branch 'cassandra-2.2' into cassandra-3.0


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

Branch: refs/heads/trunk
Commit: 1d28a4acf816ee5fdd866627c6f23f3fc5f98a98
Parents: 535c3ac 013ce88
Author: Joshua McKenzie 
Authored: Fri Oct 23 13:59:14 2015 -0400
Committer: Joshua McKenzie 
Committed: Fri Oct 23 13:59:14 2015 -0400

--
 pylib/cqlshlib/test/run_cqlsh.py |  2 +-
 pylib/cqlshlib/test/test_cqlsh_output.py | 10 +-
 2 files changed, 6 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1d28a4ac/pylib/cqlshlib/test/test_cqlsh_output.py
--



[jira] [Commented] (CASSANDRA-10583) After bulk loading CQL query on timestamp column returns wrong result

2015-10-23 Thread Kai Wang (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-10583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14971593#comment-14971593
 ] 

Kai Wang commented on CASSANDRA-10583:
--

This seems to be related to bulk loading. 

To reproduce:

1. Clone https://github.com/depend/issues/tree/master/CASSANDRA-10583. Build 
and run it, this application will generate an sstable with 10 rows.
2. Load it into C* with sstableloader.
3. cqlsh:timeseries_test> select * from double_daily;

 tag  | group | timestamp| value
--+---+--+---
 TEST | 1 | 2002-05-01 04:00:00+ | 0
 TEST | 1 | 2002-05-02 04:00:00+ | 1
 TEST | 1 | 2002-05-03 04:00:00+ | 2
 TEST | 1 | 2002-05-04 04:00:00+ | 3
 TEST | 1 | 2002-05-05 04:00:00+ | 4
 TEST | 1 | 2002-05-06 04:00:00+ | 5
 TEST | 1 | 2002-05-07 04:00:00+ | 6
 TEST | 1 | 2002-05-08 04:00:00+ | 7
 TEST | 1 | 2002-05-09 04:00:00+ | 8
 TEST | 1 | 2002-05-10 04:00:00+ | 9

(10 rows)

4. cqlsh:timeseries_test> select * from double_daily where tag='TEST' and group 
= 1 and timestamp > '2002-05-01 00:00:00-0400';

 tag  | group | timestamp| value
--+---+--+---
 TEST | 1 | 2002-05-01 04:00:00+ | 0
 TEST | 1 | 2002-05-02 04:00:00+ | 1
 TEST | 1 | 2002-05-03 04:00:00+ | 2
 TEST | 1 | 2002-05-04 04:00:00+ | 3
 TEST | 1 | 2002-05-05 04:00:00+ | 4
 TEST | 1 | 2002-05-06 04:00:00+ | 5
 TEST | 1 | 2002-05-07 04:00:00+ | 6
 TEST | 1 | 2002-05-08 04:00:00+ | 7
 TEST | 1 | 2002-05-09 04:00:00+ | 8
 TEST | 1 | 2002-05-10 04:00:00+ | 9

(10 rows)

5. cqlsh:timeseries_test> select * from double_daily where tag='TEST' and group 
= 1 and timestamp > '2002-05-02 00:00:00-0400';

 tag | group | timestamp | value
-+---+---+---

(0 rows)

I wasn't able to find that "equal" condition which returns everything. But 
query #5 still shows nothing is later than 2002/5/2 which is not true.

> After bulk loading CQL query on timestamp column returns wrong result
> -
>
> Key: CASSANDRA-10583
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10583
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
> Environment: Datastax Community Edition 2.1.10, Windows 2008 R2, Java 
> x64 1.8.0_60
>Reporter: Kai Wang
> Fix For: 3.x, 2.1.x, 2.2.x
>
>
> I have this table:
> {noformat}
> CREATE TABLE test (
> tag text,
> group int,
> timestamp timestamp,
> value double,
> PRIMARY KEY (tag, group, timestamp)
> ) WITH CLUSTERING ORDER BY (group ASC, timestamp DESC)
> {noformat}
> First I used CQLSSTableWriter to bulk load a bunch of sstables. Then I ran 
> this query:
> {noformat}
> cqlsh> select * from test where tag = 'MSFT' and group = 1 and timestamp 
> ='2004-12-15 16:00:00-0500';
>  tag  | group | timestamp| value
> --+---+--+---
>  MSFT | 1 | 2004-12-15 21:00:00+ | 27.11
>  MSFT | 1 | 2004-12-16 21:00:00+ | 27.16
>  MSFT | 1 | 2004-12-17 21:00:00+ | 26.96
>  MSFT | 1 | 2004-12-20 21:00:00+ | 26.95
>  MSFT | 1 | 2004-12-21 21:00:00+ | 27.07
>  MSFT | 1 | 2004-12-22 21:00:00+ | 26.98
>  MSFT | 1 | 2004-12-23 21:00:00+ | 27.01
>  MSFT | 1 | 2004-12-27 21:00:00+ | 26.85
>  MSFT | 1 | 2004-12-28 21:00:00+ | 26.95
>  MSFT | 1 | 2004-12-29 21:00:00+ |  26.9
>  MSFT | 1 | 2004-12-30 21:00:00+ | 26.76
> (11 rows)
> {noformat}
> The result is obviously wrong.
> If I run this query:
> {noformat}
> cqlsh> select * from test where tag = 'MSFT' and group = 1 and timestamp 
> ='2004-12-16 16:00:00-0500';
>  tag | group | timestamp | value
> -+---+---+---
> (0 rows)
> {noformat}
> In DevCenter I tried to create a similar table and insert a few rows but 
> couldn't reproduce this. This may have something to do with the bulk loading 
> process. But still, the fact cqlsh returns data that doesn't match the query 
> is concerning.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


<    1   2   3