@Test public void testSchemaDifference() { Schema first = new Schema(ImmutableSet.of(kt1, kt2)); Schema second = new Schema(ImmutableSet.of(kt2, kt3)); Pair<Set<KeyspaceTablePair>, Set<KeyspaceTablePair>> difference = Schema.difference(first, second); Assert.assertTrue("Should contain the distinct table in first schema", difference.getLeft().contains(kt1)); Assert.assertTrue("Should contain the distinct table in second schema", difference.getRight().contains(kt3)); }
public static Pair<Set<KeyspaceTablePair>, Set<KeyspaceTablePair>> difference(Schema first, Schema second) { return Pair.of(Sets.difference(first.qualifiedTables, second.qualifiedTables), Sets.difference(second.qualifiedTables, first.qualifiedTables)); }
Schema { public static Pair<Set<KeyspaceTablePair>, Set<KeyspaceTablePair>> difference(Schema first, Schema second) { return Pair.of(Sets.difference(first.qualifiedTables, second.qualifiedTables), Sets.difference(second.qualifiedTables, first.qualifiedTables)); } }
Schema { public static Pair<Set<KeyspaceTablePair>, Set<KeyspaceTablePair>> difference(Schema first, Schema second) { return Pair.of(Sets.difference(first.qualifiedTables, second.qualifiedTables), Sets.difference(second.qualifiedTables, first.qualifiedTables)); } Schema(Metadata metadata, JobConfiguration configuration);  Schema(Set<KeyspaceTablePair> qualifiedTables); }
Schema { public static Pair<Set<KeyspaceTablePair>, Set<KeyspaceTablePair>> difference(Schema first, Schema second) { return Pair.of(Sets.difference(first.qualifiedTables, second.qualifiedTables), Sets.difference(second.qualifiedTables, first.qualifiedTables)); } Schema(Metadata metadata, JobConfiguration configuration);  Schema(Set<KeyspaceTablePair> qualifiedTables); Schema intersect(Schema other); List<KeyspaceTablePair> toQualifiedTableList(); int size(); @VisibleForTesting static Set<String> getKeyspaceFilter(JobConfiguration configuration); static Pair<Set<KeyspaceTablePair>, Set<KeyspaceTablePair>> difference(Schema first, Schema second); }
Schema { public static Pair<Set<KeyspaceTablePair>, Set<KeyspaceTablePair>> difference(Schema first, Schema second) { return Pair.of(Sets.difference(first.qualifiedTables, second.qualifiedTables), Sets.difference(second.qualifiedTables, first.qualifiedTables)); } Schema(Metadata metadata, JobConfiguration configuration);  Schema(Set<KeyspaceTablePair> qualifiedTables); Schema intersect(Schema other); List<KeyspaceTablePair> toQualifiedTableList(); int size(); @VisibleForTesting static Set<String> getKeyspaceFilter(JobConfiguration configuration); static Pair<Set<KeyspaceTablePair>, Set<KeyspaceTablePair>> difference(Schema first, Schema second);  }