[accumulo] 01/01: Merge branch '2.1'

2023-08-01 Thread ctubbsii
This is an automated email from the ASF dual-hosted git repository.

ctubbsii pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git

commit b217d892cddd05577597decad52d3a5074dfa7a7
Merge: 4ec6dd2054 43df0b1db4
Author: Christopher Tubbs 
AuthorDate: Tue Aug 1 23:10:20 2023 -0400

Merge branch '2.1'




[accumulo] branch main updated (4ec6dd2054 -> b217d892cd)

2023-08-01 Thread ctubbsii
This is an automated email from the ASF dual-hosted git repository.

ctubbsii pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git


from 4ec6dd2054 Merge remote-tracking branch 'upstream/2.1'
 add 43df0b1db4 adds bulk import v1 to ScanConsistencyIT (#3672)
 new b217d892cd Merge branch '2.1'

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:



[accumulo] branch 2.1 updated: adds bulk import v1 to ScanConsistencyIT (#3672)

2023-08-01 Thread ctubbsii
This is an automated email from the ASF dual-hosted git repository.

ctubbsii pushed a commit to branch 2.1
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/2.1 by this push:
 new 43df0b1db4 adds bulk import v1 to ScanConsistencyIT (#3672)
43df0b1db4 is described below

commit 43df0b1db435dd9d3a741608088f1614feda0046
Author: Keith Turner 
AuthorDate: Tue Aug 1 23:08:53 2023 -0400

adds bulk import v1 to ScanConsistencyIT (#3672)
---
 .../org/apache/accumulo/test/ScanConsistencyIT.java | 21 ++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/test/src/main/java/org/apache/accumulo/test/ScanConsistencyIT.java 
b/test/src/main/java/org/apache/accumulo/test/ScanConsistencyIT.java
index bdf67a2e4c..752d7c6a79 100644
--- a/test/src/main/java/org/apache/accumulo/test/ScanConsistencyIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/ScanConsistencyIT.java
@@ -445,13 +445,16 @@ public class ScanConsistencyIT extends 
AccumuloClusterHarness {
   this.tctx = testContext;
 }
 
+@SuppressWarnings("deprecation")
 private long bulkImport(Random random, Collection mutations) 
throws Exception {
 
   if (mutations.isEmpty()) {
 return 0;
   }
 
-  Path bulkDir = new Path(tctx.tmpDir + "/bulkimport_" + 
nextLongAbs(random));
+  String name = "/bulkimport_" + nextLongAbs(random);
+  Path bulkDir = new Path(tctx.tmpDir + name);
+  Path failDir = new Path(tctx.tmpDir + name + "_failures");
 
   List keys = 
mutations.stream().flatMap(ScanConsistencyIT::toKeys).sorted()
   .collect(Collectors.toList());
@@ -467,10 +470,22 @@ public class ScanConsistencyIT extends 
AccumuloClusterHarness {
   }
 }
 
-
tctx.client.tableOperations().importDirectory(bulkDir.toString()).to(tctx.table)
-.tableTime(true).load();
+if (random.nextBoolean()) {
+  // use bulk import v1
+  tctx.fileSystem.mkdirs(failDir);
+  tctx.client.tableOperations().importDirectory(tctx.table, 
bulkDir.toString(),
+  failDir.toString(), true);
+  assertEquals(0, tctx.fileSystem.listStatus(failDir).length,
+  "Failure dir was not empty " + failDir);
+} else {
+  // use bulk import v2
+  
tctx.client.tableOperations().importDirectory(bulkDir.toString()).to(tctx.table)
+  .tableTime(true).load();
+}
+
   } finally {
 tctx.fileSystem.delete(bulkDir, true);
+tctx.fileSystem.delete(failDir, true);
   }
 
   return keys.size();