protected List<String> parseOptionalKeyspace(List<String> cmdArgs, NodeProbe nodeProbe) { List<String> keyspaces = new ArrayList<>(); if (cmdArgs == null || cmdArgs.isEmpty()) keyspaces.addAll(nodeProbe.getKeyspaces()); else keyspaces.add(cmdArgs.get(0)); for (String keyspace : keyspaces) { if (!nodeProbe.getKeyspaces().contains(keyspace)) throw new IllegalArgumentException("Keyspace [" + keyspace + "] does not exist."); } return Collections.unmodifiableList(keyspaces); }
/** * Gets the key spaces. * * @return A list of the names of all of the key spaces for the Cassandra * instance. */ public List<String> getKeySpaces() { return getProbe().getKeyspaces(); }
/** * Gets the non-system key spaces. * * @return A list of the names of all of the non-system key spaces for * the Cassandra instance. */ public List<String> getNonSystemKeySpaces() { return getProbe().getKeyspaces().stream().filter( keyspace -> !SYSTEM_KEYSPACE_NAMES.contains(keyspace)) .collect(Collectors.toList()); }
protected List<String> parseOptionalKeyspace(List<String> cmdArgs, NodeProbe nodeProbe, KeyspaceSet defaultKeyspaceSet) { List<String> keyspaces = new ArrayList<>(); if (cmdArgs == null || cmdArgs.isEmpty()) { if (defaultKeyspaceSet == KeyspaceSet.NON_LOCAL_STRATEGY) keyspaces.addAll(keyspaces = nodeProbe.getNonLocalStrategyKeyspaces()); else if (defaultKeyspaceSet == KeyspaceSet.NON_SYSTEM) keyspaces.addAll(keyspaces = nodeProbe.getNonSystemKeyspaces()); else keyspaces.addAll(nodeProbe.getKeyspaces()); } else { keyspaces.add(cmdArgs.get(0)); } for (String keyspace : keyspaces) { if (!nodeProbe.getKeyspaces().contains(keyspace)) throw new IllegalArgumentException("Keyspace [" + keyspace + "] does not exist."); } return Collections.unmodifiableList(keyspaces); }
protected List<String> parseOptionalKeyspace(List<String> cmdArgs, NodeProbe nodeProbe, KeyspaceSet defaultKeyspaceSet) { List<String> keyspaces = new ArrayList<>(); if (cmdArgs == null || cmdArgs.isEmpty()) { if (defaultKeyspaceSet == KeyspaceSet.NON_LOCAL_STRATEGY) keyspaces.addAll(keyspaces = nodeProbe.getNonLocalStrategyKeyspaces()); else if (defaultKeyspaceSet == KeyspaceSet.NON_SYSTEM) keyspaces.addAll(keyspaces = nodeProbe.getNonSystemKeyspaces()); else keyspaces.addAll(nodeProbe.getKeyspaces()); } else { keyspaces.add(cmdArgs.get(0)); } for (String keyspace : keyspaces) { if (!nodeProbe.getKeyspaces().contains(keyspace)) throw new IllegalArgumentException("Keyspace [" + keyspace + "] does not exist."); } return Collections.unmodifiableList(keyspaces); }
protected List<String> parseOptionalKeyspace(List<String> cmdArgs, NodeProbe nodeProbe, KeyspaceSet defaultKeyspaceSet) { List<String> keyspaces = new ArrayList<>(); if (cmdArgs == null || cmdArgs.isEmpty()) { if (defaultKeyspaceSet == KeyspaceSet.NON_LOCAL_STRATEGY) keyspaces.addAll(keyspaces = nodeProbe.getNonLocalStrategyKeyspaces()); else if (defaultKeyspaceSet == KeyspaceSet.NON_SYSTEM) keyspaces.addAll(keyspaces = nodeProbe.getNonSystemKeyspaces()); else keyspaces.addAll(nodeProbe.getKeyspaces()); } else { keyspaces.add(cmdArgs.get(0)); } for (String keyspace : keyspaces) { if (!nodeProbe.getKeyspaces().contains(keyspace)) throw new IllegalArgumentException("Keyspace [" + keyspace + "] does not exist."); } return Collections.unmodifiableList(keyspaces); }
filter.verifyKeyspaces(probe.getKeyspaces()); filter.verifyColumnFamilies();
filter.verifyKeyspaces(probe.getKeyspaces()); filter.verifyTables();
filter.verifyKeyspaces(probe.getKeyspaces()); filter.verifyTables();
filter.verifyKeyspaces(probe.getKeyspaces()); filter.verifyTables();