DomGarguilo commented on code in PR #3824:
URL: https://github.com/apache/accumulo/pull/3824#discussion_r1348985313


##########
test/src/main/java/org/apache/accumulo/test/SampleIT.java:
##########
@@ -120,8 +125,69 @@ public void init(SortedKeyValueIterator<Key,Value> source, 
Map<String,String> op
     }
   }
 
+  @Test
+  public void testSampleFencing() throws Exception {
+
+    try (AccumuloClient client = 
Accumulo.newClient().from(getClientProps()).build()) {
+      String tableName = getUniqueNames(1)[0];
+      String clone = tableName + "_clone";
+
+      client.tableOperations().create(tableName, new 
NewTableConfiguration().enableSampling(SC1));
+
+      BatchWriter bw = client.createBatchWriter(tableName);
+
+      TreeMap<Key,Value> expected = new TreeMap<>();
+      writeData(bw, SC1, expected);
+      assertEquals(20, expected.size());
+
+      Scanner scanner = client.createScanner(tableName, Authorizations.EMPTY);
+      Scanner isoScanner =
+          new IsolatedScanner(client.createScanner(tableName, 
Authorizations.EMPTY));
+      Scanner csiScanner =
+          new ClientSideIteratorScanner(client.createScanner(tableName, 
Authorizations.EMPTY));

Review Comment:
   Haven't looked too deeply into these changes yet but one small things I saw 
was it might be good to add all these scanners and writers to 
try-with-resources blocks.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to