This is an automated email from the ASF dual-hosted git repository. mwalch pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/master by this push: new 7c88356 Fix BulkFileIT (#971) 7c88356 is described below commit 7c883560d4c269a51eac1320f88dc647a98190cd Author: Mike Walch <mwa...@apache.org> AuthorDate: Tue Feb 19 18:10:11 2019 -0500 Fix BulkFileIT (#971) * Added future get() calls * Future should not return failures --- .../apache/accumulo/master/tableOps/bulkVer1/LoadFiles.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/bulkVer1/LoadFiles.java b/server/master/src/main/java/org/apache/accumulo/master/tableOps/bulkVer1/LoadFiles.java index 21557d1..c31b98d 100644 --- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/bulkVer1/LoadFiles.java +++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/bulkVer1/LoadFiles.java @@ -126,7 +126,7 @@ class LoadFiles extends MasterRepo { final int RETRIES = Math.max(1, conf.getCount(Property.MASTER_BULK_RETRIES)); for (int attempt = 0; attempt < RETRIES && filesToLoad.size() > 0; attempt++) { - List<Future<List<String>>> results = new ArrayList<>(); + List<Future<Void>> results = new ArrayList<>(); if (master.onlineTabletServers().size() == 0) log.warn("There are no tablet server to process bulk import, waiting (tid = " + tid + ")"); @@ -159,7 +159,6 @@ class LoadFiles extends MasterRepo { if (servers.length > 0) { for (final String file : filesToLoad) { results.add(executor.submit(() -> { - List<String> failures = new ArrayList<>(); ClientService.Client client = null; HostAndPort server = null; try { @@ -177,18 +176,19 @@ class LoadFiles extends MasterRepo { setTime); if (fail.isEmpty()) { loaded.add(file); - } else { - failures.addAll(fail); } } catch (Exception ex) { log.error("rpc failed server:" + server + ", tid:" + tid + " " + ex); } finally { ThriftUtil.returnClient(client); } - return failures; + return null; })); } } + for (Future<Void> f : results) { + f.get(); + } filesToLoad.removeAll(loaded); if (filesToLoad.size() > 0) { log.debug("tid " + tid + " attempt " + (attempt + 1) + " " + sampleList(filesToLoad, 10)