cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [16/16] cassandra git commit: Merge branch 'cassandra-3.X' into trunk
Date Mon, 16 Jan 2017 09:51:14 GMT
Merge branch 'cassandra-3.X' into trunk

* cassandra-3.X:
  Use timestamp from ClientState by default in AlterTableStatement
  Fix test interference in ColumnFamilyStoreTest


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

Branch: refs/heads/trunk
Commit: 7843d8cc23caa285e0c170e6816a517382f745a7
Parents: d6c7a2d 92cb311
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Mon Jan 16 10:50:17 2017 +0100
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Mon Jan 16 10:50:17 2017 +0100

----------------------------------------------------------------------
 .../cassandra/cql3/statements/AlterKeyspaceStatement.java    | 3 ++-
 .../cassandra/cql3/statements/AlterTableStatement.java       | 8 ++++----
 .../apache/cassandra/cql3/statements/AlterTypeStatement.java | 3 ++-
 .../apache/cassandra/cql3/statements/AlterViewStatement.java | 3 ++-
 .../cassandra/cql3/statements/CreateAggregateStatement.java  | 2 +-
 .../cassandra/cql3/statements/CreateFunctionStatement.java   | 2 +-
 .../cassandra/cql3/statements/CreateIndexStatement.java      | 3 ++-
 .../cassandra/cql3/statements/CreateKeyspaceStatement.java   | 2 +-
 .../cassandra/cql3/statements/CreateTableStatement.java      | 2 +-
 .../cassandra/cql3/statements/CreateTriggerStatement.java    | 3 ++-
 .../cassandra/cql3/statements/CreateTypeStatement.java       | 3 ++-
 .../cassandra/cql3/statements/CreateViewStatement.java       | 3 ++-
 .../cassandra/cql3/statements/DropAggregateStatement.java    | 3 ++-
 .../cassandra/cql3/statements/DropFunctionStatement.java     | 3 ++-
 .../apache/cassandra/cql3/statements/DropIndexStatement.java | 4 ++--
 .../cassandra/cql3/statements/DropKeyspaceStatement.java     | 3 ++-
 .../apache/cassandra/cql3/statements/DropTableStatement.java | 3 ++-
 .../cassandra/cql3/statements/DropTriggerStatement.java      | 3 ++-
 .../apache/cassandra/cql3/statements/DropTypeStatement.java  | 3 ++-
 .../apache/cassandra/cql3/statements/DropViewStatement.java  | 3 ++-
 .../cassandra/cql3/statements/SchemaAlteringStatement.java   | 6 +++---
 21 files changed, 41 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7843d8cc/src/java/org/apache/cassandra/cql3/statements/AlterTableStatement.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/cql3/statements/AlterTableStatement.java
index b0fe64d,5f3b2ff..ea6a9d4
--- a/src/java/org/apache/cassandra/cql3/statements/AlterTableStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/AlterTableStatement.java
@@@ -38,9 -38,11 +38,9 @@@ import org.apache.cassandra.schema.Inde
  import org.apache.cassandra.schema.TableParams;
  import org.apache.cassandra.service.ClientState;
  import org.apache.cassandra.service.MigrationManager;
+ import org.apache.cassandra.service.QueryState;
  import org.apache.cassandra.transport.Event;
- import org.apache.cassandra.utils.*;
  
 -import static org.apache.cassandra.thrift.ThriftValidation.validateColumnFamily;
 -
  public class AlterTableStatement extends SchemaAlteringStatement
  {
      public enum Type
@@@ -79,9 -81,9 +79,9 @@@
          // validated in announceMigration()
      }
  
-     public Event.SchemaChange announceMigration(boolean isLocalOnly) throws RequestValidationException
+     public Event.SchemaChange announceMigration(QueryState queryState, boolean isLocalOnly)
throws RequestValidationException
      {
 -        CFMetaData meta = validateColumnFamily(keyspace(), columnFamily());
 +        CFMetaData meta = Validation.validateColumnFamily(keyspace(), columnFamily());
          if (meta.isView())
              throw new InvalidRequestException("Cannot use ALTER TABLE on Materialized View");
  

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7843d8cc/src/java/org/apache/cassandra/cql3/statements/AlterViewStatement.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/cql3/statements/AlterViewStatement.java
index e507aed,ea87cfd..e73d9bf
--- a/src/java/org/apache/cassandra/cql3/statements/AlterViewStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/AlterViewStatement.java
@@@ -30,8 -29,11 +30,9 @@@ import org.apache.cassandra.exceptions.
  import org.apache.cassandra.schema.TableParams;
  import org.apache.cassandra.service.ClientState;
  import org.apache.cassandra.service.MigrationManager;
+ import org.apache.cassandra.service.QueryState;
  import org.apache.cassandra.transport.Event;
  
 -import static org.apache.cassandra.thrift.ThriftValidation.validateColumnFamily;
 -
  public class AlterViewStatement extends SchemaAlteringStatement
  {
      private final TableAttributes attrs;
@@@ -54,9 -56,9 +55,9 @@@
          // validated in announceMigration()
      }
  
-     public Event.SchemaChange announceMigration(boolean isLocalOnly) throws RequestValidationException
+     public Event.SchemaChange announceMigration(QueryState queryState, boolean isLocalOnly)
throws RequestValidationException
      {
 -        CFMetaData meta = validateColumnFamily(keyspace(), columnFamily());
 +        CFMetaData meta = Validation.validateColumnFamily(keyspace(), columnFamily());
          if (!meta.isView())
              throw new InvalidRequestException("Cannot use ALTER MATERIALIZED VIEW on Table");
  

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7843d8cc/src/java/org/apache/cassandra/cql3/statements/CreateAggregateStatement.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7843d8cc/src/java/org/apache/cassandra/cql3/statements/CreateFunctionStatement.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7843d8cc/src/java/org/apache/cassandra/cql3/statements/CreateIndexStatement.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/cql3/statements/CreateIndexStatement.java
index 2019577,7ee7d30..ecabd2f
--- a/src/java/org/apache/cassandra/cql3/statements/CreateIndexStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/CreateIndexStatement.java
@@@ -42,6 -41,8 +42,7 @@@ import org.apache.cassandra.schema.Inde
  import org.apache.cassandra.schema.Indexes;
  import org.apache.cassandra.service.ClientState;
  import org.apache.cassandra.service.MigrationManager;
+ import org.apache.cassandra.service.QueryState;
 -import org.apache.cassandra.thrift.ThriftValidation;
  import org.apache.cassandra.transport.Event;
  
  /** A <code>CREATE INDEX</code> statement parsed from a CQL query. */

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7843d8cc/src/java/org/apache/cassandra/cql3/statements/CreateKeyspaceStatement.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7843d8cc/src/java/org/apache/cassandra/cql3/statements/CreateTableStatement.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7843d8cc/src/java/org/apache/cassandra/cql3/statements/CreateTriggerStatement.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/cql3/statements/CreateTriggerStatement.java
index c43dd0e,5d29996..8f84e4a
--- a/src/java/org/apache/cassandra/cql3/statements/CreateTriggerStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/CreateTriggerStatement.java
@@@ -32,6 -31,8 +32,7 @@@ import org.apache.cassandra.schema.Trig
  import org.apache.cassandra.schema.Triggers;
  import org.apache.cassandra.service.ClientState;
  import org.apache.cassandra.service.MigrationManager;
+ import org.apache.cassandra.service.QueryState;
 -import org.apache.cassandra.thrift.ThriftValidation;
  import org.apache.cassandra.transport.Event;
  import org.apache.cassandra.triggers.TriggerExecutor;
  

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7843d8cc/src/java/org/apache/cassandra/cql3/statements/CreateViewStatement.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/cql3/statements/CreateViewStatement.java
index ad5e251,668f791..cf5be1e
--- a/src/java/org/apache/cassandra/cql3/statements/CreateViewStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/CreateViewStatement.java
@@@ -43,6 -43,8 +43,7 @@@ import org.apache.cassandra.exceptions.
  import org.apache.cassandra.schema.TableParams;
  import org.apache.cassandra.service.ClientState;
  import org.apache.cassandra.service.MigrationManager;
+ import org.apache.cassandra.service.QueryState;
 -import org.apache.cassandra.thrift.ThriftValidation;
  import org.apache.cassandra.transport.Event;
  
  public class CreateViewStatement extends SchemaAlteringStatement

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7843d8cc/src/java/org/apache/cassandra/cql3/statements/DropAggregateStatement.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/cql3/statements/DropAggregateStatement.java
index c770805,ae8ad8c..6f41af5
--- a/src/java/org/apache/cassandra/cql3/statements/DropAggregateStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/DropAggregateStatement.java
@@@ -32,6 -31,8 +32,7 @@@ import org.apache.cassandra.exceptions.
  import org.apache.cassandra.exceptions.UnauthorizedException;
  import org.apache.cassandra.service.ClientState;
  import org.apache.cassandra.service.MigrationManager;
+ import org.apache.cassandra.service.QueryState;
 -import org.apache.cassandra.thrift.ThriftValidation;
  import org.apache.cassandra.transport.Event;
  
  /**

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7843d8cc/src/java/org/apache/cassandra/cql3/statements/DropFunctionStatement.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/cql3/statements/DropFunctionStatement.java
index 6ab4189,138691e..e098d0a
--- a/src/java/org/apache/cassandra/cql3/statements/DropFunctionStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/DropFunctionStatement.java
@@@ -36,6 -35,8 +36,7 @@@ import org.apache.cassandra.exceptions.
  import org.apache.cassandra.schema.KeyspaceMetadata;
  import org.apache.cassandra.service.ClientState;
  import org.apache.cassandra.service.MigrationManager;
+ import org.apache.cassandra.service.QueryState;
 -import org.apache.cassandra.thrift.ThriftValidation;
  import org.apache.cassandra.transport.Event;
  
  /**

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7843d8cc/src/java/org/apache/cassandra/cql3/statements/DropKeyspaceStatement.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/cql3/statements/DropKeyspaceStatement.java
index 5119462,7144f39..6930891
--- a/src/java/org/apache/cassandra/cql3/statements/DropKeyspaceStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/DropKeyspaceStatement.java
@@@ -25,6 -24,8 +25,7 @@@ import org.apache.cassandra.exceptions.
  import org.apache.cassandra.exceptions.UnauthorizedException;
  import org.apache.cassandra.service.ClientState;
  import org.apache.cassandra.service.MigrationManager;
+ import org.apache.cassandra.service.QueryState;
 -import org.apache.cassandra.thrift.ThriftValidation;
  import org.apache.cassandra.transport.Event;
  
  public class DropKeyspaceStatement extends SchemaAlteringStatement

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7843d8cc/src/java/org/apache/cassandra/cql3/statements/DropTriggerStatement.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/cql3/statements/DropTriggerStatement.java
index 26a1c00,162c736..9342824
--- a/src/java/org/apache/cassandra/cql3/statements/DropTriggerStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/DropTriggerStatement.java
@@@ -31,6 -30,8 +31,7 @@@ import org.apache.cassandra.exceptions.
  import org.apache.cassandra.schema.Triggers;
  import org.apache.cassandra.service.ClientState;
  import org.apache.cassandra.service.MigrationManager;
+ import org.apache.cassandra.service.QueryState;
 -import org.apache.cassandra.thrift.ThriftValidation;
  import org.apache.cassandra.transport.Event;
  
  public class DropTriggerStatement extends SchemaAlteringStatement
@@@ -55,10 -56,10 +56,10 @@@
  
      public void validate(ClientState state) throws RequestValidationException
      {
 -        ThriftValidation.validateColumnFamily(keyspace(), columnFamily());
 +        Validation.validateColumnFamily(keyspace(), columnFamily());
      }
  
-     public Event.SchemaChange announceMigration(boolean isLocalOnly) throws ConfigurationException,
InvalidRequestException
+     public Event.SchemaChange announceMigration(QueryState queryState, boolean isLocalOnly)
throws ConfigurationException, InvalidRequestException
      {
          CFMetaData cfm = Schema.instance.getCFMetaData(keyspace(), columnFamily()).copy();
          Triggers triggers = cfm.getTriggers();


Mime
View raw message