You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by sn...@apache.org on 2015/06/22 16:51:58 UTC

[01/16] cassandra git commit: bump versions

Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 f778c1f88 -> c93942263
  refs/heads/cassandra-2.1 efebd8f17 -> b969496e4
  refs/heads/cassandra-2.2 2deb68ede -> 5931eb432
  refs/heads/trunk 51a9285e9 -> 4045c2933


bump versions


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

Branch: refs/heads/cassandra-2.2
Commit: 718c144324d170535d4f1a1e79dd9869cce19ed1
Parents: 42ea6e1
Author: T Jake Luciani <ja...@apache.org>
Authored: Thu Jun 18 14:53:07 2015 -0400
Committer: T Jake Luciani <ja...@apache.org>
Committed: Thu Jun 18 14:53:07 2015 -0400

----------------------------------------------------------------------
 NEWS.txt         | 10 ++++++++++
 build.xml        |  2 +-
 debian/changelog |  6 ++++++
 3 files changed, 17 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/718c1443/NEWS.txt
----------------------------------------------------------------------
diff --git a/NEWS.txt b/NEWS.txt
index 272c837..80776e8 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -13,6 +13,16 @@ restore snapshots created with the previous major version using the
 'sstableloader' tool. You can upgrade the file format of your snapshots
 using the provided 'sstableupgrade' tool.
 
+
+2.1.7
+=====
+
+Upgrading
+---------
+    - Nothing specific to this release, but please see 2.1 if you are upgrading
+      from a previous version.
+
+
 2.1.6
 =====
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/718c1443/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
index adde1d3..73e76e5 100644
--- a/build.xml
+++ b/build.xml
@@ -25,7 +25,7 @@
     <property name="debuglevel" value="source,lines,vars"/>
 
     <!-- default version and SCM information -->
-    <property name="base.version" value="2.1.6"/>
+    <property name="base.version" value="2.1.7"/>
     <property name="scm.connection" value="scm:git://git.apache.org/cassandra.git"/>
     <property name="scm.developerConnection" value="scm:git://git.apache.org/cassandra.git"/>
     <property name="scm.url" value="http://git-wip-us.apache.org/repos/asf?p=cassandra.git;a=tree"/>

http://git-wip-us.apache.org/repos/asf/cassandra/blob/718c1443/debian/changelog
----------------------------------------------------------------------
diff --git a/debian/changelog b/debian/changelog
index 1a742fa..d7e1fd1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+cassandra (2.1.7) unstable; urgency=medium
+
+  * New release 
+
+ -- Jake Luciani <ja...@apache.org>  Thu, 18 Jun 2015 14:52:26 -0400
+
 cassandra (2.1.6) unstable; urgency=medium
 
   * New release


[10/16] cassandra git commit: 'WITH WITH' in alter keyspace statements causes NPE

Posted by sn...@apache.org.
'WITH WITH' in alter keyspace statements causes NPE

patch by Benjamin Lerer; reviewed by Robert Stupp for CASSANDRA-9565


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

Branch: refs/heads/cassandra-2.0
Commit: c939422637bdba13fa3b5849cc1e7eacf26d46d0
Parents: f778c1f
Author: Benjamin Lerer <bl...@datastax.com>
Authored: Mon Jun 22 16:40:36 2015 +0200
Committer: Robert Stupp <sn...@snazy.de>
Committed: Mon Jun 22 16:40:36 2015 +0200

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 src/java/org/apache/cassandra/cql3/Cql.g        |  4 +-
 .../cql3/CreateAndAlterKeyspaceTest.java        | 89 ++++++++++++++++++++
 3 files changed, 92 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c9394226/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index b5b2f32..6e3a147 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.17
+ * 'WITH WITH' in alter keyspace statements causes NPE (CASSANDRA-9565)
  * Display min timestamp in sstablemetadata viewer (CASSANDRA-6767)
 
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c9394226/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 d41434d..8b382fa 100644
--- a/src/java/org/apache/cassandra/cql3/Cql.g
+++ b/src/java/org/apache/cassandra/cql3/Cql.g
@@ -891,8 +891,8 @@ properties[PropertyDefinitions props]
     ;
 
 property[PropertyDefinitions props]
-    : k=ident '=' (simple=propertyValue { try { $props.addProperty(k.toString(), simple); } catch (SyntaxException e) { addRecognitionError(e.getMessage()); } }
-                   |   map=map_literal   { try { $props.addProperty(k.toString(), convertPropertyMap(map)); } catch (SyntaxException e) { addRecognitionError(e.getMessage()); } })
+    : k=ident '=' simple=propertyValue { try { $props.addProperty(k.toString(), simple); } catch (SyntaxException e) { addRecognitionError(e.getMessage()); } }
+    | k=ident '=' map=map_literal { try { $props.addProperty(k.toString(), convertPropertyMap(map)); } catch (SyntaxException e) { addRecognitionError(e.getMessage()); } }
     ;
 
 propertyValue returns [String str]

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c9394226/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java b/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
new file mode 100644
index 0000000..45be0df
--- /dev/null
+++ b/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cassandra.cql3;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import org.apache.cassandra.SchemaLoader;
+import org.apache.cassandra.db.ConsistencyLevel;
+import org.apache.cassandra.exceptions.SyntaxException;
+import org.apache.cassandra.gms.Gossiper;
+
+import static org.apache.cassandra.cql3.QueryProcessor.process;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+public class CreateAndAlterKeyspaceTest
+{
+    @BeforeClass
+    public static void setUpClass() throws Throwable
+    {
+        SchemaLoader.loadSchema();
+    }
+
+    @AfterClass
+    public static void stopGossiper()
+    {
+        Gossiper.instance.stop();
+    }
+
+    @Test
+    // tests CASSANDRA-9565
+    public void testCreateAndAlterWithDoubleWith() throws Throwable
+    {
+        String[] stmts = new String[] {"ALTER KEYSPACE WITH WITH DURABLE_WRITES = true",
+                                       "ALTER KEYSPACE ks WITH WITH DURABLE_WRITES = true",
+                                       "CREATE KEYSPACE WITH WITH DURABLE_WRITES = true",
+                                       "CREATE KEYSPACE ks WITH WITH DURABLE_WRITES = true"};
+
+        for (String stmt : stmts) {
+            assertInvalidSyntax(stmt, "no viable alternative at input 'WITH'");
+        }
+    }
+
+    /**
+     * Checks that the specified statement result in a <code>SyntaxException</code> containing the specified message.
+     *
+     * @param stmt the statement to check
+     */
+    private static void assertInvalidSyntax(String stmt, String msg) throws Throwable {
+        try {
+            process(stmt, ConsistencyLevel.ONE);
+            fail();
+        } catch (RuntimeException e) {
+            assertSyntaxException(e.getCause(), msg);
+        }
+    }
+
+    /**
+     * Asserts that the specified exception is a <code>SyntaxException</code> for which the error message contains
+     * the specified text.
+     *
+     * @param exception the exception to test
+     * @param expectedContent the expected content of the error message
+     */
+    private static void assertSyntaxException(Throwable exception, String expectedContent) {
+        assertTrue("The exception should be a SyntaxException but is not", exception instanceof SyntaxException);
+
+        String msg = exception.getMessage();
+        assertTrue(String.format("The error message was expected to contains: %s but was %s", expectedContent, msg),
+                   msg.contains(expectedContent));
+    }
+}


[16/16] cassandra git commit: Merge branch 'cassandra-2.2' into trunk

Posted by sn...@apache.org.
Merge branch 'cassandra-2.2' into trunk


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

Branch: refs/heads/trunk
Commit: 4045c2933935a8cc73a9034c60e7680f625078eb
Parents: 51a9285 5931eb4
Author: Robert Stupp <sn...@snazy.de>
Authored: Mon Jun 22 16:50:50 2015 +0200
Committer: Robert Stupp <sn...@snazy.de>
Committed: Mon Jun 22 16:50:50 2015 +0200

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 src/java/org/apache/cassandra/cql3/Cql.g        |  4 +--
 .../cql3/CreateAndAlterKeyspaceTest.java        | 37 ++++++++++++++++++++
 3 files changed, 40 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/4045c293/CHANGES.txt
----------------------------------------------------------------------


[14/16] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2

Posted by sn...@apache.org.
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/5931eb43
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5931eb43
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5931eb43

Branch: refs/heads/trunk
Commit: 5931eb432ee523e4c973595416b705f52ac02116
Parents: 2deb68e b969496
Author: Robert Stupp <sn...@snazy.de>
Authored: Mon Jun 22 16:50:20 2015 +0200
Committer: Robert Stupp <sn...@snazy.de>
Committed: Mon Jun 22 16:50:20 2015 +0200

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 src/java/org/apache/cassandra/cql3/Cql.g        |  4 +--
 .../cql3/CreateAndAlterKeyspaceTest.java        | 37 ++++++++++++++++++++
 3 files changed, 40 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5931eb43/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 45727f9,28b145b..f821136
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,20 -1,8 +1,21 @@@
 -2.1.7
 +2.2
 + * Don't repair system_distributed by default (CASSANDRA-9621)
 + * Fix mixing min, max, and count aggregates for blob type (CASSANRA-9622)
 + * Rename class for DATE type in Java driver (CASSANDRA-9563)
 + * Duplicate compilation of UDFs on coordinator (CASSANDRA-9475)
 + * Fix connection leak in CqlRecordWriter (CASSANDRA-9576)
 + * Mlockall before opening system sstables & remove boot_without_jna option (CASSANDRA-9573)
 + * Add functions to convert timeuuid to date or time, deprecate dateOf and unixTimestampOf (CASSANDRA-9229)
 + * Make sure we cancel non-compacting sstables from LifecycleTransaction (CASSANDRA-9566)
 + * Fix deprecated repair JMX API (CASSANDRA-9570)
 + * Add logback metrics (CASSANDRA-9378)
 + * Update and refactor ant test/test-compression to run the tests in parallel (CASSANDRA-9583)
 +Merged from 2.1:
   * Fix bug in cardinality check when compacting (CASSANDRA-9580)
   * Fix memory leak in Ref due to ConcurrentLinkedQueue.remove() behaviour (CASSANDRA-9549)
 + * Make rebuild only run one at a time (CASSANDRA-9119)
  Merged from 2.0
+  * 'WITH WITH' in alter keyspace statements causes NPE (CASSANDRA-9565)
   * Expose some internals of SelectStatement for inspection (CASSANDRA-9532)
   * ArrivalWindow should use primitives (CASSANDRA-9496)
   * Periodically submit background compaction tasks (CASSANDRA-9592)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5931eb43/src/java/org/apache/cassandra/cql3/Cql.g
----------------------------------------------------------------------


[03/16] cassandra git commit: Backport CASSANDRA-6767 to 2.0: Display min timestamp in sstablemetadata viewer

Posted by sn...@apache.org.
Backport CASSANDRA-6767 to 2.0: Display min timestamp in sstablemetadata viewer


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

Branch: refs/heads/trunk
Commit: f778c1f88f4deb075b383f3a8b24ef279585bd32
Parents: 23e66a9
Author: Marcus Eriksson <ma...@apache.org>
Authored: Fri Jun 19 19:18:44 2015 +0200
Committer: Marcus Eriksson <ma...@apache.org>
Committed: Fri Jun 19 19:28:54 2015 +0200

----------------------------------------------------------------------
 CHANGES.txt                                                    | 4 ++++
 src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java | 1 +
 2 files changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f778c1f8/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index a235528..b5b2f32 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,7 @@
+2.0.17
+ * Display min timestamp in sstablemetadata viewer (CASSANDRA-6767)
+
+
 2.0.16:
  * Expose some internals of SelectStatement for inspection (CASSANDRA-9532)
  * ArrivalWindow should use primitives (CASSANDRA-9496)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f778c1f8/src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java b/src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java
index 64720b5..9664e9e 100644
--- a/src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java
+++ b/src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java
@@ -51,6 +51,7 @@ public class SSTableMetadataViewer
 
                 out.printf("SSTable: %s%n", descriptor);
                 out.printf("Partitioner: %s%n", metadata.partitioner);
+                out.printf("Minimum timestamp: %s%n", metadata.minTimestamp);
                 out.printf("Maximum timestamp: %s%n", metadata.maxTimestamp);
                 out.printf("SSTable max local deletion time: %s%n", metadata.maxLocalDeletionTime);
                 out.printf("Compression ratio: %s%n", metadata.compressionRatio);


[09/16] cassandra git commit: 'WITH WITH' in alter keyspace statements causes NPE

Posted by sn...@apache.org.
'WITH WITH' in alter keyspace statements causes NPE

patch by Benjamin Lerer; reviewed by Robert Stupp for CASSANDRA-9565


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

Branch: refs/heads/cassandra-2.2
Commit: c939422637bdba13fa3b5849cc1e7eacf26d46d0
Parents: f778c1f
Author: Benjamin Lerer <bl...@datastax.com>
Authored: Mon Jun 22 16:40:36 2015 +0200
Committer: Robert Stupp <sn...@snazy.de>
Committed: Mon Jun 22 16:40:36 2015 +0200

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 src/java/org/apache/cassandra/cql3/Cql.g        |  4 +-
 .../cql3/CreateAndAlterKeyspaceTest.java        | 89 ++++++++++++++++++++
 3 files changed, 92 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c9394226/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index b5b2f32..6e3a147 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.17
+ * 'WITH WITH' in alter keyspace statements causes NPE (CASSANDRA-9565)
  * Display min timestamp in sstablemetadata viewer (CASSANDRA-6767)
 
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c9394226/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 d41434d..8b382fa 100644
--- a/src/java/org/apache/cassandra/cql3/Cql.g
+++ b/src/java/org/apache/cassandra/cql3/Cql.g
@@ -891,8 +891,8 @@ properties[PropertyDefinitions props]
     ;
 
 property[PropertyDefinitions props]
-    : k=ident '=' (simple=propertyValue { try { $props.addProperty(k.toString(), simple); } catch (SyntaxException e) { addRecognitionError(e.getMessage()); } }
-                   |   map=map_literal   { try { $props.addProperty(k.toString(), convertPropertyMap(map)); } catch (SyntaxException e) { addRecognitionError(e.getMessage()); } })
+    : k=ident '=' simple=propertyValue { try { $props.addProperty(k.toString(), simple); } catch (SyntaxException e) { addRecognitionError(e.getMessage()); } }
+    | k=ident '=' map=map_literal { try { $props.addProperty(k.toString(), convertPropertyMap(map)); } catch (SyntaxException e) { addRecognitionError(e.getMessage()); } }
     ;
 
 propertyValue returns [String str]

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c9394226/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java b/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
new file mode 100644
index 0000000..45be0df
--- /dev/null
+++ b/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cassandra.cql3;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import org.apache.cassandra.SchemaLoader;
+import org.apache.cassandra.db.ConsistencyLevel;
+import org.apache.cassandra.exceptions.SyntaxException;
+import org.apache.cassandra.gms.Gossiper;
+
+import static org.apache.cassandra.cql3.QueryProcessor.process;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+public class CreateAndAlterKeyspaceTest
+{
+    @BeforeClass
+    public static void setUpClass() throws Throwable
+    {
+        SchemaLoader.loadSchema();
+    }
+
+    @AfterClass
+    public static void stopGossiper()
+    {
+        Gossiper.instance.stop();
+    }
+
+    @Test
+    // tests CASSANDRA-9565
+    public void testCreateAndAlterWithDoubleWith() throws Throwable
+    {
+        String[] stmts = new String[] {"ALTER KEYSPACE WITH WITH DURABLE_WRITES = true",
+                                       "ALTER KEYSPACE ks WITH WITH DURABLE_WRITES = true",
+                                       "CREATE KEYSPACE WITH WITH DURABLE_WRITES = true",
+                                       "CREATE KEYSPACE ks WITH WITH DURABLE_WRITES = true"};
+
+        for (String stmt : stmts) {
+            assertInvalidSyntax(stmt, "no viable alternative at input 'WITH'");
+        }
+    }
+
+    /**
+     * Checks that the specified statement result in a <code>SyntaxException</code> containing the specified message.
+     *
+     * @param stmt the statement to check
+     */
+    private static void assertInvalidSyntax(String stmt, String msg) throws Throwable {
+        try {
+            process(stmt, ConsistencyLevel.ONE);
+            fail();
+        } catch (RuntimeException e) {
+            assertSyntaxException(e.getCause(), msg);
+        }
+    }
+
+    /**
+     * Asserts that the specified exception is a <code>SyntaxException</code> for which the error message contains
+     * the specified text.
+     *
+     * @param exception the exception to test
+     * @param expectedContent the expected content of the error message
+     */
+    private static void assertSyntaxException(Throwable exception, String expectedContent) {
+        assertTrue("The exception should be a SyntaxException but is not", exception instanceof SyntaxException);
+
+        String msg = exception.getMessage();
+        assertTrue(String.format("The error message was expected to contains: %s but was %s", expectedContent, msg),
+                   msg.contains(expectedContent));
+    }
+}


[05/16] cassandra git commit: Merge branch 'cassandra-2.0' into cassandra-2.1

Posted by sn...@apache.org.
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/efebd8f1
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/efebd8f1
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/efebd8f1

Branch: refs/heads/trunk
Commit: efebd8f172d19d3c325366201235882af7531244
Parents: 718c144 f778c1f
Author: Marcus Eriksson <ma...@apache.org>
Authored: Fri Jun 19 19:36:11 2015 +0200
Committer: Marcus Eriksson <ma...@apache.org>
Committed: Fri Jun 19 19:36:11 2015 +0200

----------------------------------------------------------------------

----------------------------------------------------------------------



[15/16] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2

Posted by sn...@apache.org.
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/5931eb43
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5931eb43
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5931eb43

Branch: refs/heads/cassandra-2.2
Commit: 5931eb432ee523e4c973595416b705f52ac02116
Parents: 2deb68e b969496
Author: Robert Stupp <sn...@snazy.de>
Authored: Mon Jun 22 16:50:20 2015 +0200
Committer: Robert Stupp <sn...@snazy.de>
Committed: Mon Jun 22 16:50:20 2015 +0200

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 src/java/org/apache/cassandra/cql3/Cql.g        |  4 +--
 .../cql3/CreateAndAlterKeyspaceTest.java        | 37 ++++++++++++++++++++
 3 files changed, 40 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5931eb43/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 45727f9,28b145b..f821136
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,20 -1,8 +1,21 @@@
 -2.1.7
 +2.2
 + * Don't repair system_distributed by default (CASSANDRA-9621)
 + * Fix mixing min, max, and count aggregates for blob type (CASSANRA-9622)
 + * Rename class for DATE type in Java driver (CASSANDRA-9563)
 + * Duplicate compilation of UDFs on coordinator (CASSANDRA-9475)
 + * Fix connection leak in CqlRecordWriter (CASSANDRA-9576)
 + * Mlockall before opening system sstables & remove boot_without_jna option (CASSANDRA-9573)
 + * Add functions to convert timeuuid to date or time, deprecate dateOf and unixTimestampOf (CASSANDRA-9229)
 + * Make sure we cancel non-compacting sstables from LifecycleTransaction (CASSANDRA-9566)
 + * Fix deprecated repair JMX API (CASSANDRA-9570)
 + * Add logback metrics (CASSANDRA-9378)
 + * Update and refactor ant test/test-compression to run the tests in parallel (CASSANDRA-9583)
 +Merged from 2.1:
   * Fix bug in cardinality check when compacting (CASSANDRA-9580)
   * Fix memory leak in Ref due to ConcurrentLinkedQueue.remove() behaviour (CASSANDRA-9549)
 + * Make rebuild only run one at a time (CASSANDRA-9119)
  Merged from 2.0
+  * 'WITH WITH' in alter keyspace statements causes NPE (CASSANDRA-9565)
   * Expose some internals of SelectStatement for inspection (CASSANDRA-9532)
   * ArrivalWindow should use primitives (CASSANDRA-9496)
   * Periodically submit background compaction tasks (CASSANDRA-9592)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5931eb43/src/java/org/apache/cassandra/cql3/Cql.g
----------------------------------------------------------------------


[06/16] cassandra git commit: Merge branch 'cassandra-2.0' into cassandra-2.1

Posted by sn...@apache.org.
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/efebd8f1
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/efebd8f1
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/efebd8f1

Branch: refs/heads/cassandra-2.2
Commit: efebd8f172d19d3c325366201235882af7531244
Parents: 718c144 f778c1f
Author: Marcus Eriksson <ma...@apache.org>
Authored: Fri Jun 19 19:36:11 2015 +0200
Committer: Marcus Eriksson <ma...@apache.org>
Committed: Fri Jun 19 19:36:11 2015 +0200

----------------------------------------------------------------------

----------------------------------------------------------------------



[12/16] cassandra git commit: Merge branch 'cassandra-2.0' into cassandra-2.1

Posted by sn...@apache.org.
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/b969496e
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b969496e
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b969496e

Branch: refs/heads/cassandra-2.2
Commit: b969496e47be72d6f094f7c7db4ebac97104f924
Parents: efebd8f c939422
Author: Benjamin Lerer <bl...@datastax.com>
Authored: Mon Jun 22 16:42:43 2015 +0200
Committer: Robert Stupp <sn...@snazy.de>
Committed: Mon Jun 22 16:42:43 2015 +0200

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 src/java/org/apache/cassandra/cql3/Cql.g        |  4 +--
 .../cql3/CreateAndAlterKeyspaceTest.java        | 37 ++++++++++++++++++++
 3 files changed, 40 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b969496e/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 9ae0969,6e3a147..28b145b
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,7 -1,9 +1,8 @@@
 -2.0.17
 +2.1.7
 + * Fix bug in cardinality check when compacting (CASSANDRA-9580)
 + * Fix memory leak in Ref due to ConcurrentLinkedQueue.remove() behaviour (CASSANDRA-9549)
 +Merged from 2.0
+  * 'WITH WITH' in alter keyspace statements causes NPE (CASSANDRA-9565)
 - * Display min timestamp in sstablemetadata viewer (CASSANDRA-6767)
 -
 -
 -2.0.16:
   * Expose some internals of SelectStatement for inspection (CASSANDRA-9532)
   * ArrivalWindow should use primitives (CASSANDRA-9496)
   * Periodically submit background compaction tasks (CASSANDRA-9592)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b969496e/src/java/org/apache/cassandra/cql3/Cql.g
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/cql3/Cql.g
index f9a07b3,8b382fa..db8ef25
--- a/src/java/org/apache/cassandra/cql3/Cql.g
+++ b/src/java/org/apache/cassandra/cql3/Cql.g
@@@ -1030,8 -891,8 +1030,8 @@@ properties[PropertyDefinitions props
      ;
  
  property[PropertyDefinitions props]
-     : k=ident '=' (simple=propertyValue { try { $props.addProperty(k.toString(), simple); } catch (SyntaxException e) { addRecognitionError(e.getMessage()); } }
-                   |   map=mapLiteral    { try { $props.addProperty(k.toString(), convertPropertyMap(map)); } catch (SyntaxException e) { addRecognitionError(e.getMessage()); } })
+     : k=ident '=' simple=propertyValue { try { $props.addProperty(k.toString(), simple); } catch (SyntaxException e) { addRecognitionError(e.getMessage()); } }
 -    | k=ident '=' map=map_literal { try { $props.addProperty(k.toString(), convertPropertyMap(map)); } catch (SyntaxException e) { addRecognitionError(e.getMessage()); } }
++    | k=ident '=' map=mapLiteral { try { $props.addProperty(k.toString(), convertPropertyMap(map)); } catch (SyntaxException e) { addRecognitionError(e.getMessage()); } }
      ;
  
  propertyValue returns [String str]

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b969496e/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
----------------------------------------------------------------------
diff --cc test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
index 0000000,45be0df..9e0ca21
mode 000000,100644..100644
--- a/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
+++ b/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
@@@ -1,0 -1,89 +1,37 @@@
+ /*
+  * Licensed to the Apache Software Foundation (ASF) under one
+  * or more contributor license agreements.  See the NOTICE file
+  * distributed with this work for additional information
+  * regarding copyright ownership.  The ASF licenses this file
+  * to you under the Apache License, Version 2.0 (the
+  * "License"); you may not use this file except in compliance
+  * with the License.  You may obtain a copy of the License at
+  *
+  *     http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+ package org.apache.cassandra.cql3;
+ 
 -import org.junit.AfterClass;
 -import org.junit.BeforeClass;
+ import org.junit.Test;
+ 
 -import org.apache.cassandra.SchemaLoader;
 -import org.apache.cassandra.db.ConsistencyLevel;
 -import org.apache.cassandra.exceptions.SyntaxException;
 -import org.apache.cassandra.gms.Gossiper;
 -
 -import static org.apache.cassandra.cql3.QueryProcessor.process;
 -import static org.junit.Assert.assertTrue;
 -import static org.junit.Assert.fail;
 -
 -public class CreateAndAlterKeyspaceTest
++public class CreateAndAlterKeyspaceTest extends CQLTester
+ {
 -    @BeforeClass
 -    public static void setUpClass() throws Throwable
 -    {
 -        SchemaLoader.loadSchema();
 -    }
 -
 -    @AfterClass
 -    public static void stopGossiper()
 -    {
 -        Gossiper.instance.stop();
 -    }
 -
+     @Test
+     // tests CASSANDRA-9565
+     public void testCreateAndAlterWithDoubleWith() throws Throwable
+     {
+         String[] stmts = new String[] {"ALTER KEYSPACE WITH WITH DURABLE_WRITES = true",
+                                        "ALTER KEYSPACE ks WITH WITH DURABLE_WRITES = true",
+                                        "CREATE KEYSPACE WITH WITH DURABLE_WRITES = true",
+                                        "CREATE KEYSPACE ks WITH WITH DURABLE_WRITES = true"};
+ 
+         for (String stmt : stmts) {
 -            assertInvalidSyntax(stmt, "no viable alternative at input 'WITH'");
 -        }
 -    }
 -
 -    /**
 -     * Checks that the specified statement result in a <code>SyntaxException</code> containing the specified message.
 -     *
 -     * @param stmt the statement to check
 -     */
 -    private static void assertInvalidSyntax(String stmt, String msg) throws Throwable {
 -        try {
 -            process(stmt, ConsistencyLevel.ONE);
 -            fail();
 -        } catch (RuntimeException e) {
 -            assertSyntaxException(e.getCause(), msg);
++            assertInvalidSyntaxMessage("no viable alternative at input 'WITH'", stmt);
+         }
+     }
 -
 -    /**
 -     * Asserts that the specified exception is a <code>SyntaxException</code> for which the error message contains
 -     * the specified text.
 -     *
 -     * @param exception the exception to test
 -     * @param expectedContent the expected content of the error message
 -     */
 -    private static void assertSyntaxException(Throwable exception, String expectedContent) {
 -        assertTrue("The exception should be a SyntaxException but is not", exception instanceof SyntaxException);
 -
 -        String msg = exception.getMessage();
 -        assertTrue(String.format("The error message was expected to contains: %s but was %s", expectedContent, msg),
 -                   msg.contains(expectedContent));
 -    }
+ }


[02/16] cassandra git commit: bump versions

Posted by sn...@apache.org.
bump versions


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

Branch: refs/heads/trunk
Commit: 718c144324d170535d4f1a1e79dd9869cce19ed1
Parents: 42ea6e1
Author: T Jake Luciani <ja...@apache.org>
Authored: Thu Jun 18 14:53:07 2015 -0400
Committer: T Jake Luciani <ja...@apache.org>
Committed: Thu Jun 18 14:53:07 2015 -0400

----------------------------------------------------------------------
 NEWS.txt         | 10 ++++++++++
 build.xml        |  2 +-
 debian/changelog |  6 ++++++
 3 files changed, 17 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/718c1443/NEWS.txt
----------------------------------------------------------------------
diff --git a/NEWS.txt b/NEWS.txt
index 272c837..80776e8 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -13,6 +13,16 @@ restore snapshots created with the previous major version using the
 'sstableloader' tool. You can upgrade the file format of your snapshots
 using the provided 'sstableupgrade' tool.
 
+
+2.1.7
+=====
+
+Upgrading
+---------
+    - Nothing specific to this release, but please see 2.1 if you are upgrading
+      from a previous version.
+
+
 2.1.6
 =====
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/718c1443/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
index adde1d3..73e76e5 100644
--- a/build.xml
+++ b/build.xml
@@ -25,7 +25,7 @@
     <property name="debuglevel" value="source,lines,vars"/>
 
     <!-- default version and SCM information -->
-    <property name="base.version" value="2.1.6"/>
+    <property name="base.version" value="2.1.7"/>
     <property name="scm.connection" value="scm:git://git.apache.org/cassandra.git"/>
     <property name="scm.developerConnection" value="scm:git://git.apache.org/cassandra.git"/>
     <property name="scm.url" value="http://git-wip-us.apache.org/repos/asf?p=cassandra.git;a=tree"/>

http://git-wip-us.apache.org/repos/asf/cassandra/blob/718c1443/debian/changelog
----------------------------------------------------------------------
diff --git a/debian/changelog b/debian/changelog
index 1a742fa..d7e1fd1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+cassandra (2.1.7) unstable; urgency=medium
+
+  * New release 
+
+ -- Jake Luciani <ja...@apache.org>  Thu, 18 Jun 2015 14:52:26 -0400
+
 cassandra (2.1.6) unstable; urgency=medium
 
   * New release


[11/16] cassandra git commit: Merge branch 'cassandra-2.0' into cassandra-2.1

Posted by sn...@apache.org.
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/b969496e
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b969496e
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b969496e

Branch: refs/heads/trunk
Commit: b969496e47be72d6f094f7c7db4ebac97104f924
Parents: efebd8f c939422
Author: Benjamin Lerer <bl...@datastax.com>
Authored: Mon Jun 22 16:42:43 2015 +0200
Committer: Robert Stupp <sn...@snazy.de>
Committed: Mon Jun 22 16:42:43 2015 +0200

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 src/java/org/apache/cassandra/cql3/Cql.g        |  4 +--
 .../cql3/CreateAndAlterKeyspaceTest.java        | 37 ++++++++++++++++++++
 3 files changed, 40 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b969496e/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 9ae0969,6e3a147..28b145b
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,7 -1,9 +1,8 @@@
 -2.0.17
 +2.1.7
 + * Fix bug in cardinality check when compacting (CASSANDRA-9580)
 + * Fix memory leak in Ref due to ConcurrentLinkedQueue.remove() behaviour (CASSANDRA-9549)
 +Merged from 2.0
+  * 'WITH WITH' in alter keyspace statements causes NPE (CASSANDRA-9565)
 - * Display min timestamp in sstablemetadata viewer (CASSANDRA-6767)
 -
 -
 -2.0.16:
   * Expose some internals of SelectStatement for inspection (CASSANDRA-9532)
   * ArrivalWindow should use primitives (CASSANDRA-9496)
   * Periodically submit background compaction tasks (CASSANDRA-9592)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b969496e/src/java/org/apache/cassandra/cql3/Cql.g
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/cql3/Cql.g
index f9a07b3,8b382fa..db8ef25
--- a/src/java/org/apache/cassandra/cql3/Cql.g
+++ b/src/java/org/apache/cassandra/cql3/Cql.g
@@@ -1030,8 -891,8 +1030,8 @@@ properties[PropertyDefinitions props
      ;
  
  property[PropertyDefinitions props]
-     : k=ident '=' (simple=propertyValue { try { $props.addProperty(k.toString(), simple); } catch (SyntaxException e) { addRecognitionError(e.getMessage()); } }
-                   |   map=mapLiteral    { try { $props.addProperty(k.toString(), convertPropertyMap(map)); } catch (SyntaxException e) { addRecognitionError(e.getMessage()); } })
+     : k=ident '=' simple=propertyValue { try { $props.addProperty(k.toString(), simple); } catch (SyntaxException e) { addRecognitionError(e.getMessage()); } }
 -    | k=ident '=' map=map_literal { try { $props.addProperty(k.toString(), convertPropertyMap(map)); } catch (SyntaxException e) { addRecognitionError(e.getMessage()); } }
++    | k=ident '=' map=mapLiteral { try { $props.addProperty(k.toString(), convertPropertyMap(map)); } catch (SyntaxException e) { addRecognitionError(e.getMessage()); } }
      ;
  
  propertyValue returns [String str]

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b969496e/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
----------------------------------------------------------------------
diff --cc test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
index 0000000,45be0df..9e0ca21
mode 000000,100644..100644
--- a/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
+++ b/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
@@@ -1,0 -1,89 +1,37 @@@
+ /*
+  * Licensed to the Apache Software Foundation (ASF) under one
+  * or more contributor license agreements.  See the NOTICE file
+  * distributed with this work for additional information
+  * regarding copyright ownership.  The ASF licenses this file
+  * to you under the Apache License, Version 2.0 (the
+  * "License"); you may not use this file except in compliance
+  * with the License.  You may obtain a copy of the License at
+  *
+  *     http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+ package org.apache.cassandra.cql3;
+ 
 -import org.junit.AfterClass;
 -import org.junit.BeforeClass;
+ import org.junit.Test;
+ 
 -import org.apache.cassandra.SchemaLoader;
 -import org.apache.cassandra.db.ConsistencyLevel;
 -import org.apache.cassandra.exceptions.SyntaxException;
 -import org.apache.cassandra.gms.Gossiper;
 -
 -import static org.apache.cassandra.cql3.QueryProcessor.process;
 -import static org.junit.Assert.assertTrue;
 -import static org.junit.Assert.fail;
 -
 -public class CreateAndAlterKeyspaceTest
++public class CreateAndAlterKeyspaceTest extends CQLTester
+ {
 -    @BeforeClass
 -    public static void setUpClass() throws Throwable
 -    {
 -        SchemaLoader.loadSchema();
 -    }
 -
 -    @AfterClass
 -    public static void stopGossiper()
 -    {
 -        Gossiper.instance.stop();
 -    }
 -
+     @Test
+     // tests CASSANDRA-9565
+     public void testCreateAndAlterWithDoubleWith() throws Throwable
+     {
+         String[] stmts = new String[] {"ALTER KEYSPACE WITH WITH DURABLE_WRITES = true",
+                                        "ALTER KEYSPACE ks WITH WITH DURABLE_WRITES = true",
+                                        "CREATE KEYSPACE WITH WITH DURABLE_WRITES = true",
+                                        "CREATE KEYSPACE ks WITH WITH DURABLE_WRITES = true"};
+ 
+         for (String stmt : stmts) {
 -            assertInvalidSyntax(stmt, "no viable alternative at input 'WITH'");
 -        }
 -    }
 -
 -    /**
 -     * Checks that the specified statement result in a <code>SyntaxException</code> containing the specified message.
 -     *
 -     * @param stmt the statement to check
 -     */
 -    private static void assertInvalidSyntax(String stmt, String msg) throws Throwable {
 -        try {
 -            process(stmt, ConsistencyLevel.ONE);
 -            fail();
 -        } catch (RuntimeException e) {
 -            assertSyntaxException(e.getCause(), msg);
++            assertInvalidSyntaxMessage("no viable alternative at input 'WITH'", stmt);
+         }
+     }
 -
 -    /**
 -     * Asserts that the specified exception is a <code>SyntaxException</code> for which the error message contains
 -     * the specified text.
 -     *
 -     * @param exception the exception to test
 -     * @param expectedContent the expected content of the error message
 -     */
 -    private static void assertSyntaxException(Throwable exception, String expectedContent) {
 -        assertTrue("The exception should be a SyntaxException but is not", exception instanceof SyntaxException);
 -
 -        String msg = exception.getMessage();
 -        assertTrue(String.format("The error message was expected to contains: %s but was %s", expectedContent, msg),
 -                   msg.contains(expectedContent));
 -    }
+ }


[13/16] cassandra git commit: Merge branch 'cassandra-2.0' into cassandra-2.1

Posted by sn...@apache.org.
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/b969496e
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b969496e
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b969496e

Branch: refs/heads/cassandra-2.1
Commit: b969496e47be72d6f094f7c7db4ebac97104f924
Parents: efebd8f c939422
Author: Benjamin Lerer <bl...@datastax.com>
Authored: Mon Jun 22 16:42:43 2015 +0200
Committer: Robert Stupp <sn...@snazy.de>
Committed: Mon Jun 22 16:42:43 2015 +0200

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 src/java/org/apache/cassandra/cql3/Cql.g        |  4 +--
 .../cql3/CreateAndAlterKeyspaceTest.java        | 37 ++++++++++++++++++++
 3 files changed, 40 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b969496e/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 9ae0969,6e3a147..28b145b
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,7 -1,9 +1,8 @@@
 -2.0.17
 +2.1.7
 + * Fix bug in cardinality check when compacting (CASSANDRA-9580)
 + * Fix memory leak in Ref due to ConcurrentLinkedQueue.remove() behaviour (CASSANDRA-9549)
 +Merged from 2.0
+  * 'WITH WITH' in alter keyspace statements causes NPE (CASSANDRA-9565)
 - * Display min timestamp in sstablemetadata viewer (CASSANDRA-6767)
 -
 -
 -2.0.16:
   * Expose some internals of SelectStatement for inspection (CASSANDRA-9532)
   * ArrivalWindow should use primitives (CASSANDRA-9496)
   * Periodically submit background compaction tasks (CASSANDRA-9592)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b969496e/src/java/org/apache/cassandra/cql3/Cql.g
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/cql3/Cql.g
index f9a07b3,8b382fa..db8ef25
--- a/src/java/org/apache/cassandra/cql3/Cql.g
+++ b/src/java/org/apache/cassandra/cql3/Cql.g
@@@ -1030,8 -891,8 +1030,8 @@@ properties[PropertyDefinitions props
      ;
  
  property[PropertyDefinitions props]
-     : k=ident '=' (simple=propertyValue { try { $props.addProperty(k.toString(), simple); } catch (SyntaxException e) { addRecognitionError(e.getMessage()); } }
-                   |   map=mapLiteral    { try { $props.addProperty(k.toString(), convertPropertyMap(map)); } catch (SyntaxException e) { addRecognitionError(e.getMessage()); } })
+     : k=ident '=' simple=propertyValue { try { $props.addProperty(k.toString(), simple); } catch (SyntaxException e) { addRecognitionError(e.getMessage()); } }
 -    | k=ident '=' map=map_literal { try { $props.addProperty(k.toString(), convertPropertyMap(map)); } catch (SyntaxException e) { addRecognitionError(e.getMessage()); } }
++    | k=ident '=' map=mapLiteral { try { $props.addProperty(k.toString(), convertPropertyMap(map)); } catch (SyntaxException e) { addRecognitionError(e.getMessage()); } }
      ;
  
  propertyValue returns [String str]

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b969496e/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
----------------------------------------------------------------------
diff --cc test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
index 0000000,45be0df..9e0ca21
mode 000000,100644..100644
--- a/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
+++ b/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
@@@ -1,0 -1,89 +1,37 @@@
+ /*
+  * Licensed to the Apache Software Foundation (ASF) under one
+  * or more contributor license agreements.  See the NOTICE file
+  * distributed with this work for additional information
+  * regarding copyright ownership.  The ASF licenses this file
+  * to you under the Apache License, Version 2.0 (the
+  * "License"); you may not use this file except in compliance
+  * with the License.  You may obtain a copy of the License at
+  *
+  *     http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+ package org.apache.cassandra.cql3;
+ 
 -import org.junit.AfterClass;
 -import org.junit.BeforeClass;
+ import org.junit.Test;
+ 
 -import org.apache.cassandra.SchemaLoader;
 -import org.apache.cassandra.db.ConsistencyLevel;
 -import org.apache.cassandra.exceptions.SyntaxException;
 -import org.apache.cassandra.gms.Gossiper;
 -
 -import static org.apache.cassandra.cql3.QueryProcessor.process;
 -import static org.junit.Assert.assertTrue;
 -import static org.junit.Assert.fail;
 -
 -public class CreateAndAlterKeyspaceTest
++public class CreateAndAlterKeyspaceTest extends CQLTester
+ {
 -    @BeforeClass
 -    public static void setUpClass() throws Throwable
 -    {
 -        SchemaLoader.loadSchema();
 -    }
 -
 -    @AfterClass
 -    public static void stopGossiper()
 -    {
 -        Gossiper.instance.stop();
 -    }
 -
+     @Test
+     // tests CASSANDRA-9565
+     public void testCreateAndAlterWithDoubleWith() throws Throwable
+     {
+         String[] stmts = new String[] {"ALTER KEYSPACE WITH WITH DURABLE_WRITES = true",
+                                        "ALTER KEYSPACE ks WITH WITH DURABLE_WRITES = true",
+                                        "CREATE KEYSPACE WITH WITH DURABLE_WRITES = true",
+                                        "CREATE KEYSPACE ks WITH WITH DURABLE_WRITES = true"};
+ 
+         for (String stmt : stmts) {
 -            assertInvalidSyntax(stmt, "no viable alternative at input 'WITH'");
 -        }
 -    }
 -
 -    /**
 -     * Checks that the specified statement result in a <code>SyntaxException</code> containing the specified message.
 -     *
 -     * @param stmt the statement to check
 -     */
 -    private static void assertInvalidSyntax(String stmt, String msg) throws Throwable {
 -        try {
 -            process(stmt, ConsistencyLevel.ONE);
 -            fail();
 -        } catch (RuntimeException e) {
 -            assertSyntaxException(e.getCause(), msg);
++            assertInvalidSyntaxMessage("no viable alternative at input 'WITH'", stmt);
+         }
+     }
 -
 -    /**
 -     * Asserts that the specified exception is a <code>SyntaxException</code> for which the error message contains
 -     * the specified text.
 -     *
 -     * @param exception the exception to test
 -     * @param expectedContent the expected content of the error message
 -     */
 -    private static void assertSyntaxException(Throwable exception, String expectedContent) {
 -        assertTrue("The exception should be a SyntaxException but is not", exception instanceof SyntaxException);
 -
 -        String msg = exception.getMessage();
 -        assertTrue(String.format("The error message was expected to contains: %s but was %s", expectedContent, msg),
 -                   msg.contains(expectedContent));
 -    }
+ }


[08/16] cassandra git commit: 'WITH WITH' in alter keyspace statements causes NPE

Posted by sn...@apache.org.
'WITH WITH' in alter keyspace statements causes NPE

patch by Benjamin Lerer; reviewed by Robert Stupp for CASSANDRA-9565


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

Branch: refs/heads/trunk
Commit: c939422637bdba13fa3b5849cc1e7eacf26d46d0
Parents: f778c1f
Author: Benjamin Lerer <bl...@datastax.com>
Authored: Mon Jun 22 16:40:36 2015 +0200
Committer: Robert Stupp <sn...@snazy.de>
Committed: Mon Jun 22 16:40:36 2015 +0200

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 src/java/org/apache/cassandra/cql3/Cql.g        |  4 +-
 .../cql3/CreateAndAlterKeyspaceTest.java        | 89 ++++++++++++++++++++
 3 files changed, 92 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c9394226/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index b5b2f32..6e3a147 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.17
+ * 'WITH WITH' in alter keyspace statements causes NPE (CASSANDRA-9565)
  * Display min timestamp in sstablemetadata viewer (CASSANDRA-6767)
 
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c9394226/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 d41434d..8b382fa 100644
--- a/src/java/org/apache/cassandra/cql3/Cql.g
+++ b/src/java/org/apache/cassandra/cql3/Cql.g
@@ -891,8 +891,8 @@ properties[PropertyDefinitions props]
     ;
 
 property[PropertyDefinitions props]
-    : k=ident '=' (simple=propertyValue { try { $props.addProperty(k.toString(), simple); } catch (SyntaxException e) { addRecognitionError(e.getMessage()); } }
-                   |   map=map_literal   { try { $props.addProperty(k.toString(), convertPropertyMap(map)); } catch (SyntaxException e) { addRecognitionError(e.getMessage()); } })
+    : k=ident '=' simple=propertyValue { try { $props.addProperty(k.toString(), simple); } catch (SyntaxException e) { addRecognitionError(e.getMessage()); } }
+    | k=ident '=' map=map_literal { try { $props.addProperty(k.toString(), convertPropertyMap(map)); } catch (SyntaxException e) { addRecognitionError(e.getMessage()); } }
     ;
 
 propertyValue returns [String str]

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c9394226/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java b/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
new file mode 100644
index 0000000..45be0df
--- /dev/null
+++ b/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cassandra.cql3;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import org.apache.cassandra.SchemaLoader;
+import org.apache.cassandra.db.ConsistencyLevel;
+import org.apache.cassandra.exceptions.SyntaxException;
+import org.apache.cassandra.gms.Gossiper;
+
+import static org.apache.cassandra.cql3.QueryProcessor.process;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+public class CreateAndAlterKeyspaceTest
+{
+    @BeforeClass
+    public static void setUpClass() throws Throwable
+    {
+        SchemaLoader.loadSchema();
+    }
+
+    @AfterClass
+    public static void stopGossiper()
+    {
+        Gossiper.instance.stop();
+    }
+
+    @Test
+    // tests CASSANDRA-9565
+    public void testCreateAndAlterWithDoubleWith() throws Throwable
+    {
+        String[] stmts = new String[] {"ALTER KEYSPACE WITH WITH DURABLE_WRITES = true",
+                                       "ALTER KEYSPACE ks WITH WITH DURABLE_WRITES = true",
+                                       "CREATE KEYSPACE WITH WITH DURABLE_WRITES = true",
+                                       "CREATE KEYSPACE ks WITH WITH DURABLE_WRITES = true"};
+
+        for (String stmt : stmts) {
+            assertInvalidSyntax(stmt, "no viable alternative at input 'WITH'");
+        }
+    }
+
+    /**
+     * Checks that the specified statement result in a <code>SyntaxException</code> containing the specified message.
+     *
+     * @param stmt the statement to check
+     */
+    private static void assertInvalidSyntax(String stmt, String msg) throws Throwable {
+        try {
+            process(stmt, ConsistencyLevel.ONE);
+            fail();
+        } catch (RuntimeException e) {
+            assertSyntaxException(e.getCause(), msg);
+        }
+    }
+
+    /**
+     * Asserts that the specified exception is a <code>SyntaxException</code> for which the error message contains
+     * the specified text.
+     *
+     * @param exception the exception to test
+     * @param expectedContent the expected content of the error message
+     */
+    private static void assertSyntaxException(Throwable exception, String expectedContent) {
+        assertTrue("The exception should be a SyntaxException but is not", exception instanceof SyntaxException);
+
+        String msg = exception.getMessage();
+        assertTrue(String.format("The error message was expected to contains: %s but was %s", expectedContent, msg),
+                   msg.contains(expectedContent));
+    }
+}


[07/16] cassandra git commit: 'WITH WITH' in alter keyspace statements causes NPE

Posted by sn...@apache.org.
'WITH WITH' in alter keyspace statements causes NPE

patch by Benjamin Lerer; reviewed by Robert Stupp for CASSANDRA-9565


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

Branch: refs/heads/cassandra-2.1
Commit: c939422637bdba13fa3b5849cc1e7eacf26d46d0
Parents: f778c1f
Author: Benjamin Lerer <bl...@datastax.com>
Authored: Mon Jun 22 16:40:36 2015 +0200
Committer: Robert Stupp <sn...@snazy.de>
Committed: Mon Jun 22 16:40:36 2015 +0200

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 src/java/org/apache/cassandra/cql3/Cql.g        |  4 +-
 .../cql3/CreateAndAlterKeyspaceTest.java        | 89 ++++++++++++++++++++
 3 files changed, 92 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c9394226/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index b5b2f32..6e3a147 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.17
+ * 'WITH WITH' in alter keyspace statements causes NPE (CASSANDRA-9565)
  * Display min timestamp in sstablemetadata viewer (CASSANDRA-6767)
 
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c9394226/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 d41434d..8b382fa 100644
--- a/src/java/org/apache/cassandra/cql3/Cql.g
+++ b/src/java/org/apache/cassandra/cql3/Cql.g
@@ -891,8 +891,8 @@ properties[PropertyDefinitions props]
     ;
 
 property[PropertyDefinitions props]
-    : k=ident '=' (simple=propertyValue { try { $props.addProperty(k.toString(), simple); } catch (SyntaxException e) { addRecognitionError(e.getMessage()); } }
-                   |   map=map_literal   { try { $props.addProperty(k.toString(), convertPropertyMap(map)); } catch (SyntaxException e) { addRecognitionError(e.getMessage()); } })
+    : k=ident '=' simple=propertyValue { try { $props.addProperty(k.toString(), simple); } catch (SyntaxException e) { addRecognitionError(e.getMessage()); } }
+    | k=ident '=' map=map_literal { try { $props.addProperty(k.toString(), convertPropertyMap(map)); } catch (SyntaxException e) { addRecognitionError(e.getMessage()); } }
     ;
 
 propertyValue returns [String str]

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c9394226/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java b/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
new file mode 100644
index 0000000..45be0df
--- /dev/null
+++ b/test/unit/org/apache/cassandra/cql3/CreateAndAlterKeyspaceTest.java
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cassandra.cql3;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import org.apache.cassandra.SchemaLoader;
+import org.apache.cassandra.db.ConsistencyLevel;
+import org.apache.cassandra.exceptions.SyntaxException;
+import org.apache.cassandra.gms.Gossiper;
+
+import static org.apache.cassandra.cql3.QueryProcessor.process;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+public class CreateAndAlterKeyspaceTest
+{
+    @BeforeClass
+    public static void setUpClass() throws Throwable
+    {
+        SchemaLoader.loadSchema();
+    }
+
+    @AfterClass
+    public static void stopGossiper()
+    {
+        Gossiper.instance.stop();
+    }
+
+    @Test
+    // tests CASSANDRA-9565
+    public void testCreateAndAlterWithDoubleWith() throws Throwable
+    {
+        String[] stmts = new String[] {"ALTER KEYSPACE WITH WITH DURABLE_WRITES = true",
+                                       "ALTER KEYSPACE ks WITH WITH DURABLE_WRITES = true",
+                                       "CREATE KEYSPACE WITH WITH DURABLE_WRITES = true",
+                                       "CREATE KEYSPACE ks WITH WITH DURABLE_WRITES = true"};
+
+        for (String stmt : stmts) {
+            assertInvalidSyntax(stmt, "no viable alternative at input 'WITH'");
+        }
+    }
+
+    /**
+     * Checks that the specified statement result in a <code>SyntaxException</code> containing the specified message.
+     *
+     * @param stmt the statement to check
+     */
+    private static void assertInvalidSyntax(String stmt, String msg) throws Throwable {
+        try {
+            process(stmt, ConsistencyLevel.ONE);
+            fail();
+        } catch (RuntimeException e) {
+            assertSyntaxException(e.getCause(), msg);
+        }
+    }
+
+    /**
+     * Asserts that the specified exception is a <code>SyntaxException</code> for which the error message contains
+     * the specified text.
+     *
+     * @param exception the exception to test
+     * @param expectedContent the expected content of the error message
+     */
+    private static void assertSyntaxException(Throwable exception, String expectedContent) {
+        assertTrue("The exception should be a SyntaxException but is not", exception instanceof SyntaxException);
+
+        String msg = exception.getMessage();
+        assertTrue(String.format("The error message was expected to contains: %s but was %s", expectedContent, msg),
+                   msg.contains(expectedContent));
+    }
+}


[04/16] cassandra git commit: Backport CASSANDRA-6767 to 2.0: Display min timestamp in sstablemetadata viewer

Posted by sn...@apache.org.
Backport CASSANDRA-6767 to 2.0: Display min timestamp in sstablemetadata viewer


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

Branch: refs/heads/cassandra-2.2
Commit: f778c1f88f4deb075b383f3a8b24ef279585bd32
Parents: 23e66a9
Author: Marcus Eriksson <ma...@apache.org>
Authored: Fri Jun 19 19:18:44 2015 +0200
Committer: Marcus Eriksson <ma...@apache.org>
Committed: Fri Jun 19 19:28:54 2015 +0200

----------------------------------------------------------------------
 CHANGES.txt                                                    | 4 ++++
 src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java | 1 +
 2 files changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f778c1f8/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index a235528..b5b2f32 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,7 @@
+2.0.17
+ * Display min timestamp in sstablemetadata viewer (CASSANDRA-6767)
+
+
 2.0.16:
  * Expose some internals of SelectStatement for inspection (CASSANDRA-9532)
  * ArrivalWindow should use primitives (CASSANDRA-9496)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f778c1f8/src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java b/src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java
index 64720b5..9664e9e 100644
--- a/src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java
+++ b/src/java/org/apache/cassandra/tools/SSTableMetadataViewer.java
@@ -51,6 +51,7 @@ public class SSTableMetadataViewer
 
                 out.printf("SSTable: %s%n", descriptor);
                 out.printf("Partitioner: %s%n", metadata.partitioner);
+                out.printf("Minimum timestamp: %s%n", metadata.minTimestamp);
                 out.printf("Maximum timestamp: %s%n", metadata.maxTimestamp);
                 out.printf("SSTable max local deletion time: %s%n", metadata.maxLocalDeletionTime);
                 out.printf("Compression ratio: %s%n", metadata.compressionRatio);