public static Iterable<Keyspace> all() { return Iterables.transform(Schema.instance.getKeyspaces(), keyspaceTransformer); }
public static Iterable<Keyspace> all() { return Iterables.transform(Schema.instance.getKeyspaces(), keyspaceTransformer); }
public List<String> getKeyspaces() { List<String> keyspaceNamesList = new ArrayList<>(Schema.instance.getKeyspaces()); return Collections.unmodifiableList(keyspaceNamesList); }
public List<String> getKeyspaces() { List<String> keyspaceNamesList = new ArrayList<>(Schema.instance.getKeyspaces()); return Collections.unmodifiableList(keyspaceNamesList); }
public List<String> getKeyspaces() { List<String> keyspaceNamesList = new ArrayList<>(Schema.instance.getKeyspaces()); return Collections.unmodifiableList(keyspaceNamesList); }
public List<String> getKeyspaces() { List<String> keyspaceNamesList = new ArrayList<>(Schema.instance.getKeyspaces()); return Collections.unmodifiableList(keyspaceNamesList); }
private Keyspace getValidKeyspace(String keyspaceName) throws IOException { if (!Schema.instance.getKeyspaces().contains(keyspaceName)) { throw new IOException("Keyspace " + keyspaceName + " does not exist"); } return Keyspace.open(keyspaceName); }
public static void validateKeyspaceNotYetExisting(String newKsName) throws org.apache.cassandra.exceptions.InvalidRequestException { // keyspace names must be unique case-insensitively because the keyspace name becomes the directory // where we store CF sstables. Names that differ only in case would thus cause problems on // case-insensitive filesystems (NTFS, most installations of HFS+). for (String ksName : Schema.instance.getKeyspaces()) { if (ksName.equalsIgnoreCase(newKsName)) throw new org.apache.cassandra.exceptions.InvalidRequestException(String.format("Keyspace names must be case-insensitively unique (\"%s\" conflicts with \"%s\")", newKsName, ksName)); } }
public static void validateKeyspace(String keyspaceName) throws KeyspaceNotDefinedException { if (!Schema.instance.getKeyspaces().contains(keyspaceName)) { throw new KeyspaceNotDefinedException("Keyspace " + keyspaceName + " does not exist"); } }
private Keyspace getValidKeyspace(String keyspaceName) throws IOException { if (!Schema.instance.getKeyspaces().contains(keyspaceName)) { throw new IOException("Keyspace " + keyspaceName + " does not exist"); } return Keyspace.open(keyspaceName); }
private Keyspace getValidKeyspace(String keyspaceName) throws IOException { if (!Schema.instance.getKeyspaces().contains(keyspaceName)) { throw new IOException("Keyspace " + keyspaceName + " does not exist"); } return Keyspace.open(keyspaceName); }
public static void validateKeyspace(String keyspaceName) throws KeyspaceNotDefinedException { if (!Schema.instance.getKeyspaces().contains(keyspaceName)) { throw new KeyspaceNotDefinedException("Keyspace " + keyspaceName + " does not exist"); } }
private Keyspace getValidKeyspace(String keyspaceName) throws IOException { if (!Schema.instance.getKeyspaces().contains(keyspaceName)) { throw new IOException("Keyspace " + keyspaceName + " does not exist"); } return Keyspace.open(keyspaceName); }
public static void validateKeyspace(String keyspaceName) throws KeyspaceNotDefinedException { if (!Schema.instance.getKeyspaces().contains(keyspaceName)) { throw new KeyspaceNotDefinedException("Keyspace " + keyspaceName + " does not exist"); } }
public static Iterable<ColumnFamilyStore> all() { List<Iterable<ColumnFamilyStore>> stores = new ArrayList<Iterable<ColumnFamilyStore>>(Schema.instance.getKeyspaces().size()); for (Keyspace keyspace : Keyspace.all()) { stores.add(keyspace.getColumnFamilyStores()); } return Iterables.concat(stores); }
public static Iterable<ColumnFamilyStore> all() { List<Iterable<ColumnFamilyStore>> stores = new ArrayList<Iterable<ColumnFamilyStore>>(Schema.instance.getKeyspaces().size()); for (Keyspace keyspace : Keyspace.all()) { stores.add(keyspace.getColumnFamilyStores()); } return Iterables.concat(stores); }
public boolean exists() { switch (level) { case ROOT: return true; case KEYSPACE: return Schema.instance.getKeyspaces().contains(keyspace); case FUNCTION: return Schema.instance.findFunction(getFunctionName(), argTypes).isPresent(); } throw new AssertionError(); }
public static Iterable<ColumnFamilyStore> all() { List<Iterable<ColumnFamilyStore>> stores = new ArrayList<Iterable<ColumnFamilyStore>>(Schema.instance.getKeyspaces().size()); for (Keyspace keyspace : Keyspace.all()) { stores.add(keyspace.getColumnFamilyStores()); } return Iterables.concat(stores); }
public static Iterable<ColumnFamilyStore> all() { List<Iterable<ColumnFamilyStore>> stores = new ArrayList<Iterable<ColumnFamilyStore>>(Schema.instance.getKeyspaces().size()); for (Keyspace keyspace : Keyspace.all()) { stores.add(keyspace.getColumnFamilyStores()); } return Iterables.concat(stores); }
public Integer getValue() { int n = 0; // add estimate number of compactions need to be done for (String keyspaceName : Schema.instance.getKeyspaces()) { for (ColumnFamilyStore cfs : Keyspace.open(keyspaceName).getColumnFamilyStores()) n += cfs.getCompactionStrategyManager().getEstimatedRemainingTasks(); } // add number of currently running compactions return n + compactions.size(); } });