public String toString() { return String.format("expr(%s, %s)", targetIndex.name, Keyspace.openAndGetStore(cfm) .indexManager .getIndex(targetIndex) .customExpressionValueType()); }
public String toString() { return String.format("expr(%s, %s)", targetIndex.name, Keyspace.openAndGetStore(cfm) .indexManager .getIndex(targetIndex) .customExpressionValueType()); }
public String toString() { return String.format("expr(%s, %s)", targetIndex.name, Keyspace.openAndGetStore(cfm) .indexManager .getIndex(targetIndex) .customExpressionValueType()); }
/** * Check all partition updates contain only valid values for any * indexed columns. */ public void validateIndexedColumns() { for (Map<ByteBuffer, IMutation> perKsMutations : mutations.values()) for (IMutation mutation : perKsMutations.values()) for (PartitionUpdate update : mutation.getPartitionUpdates()) Keyspace.openAndGetStore(update.metadata()).indexManager.validate(update); }
/** * If the index manager for the CFS determines that there's an applicable * 2i that can be used to execute this command, call its (optional) * validation method to check that nothing in this command's parameters * violates the implementation specific validation rules. */ public void maybeValidateIndex() { Index index = getIndex(Keyspace.openAndGetStore(metadata)); if (null != index) index.validate(this); }
/** * Check all partition updates contain only valid values for any * indexed columns. */ public void validateIndexedColumns() { for (Map<ByteBuffer, IMutation> perKsMutations : mutations.values()) for (IMutation mutation : perKsMutations.values()) for (PartitionUpdate update : mutation.getPartitionUpdates()) Keyspace.openAndGetStore(update.metadata()).indexManager.validate(update); }
/** * If the index manager for the CFS determines that there's an applicable * 2i that can be used to execute this command, call its (optional) * validation method to check that nothing in this command's parameters * violates the implementation specific validation rules. */ public void maybeValidateIndex() { Index index = getIndex(Keyspace.openAndGetStore(metadata)); if (null != index) index.validate(this); }
/** * Check all partition updates contain only valid values for any * indexed columns. */ public void validateIndexedColumns() { for (Map<ByteBuffer, IMutation> perKsMutations : mutations.values()) for (IMutation mutation : perKsMutations.values()) for (PartitionUpdate update : mutation.getPartitionUpdates()) Keyspace.openAndGetStore(update.metadata()).indexManager.validate(update); }
/** * If the index manager for the CFS determines that there's an applicable * 2i that can be used to execute this command, call its (optional) * validation method to check that nothing in this command's parameters * violates the implementation specific validation rules. */ public void maybeValidateIndex() { Index index = getIndex(Keyspace.openAndGetStore(metadata)); if (null != index) index.validate(this); }
static void unloadLegacySchemaTables() { KeyspaceMetadata systemKeyspace = Schema.instance.getKSMetaData(SchemaConstants.SYSTEM_KEYSPACE_NAME); Tables systemTables = systemKeyspace.tables; for (CFMetaData table : LegacySchemaTables) systemTables = systemTables.without(table.cfName); LegacySchemaTables.forEach(Schema.instance::unload); LegacySchemaTables.forEach((cfm) -> org.apache.cassandra.db.Keyspace.openAndGetStore(cfm).invalidate()); Schema.instance.setKeyspaceMetadata(systemKeyspace.withSwapped(systemTables)); }
static void unloadLegacySchemaTables() { KeyspaceMetadata systemKeyspace = Schema.instance.getKSMetaData(SchemaConstants.SYSTEM_KEYSPACE_NAME); Tables systemTables = systemKeyspace.tables; for (CFMetaData table : LegacySchemaTables) systemTables = systemTables.without(table.cfName); LegacySchemaTables.forEach(Schema.instance::unload); LegacySchemaTables.forEach((cfm) -> org.apache.cassandra.db.Keyspace.openAndGetStore(cfm).invalidate()); Schema.instance.setKeyspaceMetadata(systemKeyspace.withSwapped(systemTables)); }
static void unloadLegacySchemaTables() { KeyspaceMetadata systemKeyspace = Schema.instance.getKSMetaData(SchemaConstants.SYSTEM_KEYSPACE_NAME); Tables systemTables = systemKeyspace.tables; for (CFMetaData table : LegacySchemaTables) systemTables = systemTables.without(table.cfName); LegacySchemaTables.forEach(Schema.instance::unload); LegacySchemaTables.forEach((cfm) -> org.apache.cassandra.db.Keyspace.openAndGetStore(cfm).invalidate()); Schema.instance.setKeyspaceMetadata(systemKeyspace.withSwapped(systemTables)); }
public void close() { try { if (sentQueryIterator != null) sentQueryIterator.close(); } finally { long latency = System.nanoTime() - startTime; rangeMetrics.addNano(latency); Keyspace.openAndGetStore(command.metadata()).metric.coordinatorScanLatency.update(latency, TimeUnit.NANOSECONDS); } } }
public void close() { try { if (sentQueryIterator != null) sentQueryIterator.close(); } finally { long latency = System.nanoTime() - startTime; rangeMetrics.addNano(latency); Keyspace.openAndGetStore(command.metadata()).metric.coordinatorScanLatency.update(latency, TimeUnit.NANOSECONDS); } } }
public PartitionUpdate makeUpdates(FilteredPartition current) throws InvalidRequestException { PartitionUpdate update = new PartitionUpdate(cfm, key, updatedColumns(), conditions.size()); for (RowUpdate upd : updates) upd.applyUpdates(current, update); for (RangeDeletion upd : rangeDeletions) upd.applyUpdates(current, update); Keyspace.openAndGetStore(cfm).indexManager.validate(update); return update; }
public PartitionUpdate makeUpdates(FilteredPartition current) throws InvalidRequestException { PartitionUpdate update = new PartitionUpdate(cfm, key, updatedColumns(), conditions.size()); for (RowUpdate upd : updates) upd.applyUpdates(current, update); for (RangeDeletion upd : rangeDeletions) upd.applyUpdates(current, update); Keyspace.openAndGetStore(cfm).indexManager.validate(update); return update; }
public PartitionUpdate makeUpdates(FilteredPartition current) throws InvalidRequestException { PartitionUpdate update = new PartitionUpdate(cfm, key, updatedColumns(), conditions.size()); for (RowUpdate upd : updates) upd.applyUpdates(current, update); for (RangeDeletion upd : rangeDeletions) upd.applyUpdates(current, update); Keyspace.openAndGetStore(cfm).indexManager.validate(update); return update; }
static IndexMetadata findIndex(CFMetaData table, RowFilter rowFilter) { if (table.getIndexes().isEmpty() || rowFilter.isEmpty()) return null; ColumnFamilyStore cfs = Keyspace.openAndGetStore(table); Index index = cfs.indexManager.getBestIndexFor(rowFilter); return null != index ? index.getIndexMetadata() : null; }
static IndexMetadata findIndex(CFMetaData table, RowFilter rowFilter) { if (table.getIndexes().isEmpty() || rowFilter.isEmpty()) return null; ColumnFamilyStore cfs = Keyspace.openAndGetStore(table); Index index = cfs.indexManager.getBestIndexFor(rowFilter); return null != index ? index.getIndexMetadata() : null; }
static IndexMetadata findIndex(CFMetaData table, RowFilter rowFilter) { if (table.getIndexes().isEmpty() || rowFilter.isEmpty()) return null; ColumnFamilyStore cfs = Keyspace.openAndGetStore(table); Index index = cfs.indexManager.getBestIndexFor(rowFilter); return null != index ? index.getIndexMetadata() : null; }