use of org.apache.cassandra.schema.IndexMetadata in project cassandra by apache.
the class SecondaryIndexManager method reload.
/**
* Drops and adds new indexes associated with the underlying CF
*/
public void reload() {
// figure out what needs to be added and dropped.
Indexes tableIndexes = baseCfs.metadata().indexes;
indexes.keySet().stream().filter(indexName -> !tableIndexes.has(indexName)).forEach(this::removeIndex);
// some may not have been created here yet, only added to schema
for (IndexMetadata tableIndex : tableIndexes) addIndex(tableIndex);
}
Aggregations