accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [01/19] accumulo git commit: ACCUMULO-3979 make sure timers get stopped in the presence of exceptions
Date Wed, 02 Sep 2015 03:28:39 GMT
Repository: accumulo
Updated Branches:
  refs/heads/1.5 08b805bd9 -> c6aae57a4
  refs/heads/1.6 c767e1d9f -> 07ac4c85f
  refs/heads/1.7 9b3d7c1df -> 203300558
  refs/heads/master 9d25381b7 -> 5350dbc11


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.7
Commit: 08b805bd9eca422a1f0423dd5e1734b4321c4b0e
Parents: 5cd2063
Author: Eric C. Newton <eric.newton@gmail.com>
Authored: Fri Aug 28 15:14:07 2015 -0400
Committer: Eric C. Newton <eric.newton@gmail.com>
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;


Mime
View raw message