private static void truncateLegacySchemaTables() { LegacySchemaTables.forEach(table -> Schema.instance.getColumnFamilyStoreInstance(table.cfId).truncateBlocking()); }
private static void truncateLegacySchemaTables() { LegacySchemaTables.forEach(table -> Schema.instance.getColumnFamilyStoreInstance(table.cfId).truncateBlocking()); }
private static void truncateLegacySchemaTables() { LegacySchemaTables.forEach(table -> Schema.instance.getColumnFamilyStoreInstance(table.cfId).truncateBlocking()); }
public void run() { try { logger.info("Truncating all stored hints."); Keyspace.open(Keyspace.SYSTEM_KS).getColumnFamilyStore(SystemKeyspace.HINTS_CF).truncateBlocking(); } catch (Exception e) { logger.warn("Could not truncate all hints.", e); } } };
public static void resetAvailableRanges() { ColumnFamilyStore availableRanges = Keyspace.open(SchemaConstants.SYSTEM_KEYSPACE_NAME).getColumnFamilyStore(AVAILABLE_RANGES); availableRanges.truncateBlocking(); }
public static void resetPreparedStatements() { ColumnFamilyStore availableRanges = Keyspace.open(SchemaConstants.SYSTEM_KEYSPACE_NAME).getColumnFamilyStore(PREPARED_STATEMENTS); availableRanges.truncateBlocking(); }
public static void resetPreparedStatements() { ColumnFamilyStore availableRanges = Keyspace.open(SchemaConstants.SYSTEM_KEYSPACE_NAME).getColumnFamilyStore(PREPARED_STATEMENTS); availableRanges.truncateBlocking(); }
public static void resetAvailableRanges() { ColumnFamilyStore availableRanges = Keyspace.open(SchemaConstants.SYSTEM_KEYSPACE_NAME).getColumnFamilyStore(AVAILABLE_RANGES); availableRanges.truncateBlocking(); }
public void migrate() { // nothing to migrate if (legacyHintsTable.isEmpty()) return; logger.info("Migrating legacy hints to new storage"); // major-compact all of the existing sstables to get rid of the tombstones + expired hints logger.info("Forcing a major compaction of {}.{} table", SchemaConstants.SYSTEM_KEYSPACE_NAME, SystemKeyspace.LEGACY_HINTS); compactLegacyHints(); // paginate over legacy hints and write them to the new storage logger.info("Writing legacy hints to the new storage"); migrateLegacyHints(); // truncate the legacy hints table logger.info("Truncating {}.{} table", SchemaConstants.SYSTEM_KEYSPACE_NAME, SystemKeyspace.LEGACY_HINTS); legacyHintsTable.truncateBlocking(); }
public static void resetPreparedStatements() { ColumnFamilyStore availableRanges = Keyspace.open(SchemaConstants.SYSTEM_KEYSPACE_NAME).getColumnFamilyStore(PREPARED_STATEMENTS); availableRanges.truncateBlocking(); }
public static void resetAvailableRanges() { ColumnFamilyStore availableRanges = Keyspace.open(SchemaConstants.SYSTEM_KEYSPACE_NAME).getColumnFamilyStore(AVAILABLE_RANGES); availableRanges.truncateBlocking(); }
public void migrate() { // nothing to migrate if (legacyHintsTable.isEmpty()) return; logger.info("Migrating legacy hints to new storage"); // major-compact all of the existing sstables to get rid of the tombstones + expired hints logger.info("Forcing a major compaction of {}.{} table", SchemaConstants.SYSTEM_KEYSPACE_NAME, SystemKeyspace.LEGACY_HINTS); compactLegacyHints(); // paginate over legacy hints and write them to the new storage logger.info("Writing legacy hints to the new storage"); migrateLegacyHints(); // truncate the legacy hints table logger.info("Truncating {}.{} table", SchemaConstants.SYSTEM_KEYSPACE_NAME, SystemKeyspace.LEGACY_HINTS); legacyHintsTable.truncateBlocking(); }
public static void discardCompactionsInProgress() { ColumnFamilyStore compactionLog = Keyspace.open(Keyspace.SYSTEM_KS).getColumnFamilyStore(COMPACTION_LOG); compactionLog.truncateBlocking(); }
public static void truncate() { ALL.reverse().forEach(table -> getSchemaCFS(table).truncateBlocking()); }
public static void truncate() { ALL.reverse().forEach(table -> getSchemaCFS(table).truncateBlocking()); }
public static void truncate() { ALL.reverse().forEach(table -> getSchemaCFS(table).truncateBlocking()); }
public ResultMessage executeInternal(QueryState state, QueryOptions options) { try { ColumnFamilyStore cfs = Keyspace.open(keyspace()).getColumnFamilyStore(columnFamily()); cfs.truncateBlocking(); } catch (Exception e) { throw new TruncateException(e); } return null; } }
public ResultMessage executeInternal(QueryState state, QueryOptions options) { try { ColumnFamilyStore cfs = Keyspace.open(keyspace()).getColumnFamilyStore(columnFamily()); cfs.truncateBlocking(); } catch (Exception e) { throw new TruncateException(e); } return null; } }
public ResultMessage executeInternal(QueryState state, QueryOptions options) { try { ColumnFamilyStore cfs = Keyspace.open(keyspace()).getColumnFamilyStore(columnFamily()); cfs.truncateBlocking(); } catch (Exception e) { throw new TruncateException(e); } return null; } }
public ResultMessage executeInternal(QueryState state, QueryOptions options) throws TruncateException { try { ColumnFamilyStore cfs = Keyspace.open(keyspace()).getColumnFamilyStore(columnFamily()); cfs.truncateBlocking(); } catch (Exception e) { throw new TruncateException(e); } return null; } }