cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ble...@apache.org
Subject [2/2] cassandra git commit: Merge branch cassandra-3.0 into cassandra-3.11
Date Fri, 20 Jan 2017 15:03:02 GMT
Merge branch cassandra-3.0 into cassandra-3.11


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

Branch: refs/heads/cassandra-3.11
Commit: 1a56dd063d8d032c33427013ff0e990f4e5b4760
Parents: e3d26b6 f3b452c
Author: Benjamin Lerer <b.lerer@gmail.com>
Authored: Fri Jan 20 16:02:27 2017 +0100
Committer: Benjamin Lerer <b.lerer@gmail.com>
Committed: Fri Jan 20 16:02:27 2017 +0100

----------------------------------------------------------------------
 src/java/org/apache/cassandra/config/CFMetaData.java | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1a56dd06/src/java/org/apache/cassandra/config/CFMetaData.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/config/CFMetaData.java
index 1d3bb3a,44f3a96..d0932ed
--- a/src/java/org/apache/cassandra/config/CFMetaData.java
+++ b/src/java/org/apache/cassandra/config/CFMetaData.java
@@@ -297,22 -283,18 +297,20 @@@ public final class CFMetaDat
          this.clusteringColumns = clusteringColumns;
          this.partitionColumns = partitionColumns;
  
-         this.comparator = new ClusteringComparator(extractTypes(clusteringColumns));
-         List<AbstractType<?>> keyTypes = extractTypes(partitionKeyColumns);
-         this.keyValidator = keyTypes.size() == 1 ? keyTypes.get(0) : CompositeType.getInstance(keyTypes);
 -        this.serializers = new Serializers(this);
--
          rebuild();
 +
 +        this.resource = DataResource.table(ksName, cfName);
 +        this.serializers = new Serializers(this);
      }
  
      // This rebuild informations that are intrinsically duplicate of the table definition
but
      // are kept because they are often useful in a different format.
      private void rebuild()
      {
+         this.comparator = new ClusteringComparator(extractTypes(clusteringColumns));
+ 
 -        Map<ByteBuffer, ColumnDefinition> newColumnMetadata = new HashMap<>();
 +        Map<ByteBuffer, ColumnDefinition> newColumnMetadata = Maps.newHashMapWithExpectedSize(partitionKeyColumns.size()
+ clusteringColumns.size() + partitionColumns.size());
 +
          for (ColumnDefinition def : partitionKeyColumns)
              newColumnMetadata.put(def.name.bytes, def);
          for (ColumnDefinition def : clusteringColumns)
@@@ -322,10 -304,11 +320,13 @@@
  
          this.columnMetadata = newColumnMetadata;
  
+         List<AbstractType<?>> keyTypes = extractTypes(partitionKeyColumns);
+         this.keyValidator = keyTypes.size() == 1 ? keyTypes.get(0) : CompositeType.getInstance(keyTypes);
+ 
          if (isCompactTable())
              this.compactValueColumn = CompactTables.getCompactValueColumn(partitionColumns,
isSuper());
 +
 +        this.allColumnFilter = ColumnFilter.all(this);
      }
  
      public Indexes getIndexes()


Mime
View raw message