@Override public void clearDimension() { //Remove all dimension data from the store. findAllDimensionRows().stream() .flatMap(dimensionRow -> dimensionRow.entrySet().stream()) .map(entry -> DimensionStoreKeyUtils.getRowKey(entry.getKey().getName(), entry.getValue())) .forEach(keyValueStore::remove); //Since the indices are being dropped, the dimension field stored via the columnKey is becoming stale. keyValueStore.remove(DimensionStoreKeyUtils.getColumnKey(dimension.getKey().getName())); // The allValues key mapping needs to reflect the fact that we are dropping all dimension data. keyValueStore.put(DimensionStoreKeyUtils.getAllValuesKey(), "[]"); //We're resetting the keyValueStore, so we don't want any stale last updated date floating around. keyValueStore.remove(DimensionStoreKeyUtils.getLastUpdatedKey()); refreshCardinality(); }
keyValueStore.remove(DimensionStoreKeyUtils.getLastUpdatedKey());
this.longName = longName; this.category = category; this.lastUpdatedKey = DimensionStoreKeyUtils.getLastUpdatedKey();