Repository: accumulo Updated Branches: refs/heads/master c8a63a292 -> efbb394b7
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/d97ff3dc Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/d97ff3dc Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/d97ff3dc Branch: refs/heads/master Commit: d97ff3dc4c620f8c1f2088d7a5a779575da6ca87 Parents: c8a63a2 Author: Eric C. Newton <[email protected]> Authored: Fri Aug 28 15:10:34 2015 -0400 Committer: Eric C. Newton <[email protected]> Committed: Fri Aug 28 15:10:34 2015 -0400 ---------------------------------------------------------------------- .../org/apache/accumulo/server/client/BulkImporter.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/d97ff3dc/server/base/src/main/java/org/apache/accumulo/server/client/BulkImporter.java ---------------------------------------------------------------------- diff --git a/server/base/src/main/java/org/apache/accumulo/server/client/BulkImporter.java b/server/base/src/main/java/org/apache/accumulo/server/client/BulkImporter.java index 39ea0da..f9d6930 100644 --- a/server/base/src/main/java/org/apache/accumulo/server/client/BulkImporter.java +++ b/server/base/src/main/java/org/apache/accumulo/server/client/BulkImporter.java @@ -16,6 +16,8 @@ */ package org.apache.accumulo.server.client; +import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly; + import java.io.IOException; import java.util.ArrayList; import java.util.Collection; @@ -72,7 +74,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.google.common.net.HostAndPort; -import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly; public class BulkImporter { @@ -203,14 +204,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(context, fs, locator, entry.getKey(), ke)); - timer.stop(Timers.QUERY_METADATA); keListIter.remove(); } catch (Exception ex) { log.warn("Exception finding overlapping tablets, will retry tablet " + ke, ex); } + timer.stop(Timers.QUERY_METADATA); } if (tabletsToAssignMapFileTo.size() > 0) @@ -254,13 +255,13 @@ public class BulkImporter { Set<Path> failedFailures = processFailures(completeFailures); assignmentStats.unrecoveredMapFiles(failedFailures); - timer.stop(Timers.TOTAL); printReport(paths); return assignmentStats; } finally { if (client != null) { ServerClient.close(client); } + timer.stop(Timers.TOTAL); } }
