cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [2/3] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1.0
Date Mon, 18 Aug 2014 10:24:20 GMT
Merge branch 'cassandra-2.0' into cassandra-2.1.0

Conflicts:
	CHANGES.txt
	src/java/org/apache/cassandra/config/CFMetaData.java
	src/java/org/apache/cassandra/cql3/statements/CreateTableStatement.java


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

Branch: refs/heads/cassandra-2.1
Commit: 1f5401066cc1fca3a56ca79a1b5fba74581c4a64
Parents: e850785 c44526b
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Mon Aug 18 12:23:56 2014 +0200
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Mon Aug 18 12:23:56 2014 +0200

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../org/apache/cassandra/config/CFMetaData.java | 42 ++++++++++++++------
 .../cql3/statements/CreateTableStatement.java   |  9 ++++-
 3 files changed, 39 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1f540106/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 78ef5df,6b610d7..f1edef4
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,31 -1,14 +1,32 @@@
 -2.0.10
 +2.1.0
 +Merged from 2.0:
+  * Fix dropping collection when it's the last regular column (CASSANDRA-7744)
   * Properly reject operations on list index with conditions (CASSANDRA-7499)
   * (Hadoop) allow ACFRW to limit nodes to local DC (CASSANDRA-7252)
 +
 +
 +2.1.0-rc6
 + * Fix OOM issue from netty caching over time (CASSANDRA-7743)
 + * json2sstable couldn't import JSON for CQL table (CASSANDRA-7477)
 + * Invalidate all caches on table drop (CASSANDRA-7561)
 + * Skip strict endpoint selection for ranges if RF == nodes (CASSANRA-7765)
 + * Fix Thrift range filtering without 2ary index lookups (CASSANDRA-7741)
 + * Add tracing entries about concurrent range requests (CASSANDRA-7599)
 + * (cqlsh) Fix DESCRIBE for NTS keyspaces (CASSANDRA-7729)
 + * Remove netty buffer ref-counting (CASSANDRA-7735)
 + * Pass mutated cf to index updater for use by PRSI (CASSANDRA-7742)
 + * Include stress yaml example in release and deb (CASSANDRA-7717)
 + * workaround for netty issue causing corrupted data off the wire (CASSANDRA-7695)
 + * cqlsh DESC CLUSTER fails retrieving ring information (CASSANDRA-7687)
 + * Fix binding null values inside UDT (CASSANDRA-7685)
 + * Fix UDT field selection with empty fields (CASSANDRA-7670)
 + * Bogus deserialization of static cells from sstable (CASSANDRA-7684)
 + * Fix NPE on compaction leftover cleanup for dropped table (CASSANDRA-7770)
 +Merged from 2.0:
   * (cqlsh) Wait up to 10 sec for a tracing session (CASSANDRA-7222)
   * Fix NPE in FileCacheService.sizeInBytes (CASSANDRA-7756)
 - * (cqlsh) cqlsh should automatically disable tracing when selecting
 -   from system_traces (CASSANDRA-7641)
 - * (Hadoop) Add CqlOutputFormat (CASSANDRA-6927)
 - * Don't depend on cassandra config for nodetool ring (CASSANDRA-7508)
 - * (cqlsh) Fix failing cqlsh formatting tests (CASSANDRA-7703)
 + * Remove duplicates from StorageService.getJoiningNodes (CASSANDRA-7478)
 + * Clone token map outside of hot gossip loops (CASSANDRA-7758)
   * Fix MS expiring map timeout for Paxos messages (CASSANDRA-7752)
   * Do not flush on truncate if durable_writes is false (CASSANDRA-7750)
   * Give CRR a default input_cql Statement (CASSANDRA-7226)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/1f540106/src/java/org/apache/cassandra/config/CFMetaData.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/config/CFMetaData.java
index 83c1267,296ecce..fa5bda4
--- a/src/java/org/apache/cassandra/config/CFMetaData.java
+++ b/src/java/org/apache/cassandra/config/CFMetaData.java
@@@ -154,8 -113,8 +154,9 @@@ public final class CFMetaDat
      public static final CFMetaData SchemaColumnFamiliesCf = compile("CREATE TABLE " + SystemKeyspace.SCHEMA_COLUMNFAMILIES_CF
+ " ("
                                                                      + "keyspace_name text,"
                                                                      + "columnfamily_name
text,"
 +                                                                    + "cf_id uuid," // post-2.1
UUID cfid
                                                                      + "type text,"
+                                                                     + "is_dense boolean,"
                                                                      + "comparator text,"
                                                                      + "subcomparator text,"
                                                                      + "comment text,"
@@@ -445,11 -407,16 +446,16 @@@
      public static final String DEFAULT_COLUMN_ALIAS = "column";
      public static final String DEFAULT_VALUE_ALIAS = "value";
  
+     // We call dense a CF for which each component of the comparator is a clustering column,
i.e. no
+     // component is used to store a regular column names. In other words, non-composite
static "thrift"
+     // and CQL3 CF are *not* dense.
+     private volatile Boolean isDense; // null means "we don't know and need to infer from
other data"
+ 
 -    private volatile Map<ByteBuffer, ColumnDefinition> column_metadata = new HashMap<>();
 +    private volatile Map<ByteBuffer, ColumnDefinition> columnMetadata = new HashMap<>();
      private volatile List<ColumnDefinition> partitionKeyColumns;  // Always of size
keyValidator.componentsCount, null padded if necessary
 -    private volatile List<ColumnDefinition> clusteringKeyColumns; // Of size comparator.componentsCount
or comparator.componentsCount -1, null padded if necessary
 -    private volatile Set<ColumnDefinition> regularColumns;
 -    private volatile Set<ColumnDefinition> staticColumns;
 +    private volatile List<ColumnDefinition> clusteringColumns;    // Of size comparator.componentsCount
or comparator.componentsCount -1, null padded if necessary
 +    private volatile SortedSet<ColumnDefinition> regularColumns;  // We use a sorted
set so iteration is of predictable order (for SELECT for instance)
 +    private volatile SortedSet<ColumnDefinition> staticColumns;   // Same as above
      private volatile ColumnDefinition compactValueColumn;
  
      public volatile Class<? extends AbstractCompactionStrategy> compactionStrategyClass
= DEFAULT_COMPACTION_STRATEGY_CLASS;
@@@ -476,25 -448,27 +482,26 @@@
      public CFMetaData memtableFlushPeriod(int prop) {memtableFlushPeriod = prop; return
this;}
      public CFMetaData defaultTimeToLive(int prop) {defaultTimeToLive = prop; return this;}
      public CFMetaData speculativeRetry(SpeculativeRetry prop) {speculativeRetry = prop;
return this;}
 -    public CFMetaData populateIoCacheOnFlush(boolean prop) {populateIoCacheOnFlush = prop;
return this;}
 -    public CFMetaData droppedColumns(Map<ByteBuffer, Long> cols) {droppedColumns =
cols; return this;}
 +    public CFMetaData droppedColumns(Map<ColumnIdentifier, Long> cols) {droppedColumns
= cols; return this;}
      public CFMetaData triggers(Map<String, TriggerDefinition> prop) {triggers = prop;
return this;}
+     public CFMetaData setDense(Boolean prop) {isDense = prop; return this;}
  
 -    public CFMetaData(String keyspace, String name, ColumnFamilyType type, AbstractType<?>
comp, AbstractType<?> subcc)
 -    {
 -        this(keyspace, name, type, makeComparator(type, comp, subcc));
 -    }
 -
 -    public CFMetaData(String keyspace, String name, ColumnFamilyType type, AbstractType<?>
comp)
 +    /**
 +     * Create new ColumnFamily metadata with generated random ID.
 +     * When loading from existing schema, use CFMetaData
 +     *
 +     * @param keyspace keyspace name
 +     * @param name column family name
 +     * @param comp default comparator
 +     */
 +    public CFMetaData(String keyspace, String name, ColumnFamilyType type, CellNameType
comp)
      {
 -        this(keyspace, name, type, comp, getId(keyspace, name));
 +        this(keyspace, name, type, comp, UUIDGen.getTimeUUID());
      }
  
 -    @VisibleForTesting
 -    CFMetaData(String keyspace, String name, ColumnFamilyType type, AbstractType<?>
comp,  UUID id)
 +    private CFMetaData(String keyspace, String name, ColumnFamilyType type, CellNameType
comp, UUID id)
      {
 -        // (subcc may be null for non-supercolumns)
 -        // (comp may also be null for custom indexes, which is kind of broken if you ask
me)
 -
 +        cfId = id;
          ksName = keyspace;
          cfName = name;
          cfType = type;
@@@ -649,12 -598,13 +656,13 @@@
                        .bloomFilterFpChance(oldCFMD.bloomFilterFpChance)
                        .caching(oldCFMD.caching)
                        .defaultTimeToLive(oldCFMD.defaultTimeToLive)
 -                      .indexInterval(oldCFMD.indexInterval)
 +                      .minIndexInterval(oldCFMD.minIndexInterval)
 +                      .maxIndexInterval(oldCFMD.maxIndexInterval)
                        .speculativeRetry(oldCFMD.speculativeRetry)
                        .memtableFlushPeriod(oldCFMD.memtableFlushPeriod)
 -                      .populateIoCacheOnFlush(oldCFMD.populateIoCacheOnFlush)
                        .droppedColumns(new HashMap<>(oldCFMD.droppedColumns))
                        .triggers(new HashMap<>(oldCFMD.triggers))
+                       .setDense(oldCFMD.isDense)
                        .rebuild();
      }
  
@@@ -871,46 -785,50 +879,47 @@@
          return droppedColumns;
      }
  
 -    public boolean equals(Object obj)
 +    @Override
 +    public boolean equals(Object o)
      {
 -        if (obj == this)
 -        {
 +        if (this == o)
              return true;
 -        }
 -        else if (obj == null || obj.getClass() != getClass())
 -        {
 +
 +        if (!(o instanceof CFMetaData))
              return false;
 -        }
  
 -        CFMetaData rhs = (CFMetaData) obj;
 -        return new EqualsBuilder()
 -            .append(ksName, rhs.ksName)
 -            .append(cfName, rhs.cfName)
 -            .append(cfType, rhs.cfType)
 -            .append(comparator, rhs.comparator)
 -            .append(comment, rhs.comment)
 -            .append(readRepairChance, rhs.readRepairChance)
 -            .append(dcLocalReadRepairChance, rhs.dcLocalReadRepairChance)
 -            .append(replicateOnWrite, rhs.replicateOnWrite)
 -            .append(gcGraceSeconds, rhs.gcGraceSeconds)
 -            .append(defaultValidator, rhs.defaultValidator)
 -            .append(keyValidator, rhs.keyValidator)
 -            .append(minCompactionThreshold, rhs.minCompactionThreshold)
 -            .append(maxCompactionThreshold, rhs.maxCompactionThreshold)
 -            .append(cfId, rhs.cfId)
 -            .append(column_metadata, rhs.column_metadata)
 -            .append(compactionStrategyClass, rhs.compactionStrategyClass)
 -            .append(compactionStrategyOptions, rhs.compactionStrategyOptions)
 -            .append(compressionParameters, rhs.compressionParameters)
 -            .append(bloomFilterFpChance, rhs.bloomFilterFpChance)
 -            .append(memtableFlushPeriod, rhs.memtableFlushPeriod)
 -            .append(caching, rhs.caching)
 -            .append(defaultTimeToLive, rhs.defaultTimeToLive)
 -            .append(indexInterval, rhs.indexInterval)
 -            .append(speculativeRetry, rhs.speculativeRetry)
 -            .append(populateIoCacheOnFlush, rhs.populateIoCacheOnFlush)
 -            .append(droppedColumns, rhs.droppedColumns)
 -            .append(triggers, rhs.triggers)
 -            .append(isDense, rhs.isDense)
 -            .isEquals();
 +        CFMetaData other = (CFMetaData) o;
 +
 +        return Objects.equal(cfId, other.cfId)
 +            && Objects.equal(ksName, other.ksName)
 +            && Objects.equal(cfName, other.cfName)
 +            && Objects.equal(cfType, other.cfType)
 +            && Objects.equal(comparator, other.comparator)
 +            && Objects.equal(comment, other.comment)
 +            && Objects.equal(readRepairChance, other.readRepairChance)
 +            && Objects.equal(dcLocalReadRepairChance, other.dcLocalReadRepairChance)
 +            && Objects.equal(gcGraceSeconds, other.gcGraceSeconds)
 +            && Objects.equal(defaultValidator, other.defaultValidator)
 +            && Objects.equal(keyValidator, other.keyValidator)
 +            && Objects.equal(minCompactionThreshold, other.minCompactionThreshold)
 +            && Objects.equal(maxCompactionThreshold, other.maxCompactionThreshold)
 +            && Objects.equal(columnMetadata, other.columnMetadata)
 +            && Objects.equal(compactionStrategyClass, other.compactionStrategyClass)
 +            && Objects.equal(compactionStrategyOptions, other.compactionStrategyOptions)
 +            && Objects.equal(compressionParameters, other.compressionParameters)
 +            && Objects.equal(bloomFilterFpChance, other.bloomFilterFpChance)
 +            && Objects.equal(memtableFlushPeriod, other.memtableFlushPeriod)
 +            && Objects.equal(caching, other.caching)
 +            && Objects.equal(defaultTimeToLive, other.defaultTimeToLive)
 +            && Objects.equal(minIndexInterval, other.minIndexInterval)
 +            && Objects.equal(maxIndexInterval, other.maxIndexInterval)
 +            && Objects.equal(speculativeRetry, other.speculativeRetry)
 +            && Objects.equal(droppedColumns, other.droppedColumns)
-             && Objects.equal(triggers, other.triggers);
++            && Objects.equal(triggers, other.triggers)
++            && Objects.equal(isDense, other.isDense);
      }
  
 +    @Override
      public int hashCode()
      {
          return new HashCodeBuilder(29, 1597)
@@@ -1685,37 -1623,42 +1696,39 @@@
          }
          else
          {
 -            cf.addColumn(Column.create(comparator.toString(), timestamp, cfName, "comparator"));
 +            adder.add("comparator", comparator.toString());
          }
  
 -        cf.addColumn(comment == null ? DeletedColumn.create(ldt, timestamp, cfName, "comment")
 -                                     : Column.create(comment, timestamp, cfName, "comment"));
 -        cf.addColumn(Column.create(readRepairChance, timestamp, cfName, "read_repair_chance"));
 -        cf.addColumn(Column.create(dcLocalReadRepairChance, timestamp, cfName, "local_read_repair_chance"));
 -        cf.addColumn(Column.create(replicateOnWrite, timestamp, cfName, "replicate_on_write"));
 -        cf.addColumn(Column.create(populateIoCacheOnFlush, timestamp, cfName, "populate_io_cache_on_flush"));
 -        cf.addColumn(Column.create(gcGraceSeconds, timestamp, cfName, "gc_grace_seconds"));
 -        cf.addColumn(Column.create(defaultValidator.toString(), timestamp, cfName, "default_validator"));
 -        cf.addColumn(Column.create(keyValidator.toString(), timestamp, cfName, "key_validator"));
 -        cf.addColumn(Column.create(minCompactionThreshold, timestamp, cfName, "min_compaction_threshold"));
 -        cf.addColumn(Column.create(maxCompactionThreshold, timestamp, cfName, "max_compaction_threshold"));
 -        cf.addColumn(bloomFilterFpChance == null ? DeletedColumn.create(ldt, timestamp,
cfName, "bloomFilterFpChance")
 -                                                 : Column.create(bloomFilterFpChance, timestamp,
cfName, "bloom_filter_fp_chance"));
 -        cf.addColumn(Column.create(memtableFlushPeriod, timestamp, cfName, "memtable_flush_period_in_ms"));
 -        cf.addColumn(Column.create(caching.toString(), timestamp, cfName, "caching"));
 -        cf.addColumn(Column.create(defaultTimeToLive, timestamp, cfName, "default_time_to_live"));
 -        cf.addColumn(Column.create(compactionStrategyClass.getName(), timestamp, cfName,
"compaction_strategy_class"));
 -        cf.addColumn(Column.create(json(compressionParameters.asThriftOptions()), timestamp,
cfName, "compression_parameters"));
 -        cf.addColumn(Column.create(json(compactionStrategyOptions), timestamp, cfName, "compaction_strategy_options"));
 -        cf.addColumn(Column.create(indexInterval, timestamp, cfName, "index_interval"));
 -        cf.addColumn(Column.create(speculativeRetry.toString(), timestamp, cfName, "speculative_retry"));
 -
 -        for (Map.Entry<ByteBuffer, Long> entry : droppedColumns.entrySet())
 -            cf.addColumn(new Column(makeDroppedColumnName(entry.getKey()), LongType.instance.decompose(entry.getValue()),
timestamp));
 -
 -        cf.addColumn(isDense == null ? DeletedColumn.create(ldt, timestamp, cfName, "is_dense")
 -                                     : Column.create(isDense, timestamp, cfName, "is_dense"));
 +        adder.add("comment", comment);
 +        adder.add("read_repair_chance", readRepairChance);
 +        adder.add("local_read_repair_chance", dcLocalReadRepairChance);
 +        adder.add("gc_grace_seconds", gcGraceSeconds);
 +        adder.add("default_validator", defaultValidator.toString());
 +        adder.add("key_validator", keyValidator.toString());
 +        adder.add("min_compaction_threshold", minCompactionThreshold);
 +        adder.add("max_compaction_threshold", maxCompactionThreshold);
 +        adder.add("bloom_filter_fp_chance", bloomFilterFpChance);
 +
 +        adder.add("memtable_flush_period_in_ms", memtableFlushPeriod);
 +        adder.add("caching", caching.toString());
 +        adder.add("default_time_to_live", defaultTimeToLive);
 +        adder.add("compaction_strategy_class", compactionStrategyClass.getName());
 +        adder.add("compression_parameters", json(compressionParameters.asThriftOptions()));
 +        adder.add("compaction_strategy_options", json(compactionStrategyOptions));
 +        adder.add("min_index_interval", minIndexInterval);
 +        adder.add("max_index_interval", maxIndexInterval);
 +        adder.add("index_interval", null);
 +        adder.add("speculative_retry", speculativeRetry.toString());
 +
 +        for (Map.Entry<ColumnIdentifier, Long> entry : droppedColumns.entrySet())
 +            adder.addMapEntry("dropped_columns", entry.getKey().toString(), entry.getValue());
 +
++        adder.add("is_dense", isDense);
+ 
          // Save the CQL3 metadata "the old way" for compatibility sake
 -        cf.addColumn(Column.create(aliasesToJson(partitionKeyColumns), timestamp, cfName,
"key_aliases"));
 -        cf.addColumn(Column.create(aliasesToJson(clusteringKeyColumns), timestamp, cfName,
"column_aliases"));
 -        cf.addColumn(compactValueColumn == null ? DeletedColumn.create(ldt, timestamp, cfName,
"value_alias")
 -                                                : Column.create(compactValueColumn.name,
timestamp, cfName, "value_alias"));
 +        adder.add("key_aliases", aliasesToJson(partitionKeyColumns));
 +        adder.add("column_aliases", aliasesToJson(clusteringColumns));
 +        adder.add("value_alias", compactValueColumn == null ? null : compactValueColumn.name.toString());
      }
  
      // Package protected for use by tests
@@@ -1723,29 -1666,11 +1736,34 @@@
      {
          try
          {
 -            CFMetaData cfm = new CFMetaData(result.getString("keyspace_name"),
 -                                            result.getString("columnfamily_name"),
 -                                            ColumnFamilyType.valueOf(result.getString("type")),
 -                                            TypeParser.parse(result.getString("comparator")),
 -                                            result.has("subcomparator") ? TypeParser.parse(result.getString("subcomparator"))
: null);
 +            String ksName = result.getString("keyspace_name");
 +            String cfName = result.getString("columnfamily_name");
 +
 +            AbstractType<?> rawComparator = TypeParser.parse(result.getString("comparator"));
 +            AbstractType<?> subComparator = result.has("subcomparator") ? TypeParser.parse(result.getString("subcomparator"))
: null;
 +            ColumnFamilyType cfType = ColumnFamilyType.valueOf(result.getString("type"));
 +
 +            AbstractType<?> fullRawComparator = makeRawAbstractType(rawComparator,
subComparator);
 +
 +            List<ColumnDefinition> columnDefs = ColumnDefinition.fromSchema(serializedColumnDefinitions,
 +                                                                            ksName,
 +                                                                            cfName,
 +                                                                            fullRawComparator,
 +                                                                            cfType == ColumnFamilyType.Super);
 +
-             CellNameType comparator = CellNames.fromAbstractType(fullRawComparator, isDense(fullRawComparator,
columnDefs));
++            boolean isDense = result.has("is_dense")
++                            ? result.getBoolean("is_dense")
++                            : isDense(fullRawComparator, columnDefs);
++
++            CellNameType comparator = CellNames.fromAbstractType(fullRawComparator, isDense);
 +
 +            // if we are upgrading, we use id generated from names initially
 +            UUID cfId = result.has("cf_id")
 +                      ? result.getUUID("cf_id")
 +                      : generateLegacyCfId(ksName, cfName);
 +
 +            CFMetaData cfm = new CFMetaData(ksName, cfName, cfType, comparator, cfId);
++            cfm.setDense(isDense);
  
              cfm.readRepairChance(result.getDouble("read_repair_chance"));
              cfm.dcLocalReadRepairChance(result.getDouble("local_read_repair_chance"));
@@@ -2035,11 -1998,10 +2053,11 @@@
  
          // Now actually assign the correct value. This is not atomic, but then again, updating
CFMetaData is never atomic anyway.
          partitionKeyColumns = addDefaultKeyAliases(pkCols);
 -        clusteringKeyColumns = addDefaultColumnAliases(ckCols);
 +        clusteringColumns = addDefaultColumnAliases(ckCols);
          regularColumns = regCols;
          staticColumns = statCols;
-         compactValueColumn = addDefaultValueAlias(compactCol, comparator.isDense());
+         compactValueColumn = addDefaultValueAlias(compactCol);
 +        return this;
      }
  
      private List<ColumnDefinition> addDefaultKeyAliases(List<ColumnDefinition>
pkCols)
@@@ -2093,9 -2050,9 +2111,9 @@@
          return ckCols;
      }
  
-     private ColumnDefinition addDefaultValueAlias(ColumnDefinition compactValueDef, boolean
isDense)
+     private ColumnDefinition addDefaultValueAlias(ColumnDefinition compactValueDef)
      {
--        if (isDense)
++        if (comparator.isDense())
          {
              if (compactValueDef != null)
                  return compactValueDef;
@@@ -2230,19 -2201,20 +2247,20 @@@
              .append("keyValidator", keyValidator)
              .append("minCompactionThreshold", minCompactionThreshold)
              .append("maxCompactionThreshold", maxCompactionThreshold)
 -            .append("column_metadata", column_metadata)
 +            .append("columnMetadata", columnMetadata)
              .append("compactionStrategyClass", compactionStrategyClass)
              .append("compactionStrategyOptions", compactionStrategyOptions)
 -            .append("compressionOptions", compressionParameters.asThriftOptions())
 +            .append("compressionParameters", compressionParameters.asThriftOptions())
              .append("bloomFilterFpChance", bloomFilterFpChance)
 -            .append("memtable_flush_period_in_ms", memtableFlushPeriod)
 +            .append("memtableFlushPeriod", memtableFlushPeriod)
              .append("caching", caching)
              .append("defaultTimeToLive", defaultTimeToLive)
 -            .append("speculative_retry", speculativeRetry)
 -            .append("indexInterval", indexInterval)
 -            .append("populateIoCacheOnFlush", populateIoCacheOnFlush)
 +            .append("minIndexInterval", minIndexInterval)
 +            .append("maxIndexInterval", maxIndexInterval)
 +            .append("speculativeRetry", speculativeRetry)
              .append("droppedColumns", droppedColumns)
              .append("triggers", triggers)
+             .append("isDense", isDense)
              .toString();
      }
  }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/1f540106/src/java/org/apache/cassandra/cql3/statements/CreateTableStatement.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/cql3/statements/CreateTableStatement.java
index 3a39e59,08ad069..47f05bb
--- a/src/java/org/apache/cassandra/cql3/statements/CreateTableStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/CreateTableStatement.java
@@@ -145,12 -155,13 +147,13 @@@ public class CreateTableStatement exten
      {
          cfmd.defaultValidator(defaultValidator)
              .keyValidator(keyValidator)
-             .addAllColumnDefinitions(getColumns(cfmd));
 -            .columnMetadata(getColumns())
++            .addAllColumnDefinitions(getColumns(cfmd))
+             .setDense(isDense);
  
 -        cfmd.addColumnMetadataFromAliases(keyAliases, keyValidator, ColumnDefinition.Type.PARTITION_KEY);
 -        cfmd.addColumnMetadataFromAliases(columnAliases, comparator, ColumnDefinition.Type.CLUSTERING_KEY);
 +        cfmd.addColumnMetadataFromAliases(keyAliases, keyValidator, ColumnDefinition.Kind.PARTITION_KEY);
 +        cfmd.addColumnMetadataFromAliases(columnAliases, comparator.asAbstractType(), ColumnDefinition.Kind.CLUSTERING_COLUMN);
          if (valueAlias != null)
 -            cfmd.addColumnMetadataFromAliases(Collections.<ByteBuffer>singletonList(valueAlias),
defaultValidator, ColumnDefinition.Type.COMPACT_VALUE);
 +            cfmd.addColumnMetadataFromAliases(Collections.<ByteBuffer>singletonList(valueAlias),
defaultValidator, ColumnDefinition.Kind.COMPACT_VALUE);
  
          properties.applyToCFMetadata(cfmd);
      }


Mime
View raw message