Tagsets { Deferred<Integer> getTagsetID(SortedMap<String, String> tagset) { return tagsets.getUnchecked(new SerializedTagset(tagset)); } Tagsets(AsyncKuduClient client, Tags tags, KuduTable tagsetsTable);   }
@Test(timeout = 10000) public void testEmptyTagsetLookup() throws Exception { try (KuduTS ts = KuduTS.openOrCreate(ImmutableList.of(masterAddresses), "testEmptyTagsetLookup", CreateOptions.defaults())) { Tagsets tagsets = ts.getTagsets(); int id = tagsets.getTagsetID(ImmutableSortedMap.<String, String>of()).join(); assertEquals(0, id); } }
@Test(timeout = 10000) public void testOverlappingTagsets() throws Exception { try (KuduTS ts = KuduTS.openOrCreate(ImmutableList.of(masterAddresses), "testOverlappingTagsets", CreateOptions.defaults())) { Tagsets tagsets = ts.getTagsets(); int id1 = tagsets.getTagsetID(ImmutableSortedMap.of("k1", "v1")).join(); int id2 = tagsets.getTagsetID(ImmutableSortedMap.of("k2", "v2")).join(); int id3 = tagsets.getTagsetID(ImmutableSortedMap.of("k1", "v1", "k2", "v2", "k3", "v3")).join(); int id4 = tagsets.getTagsetID(ImmutableSortedMap.of("k1", "v2")).join(); int id5 = tagsets.getTagsetID(ImmutableSortedMap.of("k2", "v1")).join(); int id6 = tagsets.getTagsetID(ImmutableSortedMap.<String, String>of()).join(); assertEquals(6, ImmutableSet.of(id1, id2, id3, id4, id5, id6).size()); } }