Repository: accumulo Updated Branches: refs/heads/1.5 5cd2063db -> 08b805bd9
ACCUMULO-3979 make sure timers get stopped in the presence of exceptions Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/08b805bd Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/08b805bd Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/08b805bd Branch: refs/heads/1.5 Commit: 08b805bd9eca422a1f0423dd5e1734b4321c4b0e Parents: 5cd2063 Author: Eric C. Newton <[email protected]> Authored: Fri Aug 28 15:14:07 2015 -0400 Committer: Eric C. Newton <[email protected]> Committed: Fri Aug 28 15:14:07 2015 -0400 ---------------------------------------------------------------------- .../org/apache/accumulo/server/client/BulkImporter.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/08b805bd/server/src/main/java/org/apache/accumulo/server/client/BulkImporter.java ---------------------------------------------------------------------- diff --git a/server/src/main/java/org/apache/accumulo/server/client/BulkImporter.java b/server/src/main/java/org/apache/accumulo/server/client/BulkImporter.java index 0f89e73..a68b9ec 100644 --- a/server/src/main/java/org/apache/accumulo/server/client/BulkImporter.java +++ b/server/src/main/java/org/apache/accumulo/server/client/BulkImporter.java @@ -143,6 +143,7 @@ public class BulkImporter { for (Path path : paths) { final Path mapFile = path; Runnable getAssignments = new Runnable() { + @Override public void run() { List<TabletLocation> tabletsToAssignMapFileTo = Collections.emptyList(); try { @@ -207,14 +208,14 @@ public class BulkImporter { while (keListIter.hasNext()) { KeyExtent ke = keListIter.next(); + timer.start(Timers.QUERY_METADATA); try { - timer.start(Timers.QUERY_METADATA); tabletsToAssignMapFileTo.addAll(findOverlappingTablets(instance.getConfiguration(), fs, locator, entry.getKey(), ke, credentials)); - timer.stop(Timers.QUERY_METADATA); keListIter.remove(); } catch (Exception ex) { log.warn("Exception finding overlapping tablets, will retry tablet " + ke); } + timer.stop(Timers.QUERY_METADATA); } if (tabletsToAssignMapFileTo.size() > 0) @@ -361,6 +362,7 @@ public class BulkImporter { } Runnable estimationTask = new Runnable() { + @Override public void run() { Map<KeyExtent,Long> estimatedSizes = null; @@ -466,6 +468,7 @@ public class BulkImporter { } } + @Override public void run() { HashSet<Path> uniqMapFiles = new HashSet<Path>(); for (List<PathSize> mapFiles : assignmentsPerTablet.values()) @@ -495,6 +498,7 @@ public class BulkImporter { Path path; long estSize; + @Override public String toString() { return path + " " + estSize; } @@ -729,6 +733,7 @@ public class BulkImporter { this.failedFailures = failedFailures; } + @Override public String toString() { StringBuilder sb = new StringBuilder(); int totalAssignments = 0;
