mirror of https://github.com/apache/cassandra
switch external naming of 'column families' to 'tables'
patch by dbrosius reviewed by jbellis for cassandra-7369
This commit is contained in:
parent
46c3896c62
commit
93c99a65e7
|
|
@ -7,6 +7,7 @@
|
|||
* Allow compilation in java 8 (CASSANDRA-7208)
|
||||
* Make incremental repair default (CASSANDRA-7250)
|
||||
* Enable code coverage thru JaCoCo (CASSANDRA-7226)
|
||||
* Switch external naming of 'column families' to 'tables' (CASSANDRA-4369)
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -16,4 +16,4 @@
|
|||
# under the License.
|
||||
|
||||
keyspace=Keyspace1
|
||||
columnfamily=InvertedIndex
|
||||
table=InvertedIndex
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ public class InvertedIndex implements ITrigger
|
|||
List<Mutation> mutations = new ArrayList<>(update.getColumnCount());
|
||||
|
||||
String indexKeySpace = properties.getProperty("keyspace");
|
||||
String indexColumnFamily = properties.getProperty("columnfamily");
|
||||
String indexColumnFamily = properties.getProperty("table");
|
||||
for (Cell cell : update)
|
||||
{
|
||||
// Skip the row marker and other empty values, since they lead to an empty key.
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ public class DataResource implements IResource
|
|||
public String getColumnFamily()
|
||||
{
|
||||
if (!isColumnFamilyLevel())
|
||||
throw new IllegalStateException(String.format("%s data resource has no column family", level));
|
||||
throw new IllegalStateException(String.format("%s data resource has no table", level));
|
||||
return columnFamily;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -325,7 +325,7 @@ public class Schema
|
|||
Pair<String, String> key = Pair.create(cfm.ksName, cfm.cfName);
|
||||
|
||||
if (cfIdMap.containsKey(key))
|
||||
throw new RuntimeException(String.format("Attempting to load already loaded column family %s.%s", cfm.ksName, cfm.cfName));
|
||||
throw new RuntimeException(String.format("Attempting to load already loaded table %s.%s", cfm.ksName, cfm.cfName));
|
||||
|
||||
logger.debug("Adding {} to cfIdMap", cfm);
|
||||
cfIdMap.put(key, cfm.cfId);
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ public class AlterTableStatement extends SchemaAlteringStatement
|
|||
break;
|
||||
case OPTS:
|
||||
if (cfProps == null)
|
||||
throw new InvalidRequestException(String.format("ALTER COLUMNFAMILY WITH invoked, but no parameters found"));
|
||||
throw new InvalidRequestException(String.format("ALTER TABLE WITH invoked, but no parameters found"));
|
||||
|
||||
cfProps.validate();
|
||||
cfProps.applyToCFMetadata(cfm);
|
||||
|
|
|
|||
|
|
@ -183,9 +183,9 @@ public class CreateTableStatement extends SchemaAlteringStatement
|
|||
{
|
||||
// Column family name
|
||||
if (!columnFamily().matches("\\w+"))
|
||||
throw new InvalidRequestException(String.format("\"%s\" is not a valid column family name (must be alphanumeric character only: [0-9A-Za-z]+)", columnFamily()));
|
||||
throw new InvalidRequestException(String.format("\"%s\" is not a valid table name (must be alphanumeric character only: [0-9A-Za-z]+)", columnFamily()));
|
||||
if (columnFamily().length() > Schema.NAME_LENGTH)
|
||||
throw new InvalidRequestException(String.format("Column family names shouldn't be more than %s characters long (got \"%s\")", Schema.NAME_LENGTH, columnFamily()));
|
||||
throw new InvalidRequestException(String.format("Table names shouldn't be more than %s characters long (got \"%s\")", Schema.NAME_LENGTH, columnFamily()));
|
||||
|
||||
for (Multiset.Entry<ColumnIdentifier> entry : definedNames.entrySet())
|
||||
if (entry.getCount() > 1)
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ public class ColumnFamilySerializer implements IVersionedSerializer<ColumnFamily
|
|||
columnSerializer.serialize(cell, out);
|
||||
written++;
|
||||
}
|
||||
assert count == written: "Column family had " + count + " columns, but " + written + " written";
|
||||
assert count == written: "Table had " + count + " columns, but " + written + " written";
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1499,7 +1499,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean
|
|||
private ColumnFamily getThroughCache(UUID cfId, QueryFilter filter)
|
||||
{
|
||||
assert isRowCacheEnabled()
|
||||
: String.format("Row cache is not enabled on column family [" + name + "]");
|
||||
: String.format("Row cache is not enabled on table [" + name + "]");
|
||||
|
||||
RowCacheKey key = new RowCacheKey(cfId, filter.key);
|
||||
|
||||
|
|
|
|||
|
|
@ -347,7 +347,7 @@ public enum ConsistencyLevel
|
|||
public void validateCounterForWrite(CFMetaData metadata) throws InvalidRequestException
|
||||
{
|
||||
if (this == ConsistencyLevel.ANY)
|
||||
throw new InvalidRequestException("Consistency level ANY is not yet supported for counter columnfamily " + metadata.cfName);
|
||||
throw new InvalidRequestException("Consistency level ANY is not yet supported for counter table " + metadata.cfName);
|
||||
|
||||
if (isSerialConsistency())
|
||||
throw new InvalidRequestException("Counter operations are inherently non-serializable");
|
||||
|
|
|
|||
|
|
@ -416,7 +416,7 @@ public class HintedHandOffManager implements HintedHandOffManagerMBean
|
|||
}
|
||||
catch (UnknownColumnFamilyException e)
|
||||
{
|
||||
logger.debug("Skipping delivery of hint for deleted columnfamily", e);
|
||||
logger.debug("Skipping delivery of hint for deleted table", e);
|
||||
deleteHint(hostIdBytes, hint.name(), hint.timestamp());
|
||||
continue;
|
||||
}
|
||||
|
|
@ -429,7 +429,7 @@ public class HintedHandOffManager implements HintedHandOffManagerMBean
|
|||
{
|
||||
if (hint.timestamp() <= SystemKeyspace.getTruncatedAt(cfId))
|
||||
{
|
||||
logger.debug("Skipping delivery of hint for truncated columnfamily {}", cfId);
|
||||
logger.debug("Skipping delivery of hint for truncated table {}", cfId);
|
||||
mutation = mutation.without(cfId);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ public class Keyspace
|
|||
}
|
||||
|
||||
if ((columnFamilyName != null) && !tookSnapShot)
|
||||
throw new IOException("Failed taking snapshot. Column family " + columnFamilyName + " does not exist.");
|
||||
throw new IOException("Failed taking snapshot. Table " + columnFamilyName + " does not exist.");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -379,7 +379,7 @@ public class Keyspace
|
|||
ColumnFamilyStore cfs = columnFamilyStores.get(cf.id());
|
||||
if (cfs == null)
|
||||
{
|
||||
logger.error("Attempting to mutate non-existant column family {}", cf.id());
|
||||
logger.error("Attempting to mutate non-existant table {}", cf.id());
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ public class Mutation implements IMutation
|
|||
ColumnFamily prev = modifications.put(columnFamily.id(), columnFamily);
|
||||
if (prev != null)
|
||||
// developer error
|
||||
throw new IllegalArgumentException("ColumnFamily " + columnFamily + " already has modifications in this mutation: " + prev);
|
||||
throw new IllegalArgumentException("Table " + columnFamily + " already has modifications in this mutation: " + prev);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@ public class CommitLog implements CommitLogMBean
|
|||
*/
|
||||
public void discardCompletedSegments(final UUID cfId, final ReplayPosition context)
|
||||
{
|
||||
logger.debug("discard completed log segments for {}, column family {}", context, cfId);
|
||||
logger.debug("discard completed log segments for {}, table {}", context, cfId);
|
||||
|
||||
// Go thru the active segment files, which are ordered oldest to newest, marking the
|
||||
// flushed CF as clean, until we reach the segment file containing the ReplayPosition passed
|
||||
|
|
|
|||
|
|
@ -437,7 +437,7 @@ public class CommitLogSegment
|
|||
// check for deleted CFS
|
||||
CFMetaData cfm = columnFamily.metadata();
|
||||
if (cfm.isPurged())
|
||||
logger.error("Attempted to write commit log entry for unrecognized column family: {}", columnFamily.id());
|
||||
logger.error("Attempted to write commit log entry for unrecognized table: {}", columnFamily.id());
|
||||
else
|
||||
ensureAtleast(cfDirty, cfm.cfId, allocatedPosition);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public class AlreadyExistsException extends ConfigurationException
|
|||
|
||||
public AlreadyExistsException(String ksName, String cfName)
|
||||
{
|
||||
this(ksName, cfName, String.format("Cannot add already existing column family \"%s\" to keyspace \"%s\"", cfName, ksName));
|
||||
this(ksName, cfName, String.format("Cannot add already existing table \"%s\" to keyspace \"%s\"", cfName, ksName));
|
||||
}
|
||||
|
||||
public AlreadyExistsException(String ksName)
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ public abstract class AbstractColumnFamilyInputFormat<K, Y> extends InputFormat<
|
|||
{
|
||||
if (ConfigHelper.getInputKeyspace(conf) == null || ConfigHelper.getInputColumnFamily(conf) == null)
|
||||
{
|
||||
throw new UnsupportedOperationException("you must set the keyspace and columnfamily with setInputColumnFamily()");
|
||||
throw new UnsupportedOperationException("you must set the keyspace and table with setInputColumnFamily()");
|
||||
}
|
||||
if (ConfigHelper.getInputInitialAddress(conf) == null)
|
||||
throw new UnsupportedOperationException("You must set the initial output address to a Cassandra node with setInputInitialAddress");
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ public class ConfigHelper
|
|||
throw new UnsupportedOperationException("keyspace may not be null");
|
||||
|
||||
if (columnFamily == null)
|
||||
throw new UnsupportedOperationException("columnfamily may not be null");
|
||||
throw new UnsupportedOperationException("table may not be null");
|
||||
|
||||
conf.set(INPUT_KEYSPACE_CONFIG, keyspace);
|
||||
conf.set(INPUT_COLUMNFAMILY_CONFIG, columnFamily);
|
||||
|
|
|
|||
|
|
@ -528,7 +528,7 @@ public abstract class AbstractCassandraStorage extends LoadFunc implements Store
|
|||
properties.setProperty(signature, sb.toString());
|
||||
}
|
||||
else
|
||||
throw new IOException(String.format("Column family '%s' not found in keyspace '%s'",
|
||||
throw new IOException(String.format("Table '%s' not found in keyspace '%s'",
|
||||
column_family,
|
||||
keyspace));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -810,7 +810,7 @@ public class CassandraStorage extends AbstractCassandraStorage
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new IOException("Expected 'cassandra://[username:password@]<keyspace>/<columnfamily>" +
|
||||
throw new IOException("Expected 'cassandra://[username:password@]<keyspace>/<table>" +
|
||||
"[?slice_start=<start>&slice_end=<end>[&reversed=true][&limit=1]" +
|
||||
"[&allow_deletes=true][&widerows=true][&use_secondary=true]" +
|
||||
"[&comparator=<comparator>][&split_size=<size>][&partitioner=<partitioner>]" +
|
||||
|
|
|
|||
|
|
@ -671,7 +671,7 @@ public class CqlStorage extends AbstractCassandraStorage
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new IOException("Expected 'cql://[username:password@]<keyspace>/<columnfamily>" +
|
||||
throw new IOException("Expected 'cql://[username:password@]<keyspace>/<table>" +
|
||||
"[?[page_size=<size>][&columns=<col1,col2>][&output_query=<prepared_statement>]" +
|
||||
"[&where_clause=<clause>][&split_size=<size>][&partitioner=<partitioner>][&use_secondary=true|false]" +
|
||||
"[&init_address=<host>][&rpc_port=<port>]]': " + e.getMessage());
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ public abstract class AbstractSSTableSimpleWriter
|
|||
public void newSuperColumn(ByteBuffer name)
|
||||
{
|
||||
if (!columnFamily.metadata().isSuper())
|
||||
throw new IllegalStateException("Cannot add a super column to a standard column family");
|
||||
throw new IllegalStateException("Cannot add a super column to a standard table");
|
||||
|
||||
currentSuperColumn = name;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ public class SSTableLoader implements StreamEventHandler
|
|||
CFMetaData metadata = client.getCFMetaData(keyspace, desc.cfname);
|
||||
if (metadata == null)
|
||||
{
|
||||
outputHandler.output(String.format("Skipping file %s: column family %s.%s doesn't exist", name, keyspace, desc.cfname));
|
||||
outputHandler.output(String.format("Skipping file %s: table %s.%s doesn't exist", name, keyspace, desc.cfname));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -230,7 +230,7 @@ public class RepairSession extends WrappedRunnable implements IEndpointStateChan
|
|||
if (job.completedSynchronization())
|
||||
{
|
||||
RepairJob completedJob = syncingJobs.remove(job.desc.columnFamily);
|
||||
String remaining = syncingJobs.size() == 0 ? "" : String.format(" (%d remaining column family to sync for this session)", syncingJobs.size());
|
||||
String remaining = syncingJobs.size() == 0 ? "" : String.format(" (%d remaining table to sync for this session)", syncingJobs.size());
|
||||
if (completedJob != null && completedJob.isFailed())
|
||||
logger.warn(String.format("[repair #%s] %s sync failed%s", getId(), desc.columnFamily, remaining));
|
||||
else
|
||||
|
|
|
|||
|
|
@ -241,11 +241,11 @@ public class MigrationManager
|
|||
|
||||
KSMetaData ksm = Schema.instance.getKSMetaData(cfm.ksName);
|
||||
if (ksm == null)
|
||||
throw new ConfigurationException(String.format("Cannot add column family '%s' to non existing keyspace '%s'.", cfm.cfName, cfm.ksName));
|
||||
throw new ConfigurationException(String.format("Cannot add table '%s' to non existing keyspace '%s'.", cfm.cfName, cfm.ksName));
|
||||
else if (ksm.cfMetaData().containsKey(cfm.cfName))
|
||||
throw new AlreadyExistsException(cfm.ksName, cfm.cfName);
|
||||
|
||||
logger.info(String.format("Create new ColumnFamily: %s", cfm));
|
||||
logger.info(String.format("Create new table: %s", cfm));
|
||||
announce(addSerializedKeyspace(cfm.toSchema(FBUtilities.timestampMicros()), cfm.ksName), announceLocally);
|
||||
}
|
||||
|
||||
|
|
@ -287,11 +287,11 @@ public class MigrationManager
|
|||
|
||||
CFMetaData oldCfm = Schema.instance.getCFMetaData(cfm.ksName, cfm.cfName);
|
||||
if (oldCfm == null)
|
||||
throw new ConfigurationException(String.format("Cannot update non existing column family '%s' in keyspace '%s'.", cfm.cfName, cfm.ksName));
|
||||
throw new ConfigurationException(String.format("Cannot update non existing table '%s' in keyspace '%s'.", cfm.cfName, cfm.ksName));
|
||||
|
||||
oldCfm.validateCompatility(cfm);
|
||||
|
||||
logger.info(String.format("Update ColumnFamily '%s/%s' From %s To %s", cfm.ksName, cfm.cfName, oldCfm, cfm));
|
||||
logger.info(String.format("Update table '%s/%s' From %s To %s", cfm.ksName, cfm.cfName, oldCfm, cfm));
|
||||
announce(addSerializedKeyspace(oldCfm.toSchemaUpdate(cfm, FBUtilities.timestampMicros(), fromThrift), cfm.ksName), announceLocally);
|
||||
}
|
||||
|
||||
|
|
@ -329,9 +329,9 @@ public class MigrationManager
|
|||
{
|
||||
CFMetaData oldCfm = Schema.instance.getCFMetaData(ksName, cfName);
|
||||
if (oldCfm == null)
|
||||
throw new ConfigurationException(String.format("Cannot drop non existing column family '%s' in keyspace '%s'.", cfName, ksName));
|
||||
throw new ConfigurationException(String.format("Cannot drop non existing table '%s' in keyspace '%s'.", cfName, ksName));
|
||||
|
||||
logger.info(String.format("Drop ColumnFamily '%s/%s'", oldCfm.ksName, oldCfm.cfName));
|
||||
logger.info(String.format("Drop table '%s/%s'", oldCfm.ksName, oldCfm.cfName));
|
||||
announce(addSerializedKeyspace(oldCfm.dropFromSchema(FBUtilities.timestampMicros()), ksName), announceLocally);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2350,9 +2350,9 @@ public class StorageService extends NotificationBroadcasterSupport implements IE
|
|||
throw new IOException("Cannot snapshot until bootstrap completes");
|
||||
|
||||
if (columnFamilyName == null)
|
||||
throw new IOException("You must supply a column family name");
|
||||
throw new IOException("You must supply a table name");
|
||||
if (columnFamilyName.contains("."))
|
||||
throw new IllegalArgumentException("Cannot take a snapshot of a secondary index by itself. Run snapshot on the column family that owns the index.");
|
||||
throw new IllegalArgumentException("Cannot take a snapshot of a secondary index by itself. Run snapshot on the table that owns the index.");
|
||||
|
||||
if (tag == null || tag.equals(""))
|
||||
throw new IOException("You must supply a snapshot name.");
|
||||
|
|
@ -2486,7 +2486,7 @@ public class StorageService extends NotificationBroadcasterSupport implements IE
|
|||
{
|
||||
if(!allowIndexes)
|
||||
{
|
||||
logger.warn("Operation not allowed on secondary Index column family ({})", cfName);
|
||||
logger.warn("Operation not allowed on secondary Index table ({})", cfName);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -2500,7 +2500,7 @@ public class StorageService extends NotificationBroadcasterSupport implements IE
|
|||
{
|
||||
Collection< SecondaryIndex > indexes = cfStore.indexManager.getIndexesByNames(new HashSet<>(Arrays.asList(cfName)));
|
||||
if (indexes.isEmpty())
|
||||
logger.warn(String.format("Invalid column family index specified: %s/%s. Proceeding with others.", baseCfName, idxName));
|
||||
logger.warn(String.format("Invalid index specified: %s/%s. Proceeding with others.", baseCfName, idxName));
|
||||
else
|
||||
valid.add(Iterables.get(indexes, 0).getIndexCfs());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1636,7 +1636,7 @@ public class CassandraServer implements Cassandra.Iface
|
|||
state().hasKeyspaceAccess(ks_def.name, Permission.ALTER);
|
||||
ThriftValidation.validateKeyspace(ks_def.name);
|
||||
if (ks_def.getCf_defs() != null && ks_def.getCf_defs().size() > 0)
|
||||
throw new InvalidRequestException("Keyspace update must not contain any column family definitions.");
|
||||
throw new InvalidRequestException("Keyspace update must not contain any table definitions.");
|
||||
|
||||
MigrationManager.announceKeyspaceUpdate(KSMetaData.fromThrift(ks_def));
|
||||
return Schema.instance.getVersion().toString();
|
||||
|
|
@ -1661,7 +1661,7 @@ public class CassandraServer implements Cassandra.Iface
|
|||
CFMetaData oldCfm = Schema.instance.getCFMetaData(cf_def.keyspace, cf_def.name);
|
||||
|
||||
if (oldCfm == null)
|
||||
throw new InvalidRequestException("Could not find column family definition to modify.");
|
||||
throw new InvalidRequestException("Could not find table definition to modify.");
|
||||
|
||||
if (!oldCfm.isThriftCompatible())
|
||||
throw new InvalidRequestException("Cannot modify CQL3 table " + oldCfm.cfName + " as it may break the schema. You should use cqlsh to modify CQL3 tables instead.");
|
||||
|
|
|
|||
|
|
@ -93,12 +93,12 @@ public class ThriftValidation
|
|||
if (isCommutativeOp)
|
||||
{
|
||||
if (!metadata.isCounter())
|
||||
throw new org.apache.cassandra.exceptions.InvalidRequestException("invalid operation for non commutative columnfamily " + cfName);
|
||||
throw new org.apache.cassandra.exceptions.InvalidRequestException("invalid operation for non commutative table " + cfName);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (metadata.isCounter())
|
||||
throw new org.apache.cassandra.exceptions.InvalidRequestException("invalid operation for commutative columnfamily " + cfName);
|
||||
throw new org.apache.cassandra.exceptions.InvalidRequestException("invalid operation for commutative table " + cfName);
|
||||
}
|
||||
return metadata;
|
||||
}
|
||||
|
|
@ -108,11 +108,11 @@ public class ThriftValidation
|
|||
{
|
||||
validateKeyspace(keyspaceName);
|
||||
if (cfName.isEmpty())
|
||||
throw new org.apache.cassandra.exceptions.InvalidRequestException("non-empty columnfamily is required");
|
||||
throw new org.apache.cassandra.exceptions.InvalidRequestException("non-empty table is required");
|
||||
|
||||
CFMetaData metadata = Schema.instance.getCFMetaData(keyspaceName, cfName);
|
||||
if (metadata == null)
|
||||
throw new org.apache.cassandra.exceptions.InvalidRequestException("unconfigured columnfamily " + cfName);
|
||||
throw new org.apache.cassandra.exceptions.InvalidRequestException("unconfigured table " + cfName);
|
||||
|
||||
return metadata;
|
||||
}
|
||||
|
|
@ -154,7 +154,7 @@ public class ThriftValidation
|
|||
{
|
||||
if (column_parent.super_column != null)
|
||||
{
|
||||
throw new org.apache.cassandra.exceptions.InvalidRequestException("columnfamily alone is required for standard CF " + metadata.cfName);
|
||||
throw new org.apache.cassandra.exceptions.InvalidRequestException("table alone is required for standard CF " + metadata.cfName);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -207,7 +207,7 @@ public class ThriftValidation
|
|||
if (superColumnName.remaining() == 0)
|
||||
throw new org.apache.cassandra.exceptions.InvalidRequestException("supercolumn name must not be empty");
|
||||
if (metadata.cfType == ColumnFamilyType.Standard)
|
||||
throw new org.apache.cassandra.exceptions.InvalidRequestException("supercolumn specified to ColumnFamily " + metadata.cfName + " containing normal columns");
|
||||
throw new org.apache.cassandra.exceptions.InvalidRequestException("supercolumn specified to table " + metadata.cfName + " containing normal columns");
|
||||
}
|
||||
AbstractType<?> comparator = SuperColumns.getComparatorFor(metadata, superColumnName);
|
||||
boolean isCQL3Table = !metadata.isThriftCompatible();
|
||||
|
|
@ -311,7 +311,7 @@ public class ThriftValidation
|
|||
if (cosc.column != null)
|
||||
{
|
||||
if (isCommutative)
|
||||
throw new org.apache.cassandra.exceptions.InvalidRequestException("invalid operation for commutative columnfamily " + metadata.cfName);
|
||||
throw new org.apache.cassandra.exceptions.InvalidRequestException("invalid operation for commutative table " + metadata.cfName);
|
||||
|
||||
validateTtl(cosc.column);
|
||||
validateColumnPath(metadata, new ColumnPath(metadata.cfName).setSuper_column((ByteBuffer)null).setColumn(cosc.column.name));
|
||||
|
|
@ -321,7 +321,7 @@ public class ThriftValidation
|
|||
if (cosc.super_column != null)
|
||||
{
|
||||
if (isCommutative)
|
||||
throw new org.apache.cassandra.exceptions.InvalidRequestException("invalid operation for commutative columnfamily " + metadata.cfName);
|
||||
throw new org.apache.cassandra.exceptions.InvalidRequestException("invalid operation for commutative table " + metadata.cfName);
|
||||
|
||||
for (Column c : cosc.super_column.columns)
|
||||
{
|
||||
|
|
@ -333,7 +333,7 @@ public class ThriftValidation
|
|||
if (cosc.counter_column != null)
|
||||
{
|
||||
if (!isCommutative)
|
||||
throw new org.apache.cassandra.exceptions.InvalidRequestException("invalid operation for non commutative columnfamily " + metadata.cfName);
|
||||
throw new org.apache.cassandra.exceptions.InvalidRequestException("invalid operation for non commutative table " + metadata.cfName);
|
||||
|
||||
validateColumnPath(metadata, new ColumnPath(metadata.cfName).setSuper_column((ByteBuffer)null).setColumn(cosc.counter_column.name));
|
||||
}
|
||||
|
|
@ -341,7 +341,7 @@ public class ThriftValidation
|
|||
if (cosc.counter_super_column != null)
|
||||
{
|
||||
if (!isCommutative)
|
||||
throw new org.apache.cassandra.exceptions.InvalidRequestException("invalid operation for non commutative columnfamily " + metadata.cfName);
|
||||
throw new org.apache.cassandra.exceptions.InvalidRequestException("invalid operation for non commutative table " + metadata.cfName);
|
||||
|
||||
for (CounterColumn c : cosc.counter_super_column.columns)
|
||||
validateColumnPath(metadata, new ColumnPath(metadata.cfName).setSuper_column(cosc.counter_super_column.name).setColumn(c.name));
|
||||
|
|
@ -401,7 +401,7 @@ public class ThriftValidation
|
|||
|
||||
if (metadata.cfType == ColumnFamilyType.Standard && del.super_column != null)
|
||||
{
|
||||
String msg = String.format("Deletion of super columns is not possible on a standard ColumnFamily (KeySpace=%s ColumnFamily=%s Deletion=%s)", metadata.ksName, metadata.cfName, del);
|
||||
String msg = String.format("Deletion of super columns is not possible on a standard table (KeySpace=%s Table=%s Deletion=%s)", metadata.ksName, metadata.cfName, del);
|
||||
throw new org.apache.cassandra.exceptions.InvalidRequestException(msg);
|
||||
}
|
||||
|
||||
|
|
@ -412,7 +412,7 @@ public class ThriftValidation
|
|||
}
|
||||
else if (!del.isSetTimestamp())
|
||||
{
|
||||
throw new org.apache.cassandra.exceptions.InvalidRequestException("Deletion timestamp is not optional for non commutative column family " + metadata.cfName);
|
||||
throw new org.apache.cassandra.exceptions.InvalidRequestException("Deletion timestamp is not optional for non commutative table " + metadata.cfName);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ public class NodeProbe implements AutoCloseable
|
|||
{
|
||||
case ABORTED:
|
||||
failed = true;
|
||||
out.println("Aborted cleaning up atleast one column family in keyspace "+keyspaceName+", check server logs for more information.");
|
||||
out.println("Aborted cleaning up atleast one table in keyspace "+keyspaceName+", check server logs for more information.");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -218,7 +218,7 @@ public class NodeProbe implements AutoCloseable
|
|||
{
|
||||
case ABORTED:
|
||||
failed = true;
|
||||
out.println("Aborted scrubbing atleast one column family in keyspace "+keyspaceName+", check server logs for more information.");
|
||||
out.println("Aborted scrubbing atleast one table in keyspace "+keyspaceName+", check server logs for more information.");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -229,7 +229,7 @@ public class NodeProbe implements AutoCloseable
|
|||
{
|
||||
case ABORTED:
|
||||
failed = true;
|
||||
out.println("Aborted upgrading sstables for atleast one column family in keyspace "+keyspaceName+", check server logs for more information.");
|
||||
out.println("Aborted upgrading sstables for atleast one table in keyspace "+keyspaceName+", check server logs for more information.");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -466,7 +466,7 @@ public class NodeProbe implements AutoCloseable
|
|||
{
|
||||
if (keyspaces.length != 1)
|
||||
{
|
||||
throw new IOException("When specifying the column family for a snapshot, you must specify one and only one keyspace");
|
||||
throw new IOException("When specifying the table for a snapshot, you must specify one and only one keyspace");
|
||||
}
|
||||
ssProxy.takeColumnFamilySnapshot(keyspaces[0], columnFamily, snapshotName);
|
||||
}
|
||||
|
|
@ -1034,7 +1034,7 @@ public class NodeProbe implements AutoCloseable
|
|||
case "TombstoneScannedHistogram":
|
||||
return JMX.newMBeanProxy(mbeanServerConn, oName, JmxReporter.HistogramMBean.class);
|
||||
default:
|
||||
throw new RuntimeException("Unknown column family metric.");
|
||||
throw new RuntimeException("Unknown table metric.");
|
||||
}
|
||||
}
|
||||
catch (MalformedObjectNameException e)
|
||||
|
|
@ -1174,7 +1174,7 @@ class ColumnFamilyStoreMBeanIterator implements Iterator<Map.Entry<String, Colum
|
|||
// get CF name and split it for index name
|
||||
String e1CF[] = e1.getValue().getColumnFamilyName().split("\\.");
|
||||
String e2CF[] = e2.getValue().getColumnFamilyName().split("\\.");
|
||||
assert e1CF.length <= 2 && e2CF.length <= 2 : "unexpected split count for column family name";
|
||||
assert e1CF.length <= 2 && e2CF.length <= 2 : "unexpected split count for table name";
|
||||
|
||||
//if neither are indexes, just compare CF names
|
||||
if(e1CF.length == 1 && e2CF.length == 1)
|
||||
|
|
|
|||
|
|
@ -602,13 +602,13 @@ public class NodeTool
|
|||
}
|
||||
}
|
||||
|
||||
@Command(name = "cfstats", description = "Print statistics on column families")
|
||||
@Command(name = "cfstats", description = "Print statistics on tables")
|
||||
public static class CfStats extends NodeToolCmd
|
||||
{
|
||||
@Arguments(usage = "[<keyspace.cfname>...]", description = "List of column families (or keyspace) names")
|
||||
@Arguments(usage = "[<keyspace.table>...]", description = "List of tables (or keyspace) names")
|
||||
private List<String> cfnames = new ArrayList<>();
|
||||
|
||||
@Option(name = "-i", description = "Ignore the list of column families and display the remaining cfs")
|
||||
@Option(name = "-i", description = "Ignore the list of tables and display the remaining cfs")
|
||||
private boolean ignore = false;
|
||||
|
||||
@Override
|
||||
|
|
@ -821,15 +821,15 @@ public class NodeTool
|
|||
{
|
||||
for (String ks : filter.keySet())
|
||||
if (verifier.get(ks).size() > 0)
|
||||
throw new IllegalArgumentException("Unknown column families: " + verifier.get(ks).toString() + " in keyspace: " + ks);
|
||||
throw new IllegalArgumentException("Unknown tables: " + verifier.get(ks).toString() + " in keyspace: " + ks);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Command(name = "cfhistograms", description = "Print statistic histograms for a given column family")
|
||||
@Command(name = "cfhistograms", description = "Print statistic histograms for a given table")
|
||||
public static class CfHistograms extends NodeToolCmd
|
||||
{
|
||||
@Arguments(usage = "<keyspace> <cfname>", description = "The keyspace and column family name")
|
||||
@Arguments(usage = "<keyspace> <table>", description = "The keyspace and table name")
|
||||
private List<String> args = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
|
|
@ -893,7 +893,7 @@ public class NodeTool
|
|||
@Command(name = "cleanup", description = "Triggers the immediate cleanup of keys no longer belonging to a node. By default, clean all keyspaces")
|
||||
public static class Cleanup extends NodeToolCmd
|
||||
{
|
||||
@Arguments(usage = "[<keyspace> <cfnames>...]", description = "The keyspace followed by one or many column families")
|
||||
@Arguments(usage = "[<keyspace> <tables>...]", description = "The keyspace followed by one or many tables")
|
||||
private List<String> args = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
|
|
@ -954,10 +954,10 @@ public class NodeTool
|
|||
}
|
||||
}
|
||||
|
||||
@Command(name = "compact", description = "Force a (major) compaction on one or more column families")
|
||||
@Command(name = "compact", description = "Force a (major) compaction on one or more tables")
|
||||
public static class Compact extends NodeToolCmd
|
||||
{
|
||||
@Arguments(usage = "[<keyspace> <cfnames>...]", description = "The keyspace followed by one or many column families")
|
||||
@Arguments(usage = "[<keyspace> <tables>...]", description = "The keyspace followed by one or many tables")
|
||||
private List<String> args = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
|
|
@ -979,10 +979,10 @@ public class NodeTool
|
|||
}
|
||||
}
|
||||
|
||||
@Command(name = "flush", description = "Flush one or more column families")
|
||||
@Command(name = "flush", description = "Flush one or more tables")
|
||||
public static class Flush extends NodeToolCmd
|
||||
{
|
||||
@Arguments(usage = "[<keyspace> <cfnames>...]", description = "The keyspace followed by one or many column families")
|
||||
@Arguments(usage = "[<keyspace> <tables>...]", description = "The keyspace followed by one or many tables")
|
||||
private List<String> args = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
|
|
@ -1004,10 +1004,10 @@ public class NodeTool
|
|||
}
|
||||
}
|
||||
|
||||
@Command(name = "scrub", description = "Scrub (rebuild sstables for) one or more column families")
|
||||
@Command(name = "scrub", description = "Scrub (rebuild sstables for) one or more tables")
|
||||
public static class Scrub extends NodeToolCmd
|
||||
{
|
||||
@Arguments(usage = "[<keyspace> <cfnames>...]", description = "The keyspace followed by one or many column families")
|
||||
@Arguments(usage = "[<keyspace> <tables>...]", description = "The keyspace followed by one or many tables")
|
||||
private List<String> args = new ArrayList<>();
|
||||
|
||||
@Option(title = "disable_snapshot",
|
||||
|
|
@ -1039,10 +1039,10 @@ public class NodeTool
|
|||
}
|
||||
}
|
||||
|
||||
@Command(name = "disableautocompaction", description = "Disable autocompaction for the given keyspace and column family")
|
||||
@Command(name = "disableautocompaction", description = "Disable autocompaction for the given keyspace and table")
|
||||
public static class DisableAutoCompaction extends NodeToolCmd
|
||||
{
|
||||
@Arguments(usage = "[<keyspace> <cfnames>...]", description = "The keyspace followed by one or many column families")
|
||||
@Arguments(usage = "[<keyspace> <tables>...]", description = "The keyspace followed by one or many tables")
|
||||
private List<String> args = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
|
|
@ -1064,10 +1064,10 @@ public class NodeTool
|
|||
}
|
||||
}
|
||||
|
||||
@Command(name = "enableautocompaction", description = "Enable autocompaction for the given keyspace and column family")
|
||||
@Command(name = "enableautocompaction", description = "Enable autocompaction for the given keyspace and table")
|
||||
public static class EnableAutoCompaction extends NodeToolCmd
|
||||
{
|
||||
@Arguments(usage = "[<keyspace> <cfnames>...]", description = "The keyspace followed by one or many column families")
|
||||
@Arguments(usage = "[<keyspace> <tables>...]", description = "The keyspace followed by one or many tables")
|
||||
private List<String> args = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
|
|
@ -1089,10 +1089,10 @@ public class NodeTool
|
|||
}
|
||||
}
|
||||
|
||||
@Command(name = "upgradesstables", description = "Rewrite sstables (for the requested column families) that are not on the current version (thus upgrading them to said current version)")
|
||||
@Command(name = "upgradesstables", description = "Rewrite sstables (for the requested tables) that are not on the current version (thus upgrading them to said current version)")
|
||||
public static class UpgradeSSTable extends NodeToolCmd
|
||||
{
|
||||
@Arguments(usage = "[<keyspace> <cfnames>...]", description = "The keyspace followed by one or many column families")
|
||||
@Arguments(usage = "[<keyspace> <tables>...]", description = "The keyspace followed by one or many tables")
|
||||
private List<String> args = new ArrayList<>();
|
||||
|
||||
@Option(title = "include_all", name = {"-a", "--include-all-sstables"}, description = "Use -a to include all sstables, even those already on the current version")
|
||||
|
|
@ -1282,10 +1282,10 @@ public class NodeTool
|
|||
}
|
||||
}
|
||||
|
||||
@Command(name = "getcompactionthreshold", description = "Print min and max compaction thresholds for a given column family")
|
||||
@Command(name = "getcompactionthreshold", description = "Print min and max compaction thresholds for a given table")
|
||||
public static class GetCompactionThreshold extends NodeToolCmd
|
||||
{
|
||||
@Arguments(usage = "<keyspace> <cfname>", description = "The keyspace with a column family")
|
||||
@Arguments(usage = "<keyspace> <table>", description = "The keyspace with a table")
|
||||
private List<String> args = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
|
|
@ -1325,7 +1325,7 @@ public class NodeTool
|
|||
@Command(name = "getendpoints", description = "Print the end points that owns the key")
|
||||
public static class GetEndpoints extends NodeToolCmd
|
||||
{
|
||||
@Arguments(usage = "<keyspace> <cfname> <key>", description = "The keyspace, the column family, and the key for which we need to find the endpoint")
|
||||
@Arguments(usage = "<keyspace> <table> <key>", description = "The keyspace, the table, and the key for which we need to find the endpoint")
|
||||
private List<String> args = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
|
|
@ -1347,7 +1347,7 @@ public class NodeTool
|
|||
@Command(name = "getsstables", description = "Print the sstable filenames that own the key")
|
||||
public static class GetSSTables extends NodeToolCmd
|
||||
{
|
||||
@Arguments(usage = "<keyspace> <cfname> <key>", description = "The keyspace, the column family, and the key")
|
||||
@Arguments(usage = "<keyspace> <table> <key>", description = "The keyspace, the table, and the key")
|
||||
private List<String> args = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
|
|
@ -1530,7 +1530,7 @@ public class NodeTool
|
|||
@Command(name = "refresh", description = "Load newly placed SSTables to the system without restart")
|
||||
public static class Refresh extends NodeToolCmd
|
||||
{
|
||||
@Arguments(usage = "<keyspace> <cfname>", description = "The keyspace and column family name")
|
||||
@Arguments(usage = "<keyspace> <table>", description = "The keyspace and table name")
|
||||
private List<String> args = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
|
|
@ -1577,10 +1577,10 @@ public class NodeTool
|
|||
}
|
||||
}
|
||||
|
||||
@Command(name = "repair", description = "Repair one or more column families")
|
||||
@Command(name = "repair", description = "Repair one or more tables")
|
||||
public static class Repair extends NodeToolCmd
|
||||
{
|
||||
@Arguments(usage = "[<keyspace> <cfnames>...]", description = "The keyspace followed by one or many column families")
|
||||
@Arguments(usage = "[<keyspace> <tables>...]", description = "The keyspace followed by one or many tables")
|
||||
private List<String> args = new ArrayList<>();
|
||||
|
||||
@Option(title = "seqential", name = {"-seq", "--sequential"}, description = "Use -seq to carry out a sequential repair")
|
||||
|
|
@ -1654,10 +1654,10 @@ public class NodeTool
|
|||
}
|
||||
}
|
||||
|
||||
@Command(name = "setcompactionthreshold", description = "Set min and max compaction thresholds for a given column family")
|
||||
@Command(name = "setcompactionthreshold", description = "Set min and max compaction thresholds for a given table")
|
||||
public static class SetCompactionThreshold extends NodeToolCmd
|
||||
{
|
||||
@Arguments(title = "<keyspace> <cfname> <minthreshold> <maxthreshold>", usage = "<keyspace> <cfname> <minthreshold> <maxthreshold>", description = "The keyspace, the column family, min and max threshold", required = true)
|
||||
@Arguments(title = "<keyspace> <table> <minthreshold> <maxthreshold>", usage = "<keyspace> <table> <minthreshold> <maxthreshold>", description = "The keyspace, the table, min and max threshold", required = true)
|
||||
private List<String> args = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
|
|
@ -1715,13 +1715,13 @@ public class NodeTool
|
|||
}
|
||||
}
|
||||
|
||||
@Command(name = "snapshot", description = "Take a snapshot of specified keyspaces or a snapshot of the specified column family")
|
||||
@Command(name = "snapshot", description = "Take a snapshot of specified keyspaces or a snapshot of the specified table")
|
||||
public static class Snapshot extends NodeToolCmd
|
||||
{
|
||||
@Arguments(usage = "[<keyspaces...>]", description = "List of keyspaces. By default, all keyspaces")
|
||||
private List<String> keyspaces = new ArrayList<>();
|
||||
|
||||
@Option(title = "cfname", name = {"-cf", "--column-family"}, description = "The column family name (you must specify one and only one keyspace for using this option)")
|
||||
@Option(title = "table", name = {"-cf", "--column-family", "--table"}, description = "The table name (you must specify one and only one keyspace for using this option)")
|
||||
private String columnFamily = null;
|
||||
|
||||
@Option(title = "tag", name = {"-t", "--tag"}, description = "The name of the snapshot")
|
||||
|
|
@ -2135,10 +2135,10 @@ public class NodeTool
|
|||
}
|
||||
}
|
||||
|
||||
@Command(name = "rebuild_index", description = "A full rebuild of native secondary indexes for a given column family")
|
||||
@Command(name = "rebuild_index", description = "A full rebuild of native secondary indexes for a given table")
|
||||
public static class RebuildIndex extends NodeToolCmd
|
||||
{
|
||||
@Arguments(usage = "<keyspace> <cfname> <indexName...>", description = "The keyspace and column family name followed by a list of index names (IndexNameExample: Standard3.IdxName Standard3.IdxName1)")
|
||||
@Arguments(usage = "<keyspace> <table> <indexName...>", description = "The keyspace and table name followed by a list of index names (IndexNameExample: Standard3.IdxName Standard3.IdxName1)")
|
||||
List<String> args = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
|
|
@ -2232,7 +2232,7 @@ public class NodeTool
|
|||
}
|
||||
}
|
||||
|
||||
@Command(name = "drain", description = "Drain the node (stop accepting writes and flush all column families)")
|
||||
@Command(name = "drain", description = "Drain the node (stop accepting writes and flush all tables)")
|
||||
public static class Drain extends NodeToolCmd
|
||||
{
|
||||
@Override
|
||||
|
|
@ -2243,7 +2243,7 @@ public class NodeTool
|
|||
probe.drain();
|
||||
} catch (IOException | InterruptedException | ExecutionException e)
|
||||
{
|
||||
throw new RuntimeException("Error occured during flushing", e);
|
||||
throw new RuntimeException("Error occurred during flushing", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -430,7 +430,7 @@ public class SSTableExport
|
|||
}
|
||||
catch (IllegalArgumentException e)
|
||||
{
|
||||
System.err.println(String.format("The provided column family is not part of this cassandra keyspace: keyspace = %s, column family = %s",
|
||||
System.err.println(String.format("The provided table is not part of this cassandra keyspace: keyspace = %s, table = %s",
|
||||
descriptor.ksname, descriptor.cfname));
|
||||
System.exit(1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ public class SSTableImport
|
|||
optKeyspace.setRequired(true);
|
||||
options.addOption(optKeyspace);
|
||||
|
||||
Option optColfamily = new Option(COLUMN_FAMILY_OPTION, true, "Column Family name.");
|
||||
Option optColfamily = new Option(COLUMN_FAMILY_OPTION, true, "Table name.");
|
||||
optColfamily.setRequired(true);
|
||||
options.addOption(optColfamily);
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public class SSTableLevelResetter
|
|||
if (args.length == 0)
|
||||
{
|
||||
out.println("This command should be run with Cassandra stopped!");
|
||||
out.println("Usage: sstablelevelreset <keyspace> <columnfamily>");
|
||||
out.println("Usage: sstablelevelreset <keyspace> <table>");
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
|
|
@ -52,7 +52,7 @@ public class SSTableLevelResetter
|
|||
{
|
||||
out.println("This command should be run with Cassandra stopped, otherwise you will get very strange behavior");
|
||||
out.println("Verify that Cassandra is not running and then execute the command like this:");
|
||||
out.println("Usage: sstablelevelreset --really-reset <keyspace> <columnfamily>");
|
||||
out.println("Usage: sstablelevelreset --really-reset <keyspace> <table>");
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
|
|
@ -78,7 +78,7 @@ public class SSTableLevelResetter
|
|||
|
||||
if (!foundSSTable)
|
||||
{
|
||||
out.println("Found no sstables, did you give the correct keyspace/columnfamily?");
|
||||
out.println("Found no sstables, did you give the correct keyspace/table?");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ public class StandaloneScrubber
|
|||
DatabaseDescriptor.loadSchemas();
|
||||
|
||||
if (Schema.instance.getCFMetaData(options.keyspaceName, options.cfName) == null)
|
||||
throw new IllegalArgumentException(String.format("Unknown keyspace/columnFamily %s.%s",
|
||||
throw new IllegalArgumentException(String.format("Unknown keyspace/table %s.%s",
|
||||
options.keyspaceName,
|
||||
options.cfName));
|
||||
|
||||
|
|
@ -233,7 +233,7 @@ public class StandaloneScrubber
|
|||
String usage = String.format("%s [options] <keyspace> <column_family>", TOOL_NAME);
|
||||
StringBuilder header = new StringBuilder();
|
||||
header.append("--\n");
|
||||
header.append("Scrub the sstable for the provided column family." );
|
||||
header.append("Scrub the sstable for the provided table." );
|
||||
header.append("\n--\n");
|
||||
header.append("Options are:");
|
||||
new HelpFormatter().printHelp(usage, header.toString(), options, "");
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ public class StandaloneSplitter
|
|||
if (cfName == null)
|
||||
cfName = desc.cfname;
|
||||
else if (!cfName.equals(desc.cfname))
|
||||
throw new IllegalArgumentException("All sstables must be part of the same column family");
|
||||
throw new IllegalArgumentException("All sstables must be part of the same table");
|
||||
|
||||
Set<Component> components = new HashSet<Component>(Arrays.asList(new Component[]{
|
||||
Component.DATA,
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ public class StandaloneUpgrader
|
|||
DatabaseDescriptor.loadSchemas();
|
||||
|
||||
if (Schema.instance.getCFMetaData(options.keyspace, options.cf) == null)
|
||||
throw new IllegalArgumentException(String.format("Unknown keyspace/columnFamily %s.%s",
|
||||
throw new IllegalArgumentException(String.format("Unknown keyspace/table %s.%s",
|
||||
options.keyspace,
|
||||
options.cf));
|
||||
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ public class TriggerExecutor
|
|||
for (ColumnFamily cf : mutation.getColumnFamilies())
|
||||
{
|
||||
if (! cf.id().equals(cfId))
|
||||
throw new InvalidRequestException("Column family of additional mutation does not match primary update cf");
|
||||
throw new InvalidRequestException("table of additional mutation does not match primary update table");
|
||||
}
|
||||
}
|
||||
validate(tmutations);
|
||||
|
|
@ -196,7 +196,7 @@ public class TriggerExecutor
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new RuntimeException(String.format("Exception while creating trigger on CF with ID: %s", columnFamily.id()), ex);
|
||||
throw new RuntimeException(String.format("Exception while creating trigger on table with ID: %s", columnFamily.id()), ex);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ public class StatusLogger
|
|||
rowCacheKeysToSave == Integer.MAX_VALUE ? "all" : rowCacheKeysToSave));
|
||||
|
||||
// per-CF stats
|
||||
logger.info(String.format("%-25s%20s", "ColumnFamily", "Memtable ops,data"));
|
||||
logger.info(String.format("%-25s%20s", "Table", "Memtable ops,data"));
|
||||
for (ColumnFamilyStore cfs : ColumnFamilyStore.all())
|
||||
{
|
||||
logger.info(String.format("%-25s%20s",
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ public class Util
|
|||
public static ColumnFamily getColumnFamily(Keyspace keyspace, DecoratedKey key, String cfName)
|
||||
{
|
||||
ColumnFamilyStore cfStore = keyspace.getColumnFamilyStore(cfName);
|
||||
assert cfStore != null : "Column family " + cfName + " has not been defined";
|
||||
assert cfStore != null : "Table " + cfName + " has not been defined";
|
||||
return cfStore.getColumnFamily(QueryFilter.getIdentityFilter(key, cfName, System.currentTimeMillis()));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ public class DefsTest extends SchemaLoader
|
|||
final String cf = "BrandNewCf";
|
||||
KSMetaData original = Schema.instance.getKSMetaData(ks);
|
||||
|
||||
CFMetaData newCf = addTestCF(original.name, cf, "A New Column Family");
|
||||
CFMetaData newCf = addTestCF(original.name, cf, "A New Table");
|
||||
|
||||
Assert.assertFalse(Schema.instance.getKSMetaData(ks).cfMetaData().containsKey(newCf.cfName));
|
||||
MigrationManager.announceNewColumnFamily(newCf);
|
||||
|
|
|
|||
Loading…
Reference in New Issue