private static boolean systemKeyspaceQuery(List<? extends ReadCommand> cmds) { for (ReadCommand cmd : cmds) if (!SchemaConstants.isLocalSystemKeyspace(cmd.metadata().ksName)) return false; return true; }
public static Keyspace open(String keyspaceName) { assert initialized || SchemaConstants.isLocalSystemKeyspace(keyspaceName); return open(keyspaceName, Schema.instance, true); }
public static Keyspace open(String keyspaceName) { assert initialized || SchemaConstants.isLocalSystemKeyspace(keyspaceName); return open(keyspaceName, Schema.instance, true); }
public static void validateKeyspaceNotSystem(String modifiedKeyspace) throws org.apache.cassandra.exceptions.InvalidRequestException { if (SchemaConstants.isLocalSystemKeyspace(modifiedKeyspace)) throw new org.apache.cassandra.exceptions.InvalidRequestException(String.format("%s keyspace is not user-modifiable", modifiedKeyspace)); }
private static boolean systemKeyspaceQuery(List<? extends ReadCommand> cmds) { for (ReadCommand cmd : cmds) if (!SchemaConstants.isLocalSystemKeyspace(cmd.metadata().ksName)) return false; return true; }
public static Keyspace open(String keyspaceName) { assert initialized || SchemaConstants.isLocalSystemKeyspace(keyspaceName); return open(keyspaceName, Schema.instance, true); }
private static boolean systemKeyspaceQuery(List<? extends ReadCommand> cmds) { for (ReadCommand cmd : cmds) if (!SchemaConstants.isLocalSystemKeyspace(cmd.metadata().ksName)) return false; return true; }
public static void validateKeyspaceNotSystem(String modifiedKeyspace) throws org.apache.cassandra.exceptions.InvalidRequestException { if (SchemaConstants.isLocalSystemKeyspace(modifiedKeyspace)) throw new org.apache.cassandra.exceptions.InvalidRequestException(String.format("%s keyspace is not user-modifiable", modifiedKeyspace)); }
public Keyspaces getReplicatedKeyspaces() { Keyspaces.Builder builder = Keyspaces.builder(); keyspaces.values() .stream() .filter(k -> !SchemaConstants.isLocalSystemKeyspace(k.name)) .forEach(builder::add); return builder.build(); }
public Keyspaces getReplicatedKeyspaces() { Keyspaces.Builder builder = Keyspaces.builder(); keyspaces.values() .stream() .filter(k -> !SchemaConstants.isLocalSystemKeyspace(k.name)) .forEach(builder::add); return builder.build(); }
public Keyspaces getReplicatedKeyspaces() { Keyspaces.Builder builder = Keyspaces.builder(); keyspaces.values() .stream() .filter(k -> !SchemaConstants.isLocalSystemKeyspace(k.name)) .forEach(builder::add); return builder.build(); }
public int forceKeyspaceCleanup(int jobs, String keyspaceName, String... tables) throws IOException, ExecutionException, InterruptedException { if (SchemaConstants.isLocalSystemKeyspace(keyspaceName)) throw new RuntimeException("Cleanup of the system keyspace is neither necessary nor wise"); CompactionManager.AllSSTableOpStatus status = CompactionManager.AllSSTableOpStatus.SUCCESSFUL; for (ColumnFamilyStore cfStore : getValidColumnFamilies(false, false, keyspaceName, tables)) { CompactionManager.AllSSTableOpStatus oneStatus = cfStore.forceCleanup(jobs); if (oneStatus != CompactionManager.AllSSTableOpStatus.SUCCESSFUL) status = oneStatus; } return status.statusCode; }
public int forceKeyspaceCleanup(int jobs, String keyspaceName, String... tables) throws IOException, ExecutionException, InterruptedException { if (SchemaConstants.isLocalSystemKeyspace(keyspaceName)) throw new RuntimeException("Cleanup of the system keyspace is neither necessary nor wise"); CompactionManager.AllSSTableOpStatus status = CompactionManager.AllSSTableOpStatus.SUCCESSFUL; for (ColumnFamilyStore cfStore : getValidColumnFamilies(false, false, keyspaceName, tables)) { CompactionManager.AllSSTableOpStatus oneStatus = cfStore.forceCleanup(jobs); if (oneStatus != CompactionManager.AllSSTableOpStatus.SUCCESSFUL) status = oneStatus; } return status.statusCode; }
public int forceKeyspaceCleanup(int jobs, String keyspaceName, String... tables) throws IOException, ExecutionException, InterruptedException { if (SchemaConstants.isLocalSystemKeyspace(keyspaceName)) throw new RuntimeException("Cleanup of the system keyspace is neither necessary nor wise"); CompactionManager.AllSSTableOpStatus status = CompactionManager.AllSSTableOpStatus.SUCCESSFUL; for (ColumnFamilyStore cfStore : getValidColumnFamilies(false, false, keyspaceName, tables)) { CompactionManager.AllSSTableOpStatus oneStatus = cfStore.forceCleanup(jobs); if (oneStatus != CompactionManager.AllSSTableOpStatus.SUCCESSFUL) status = oneStatus; } return status.statusCode; }
private static boolean isSystemKeyspaceSchemaPartition(DecoratedKey partitionKey) { return SchemaConstants.isLocalSystemKeyspace(UTF8Type.instance.compose(partitionKey.getKey())); }
private static boolean isSystemKeyspaceSchemaPartition(DecoratedKey partitionKey) { return SchemaConstants.isLocalSystemKeyspace(UTF8Type.instance.compose(partitionKey.getKey())); }
private static boolean isSystemKeyspaceSchemaPartition(DecoratedKey partitionKey) { return SchemaConstants.isLocalSystemKeyspace(UTF8Type.instance.compose(partitionKey.getKey())); }
public long trueSnapshotsSize() { long total = 0; for (Keyspace keyspace : Keyspace.all()) { if (SchemaConstants.isLocalSystemKeyspace(keyspace.getName())) continue; for (ColumnFamilyStore cfStore : keyspace.getColumnFamilyStores()) { total += cfStore.trueSnapshotsSize(); } } return total; }
public long trueSnapshotsSize() { long total = 0; for (Keyspace keyspace : Keyspace.all()) { if (SchemaConstants.isLocalSystemKeyspace(keyspace.getName())) continue; for (ColumnFamilyStore cfStore : keyspace.getColumnFamilyStores()) { total += cfStore.trueSnapshotsSize(); } } return total; }
public long trueSnapshotsSize() { long total = 0; for (Keyspace keyspace : Keyspace.all()) { if (SchemaConstants.isLocalSystemKeyspace(keyspace.getName())) continue; for (ColumnFamilyStore cfStore : keyspace.getColumnFamilyStores()) { total += cfStore.trueSnapshotsSize(); } } return total; }