YamlJobConfiguration implements JobConfiguration { public static YamlJobConfiguration load(InputStream inputStream) { Yaml yaml = new Yaml(new CustomClassLoaderConstructor(YamlJobConfiguration.class, Thread.currentThread().getContextClassLoader())); return yaml.loadAs(inputStream, YamlJobConfiguration.class); }  static YamlJobConfiguration load(InputStream inputStream); List<KeyspaceTablePair> keyspaceTables(); List<String> disallowedKeyspaces(); int splits(); int buckets(); int rateLimit(); Optional<UUID> jobId(); int tokenScanFetchSize(); int partitionReadFetchSize(); int readTimeoutMillis(); double reverseReadProbability(); String consistencyLevel(); MetadataKeyspaceOptions metadataOptions(); RetryOptions retryOptions(); Map<String, String> clusterConfig(String identifier); SpecificTokens specificTokens(); String toString(); public int splits; public List<KeyspaceTablePair> keyspace_tables; public List<String> disallowed_keyspaces; public int buckets; public int rate_limit; public String job_id; public int token_scan_fetch_size; public int partition_read_fetch_size; public int read_timeout_millis; public double reverse_read_probability; public String consistency_level; public MetadataKeyspaceOptions metadata_options; public Map<String, Map<String, String>> cluster_config; public String specific_tokens; public String disallowed_tokens; public RetryOptions retry_options; }
@Test public void testLoadYamlFilterOutDisallowedKeyspaces() { JobConfiguration jobConfiguration = load("test_load_config_all_keyspaces_filtered_out.yaml"); Assert.assertNotNull(jobConfiguration.filteredKeyspaceTables()); Assert.assertTrue("All tables should be filtered out", jobConfiguration.filteredKeyspaceTables().isEmpty()); Assert.assertFalse("It should not be in the discover mode", jobConfiguration.shouldAutoDiscoverTables()); }