mirror of https://github.com/apache/cassandra
disallow specifying ColumnSort on supercolumns. patch by jbellis; reviewed by Evan Weaver for CASSANDRA-251
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@791598 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b54de30a02
commit
e324ef9051
|
|
@ -30,6 +30,11 @@
|
||||||
(ColumnFamilies are closer in meaning to those.)
|
(ColumnFamilies are closer in meaning to those.)
|
||||||
|
|
||||||
There is an implicit table named 'system' for Cassandra internals.
|
There is an implicit table named 'system' for Cassandra internals.
|
||||||
|
|
||||||
|
The default ColumnSort is Time for standard column families.
|
||||||
|
For super column families, specifying ColumnSort is not supported;
|
||||||
|
the supercolumns themselves are always name-sorted and their subcolumns
|
||||||
|
are always time-sorted.
|
||||||
-->
|
-->
|
||||||
<Tables>
|
<Tables>
|
||||||
<Table Name="Table1">
|
<Table Name="Table1">
|
||||||
|
|
@ -51,7 +56,7 @@
|
||||||
<ColumnFamily ColumnSort="Name" Name="Standard1" FlushPeriodInMinutes="60"/>
|
<ColumnFamily ColumnSort="Name" Name="Standard1" FlushPeriodInMinutes="60"/>
|
||||||
<ColumnFamily ColumnSort="Name" Name="Standard2"/>
|
<ColumnFamily ColumnSort="Name" Name="Standard2"/>
|
||||||
<ColumnFamily ColumnSort="Time" Name="StandardByTime1"/>
|
<ColumnFamily ColumnSort="Time" Name="StandardByTime1"/>
|
||||||
<ColumnFamily ColumnType="Super" ColumnSort="Name" Name="Super1"/>
|
<ColumnFamily ColumnType="Super" Name="Super1"/>
|
||||||
</Table>
|
</Table>
|
||||||
</Tables>
|
</Tables>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -350,9 +350,13 @@ public class DatabaseDescriptor
|
||||||
{
|
{
|
||||||
throw new ConfigurationException("invalid column sort value " + rawColumnIndexType);
|
throw new ConfigurationException("invalid column sort value " + rawColumnIndexType);
|
||||||
}
|
}
|
||||||
if ("Super".equals(columnType) && !"Name".equals(columnIndexType))
|
if ("Super".equals(columnType))
|
||||||
{
|
{
|
||||||
throw new ConfigurationException("Super columnfamilies may only be name-sorted");
|
if (rawColumnIndexType != null)
|
||||||
|
{
|
||||||
|
throw new ConfigurationException("Super columnfamilies are always name-sorted, and their subcolumns are always time-sorted. You may not specify the ColumnSort attribute on a SuperColumn.");
|
||||||
|
}
|
||||||
|
columnIndexType = "Name";
|
||||||
}
|
}
|
||||||
|
|
||||||
// see if flush period is set
|
// see if flush period is set
|
||||||
|
|
|
||||||
|
|
@ -45,8 +45,8 @@
|
||||||
<ColumnFamily ColumnSort="Name" Name="Standard2"/>
|
<ColumnFamily ColumnSort="Name" Name="Standard2"/>
|
||||||
<ColumnFamily ColumnSort="Time" Name="StandardByTime1"/>
|
<ColumnFamily ColumnSort="Time" Name="StandardByTime1"/>
|
||||||
<ColumnFamily ColumnSort="Time" Name="StandardByTime2"/>
|
<ColumnFamily ColumnSort="Time" Name="StandardByTime2"/>
|
||||||
<ColumnFamily ColumnType="Super" ColumnSort="Name" Name="Super1"/>
|
<ColumnFamily ColumnType="Super" Name="Super1"/>
|
||||||
<ColumnFamily ColumnType="Super" ColumnSort="Name" Name="Super2"/>
|
<ColumnFamily ColumnType="Super" Name="Super2"/>
|
||||||
</Table>
|
</Table>
|
||||||
<Table Name = "Table2">
|
<Table Name = "Table2">
|
||||||
<ColumnFamily ColumnSort="Name" Name="Standard1"/>
|
<ColumnFamily ColumnSort="Name" Name="Standard1"/>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue