Repository: accumulo
Updated Branches:
  refs/heads/master f1523abd5 -> 24ee37f90


ACCUMULO-4123 increment the counters properly


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/24ee37f9
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/24ee37f9
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/24ee37f9

Branch: refs/heads/master
Commit: 24ee37f90417b88f791c1d3b395cc8ad479e01ba
Parents: f1523ab
Author: Eric C. Newton <eric.new...@gmail.com>
Authored: Tue Feb 2 10:39:29 2016 -0500
Committer: Eric C. Newton <eric.new...@gmail.com>
Committed: Tue Feb 2 10:39:29 2016 -0500

----------------------------------------------------------------------
 .../apache/accumulo/test/mrit/IntegrationTestMapReduce.java    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/24ee37f9/test/src/main/java/org/apache/accumulo/test/mrit/IntegrationTestMapReduce.java
----------------------------------------------------------------------
diff --git 
a/test/src/main/java/org/apache/accumulo/test/mrit/IntegrationTestMapReduce.java
 
b/test/src/main/java/org/apache/accumulo/test/mrit/IntegrationTestMapReduce.java
index 62b82c9..ee8d7b3 100644
--- 
a/test/src/main/java/org/apache/accumulo/test/mrit/IntegrationTestMapReduce.java
+++ 
b/test/src/main/java/org/apache/accumulo/test/mrit/IntegrationTestMapReduce.java
@@ -103,7 +103,7 @@ public class IntegrationTestMapReduce extends Configured 
implements Tool {
         test = Class.forName(className);
       } catch (ClassNotFoundException e) {
         log.debug("Error finding class {}", className, e);
-        context.getCounter(TestCounts.ERROR);
+        context.getCounter(TestCounts.ERROR).increment(1);
         context.write(ERROR, new Text(e.toString()));
         return;
       }
@@ -136,11 +136,11 @@ public class IntegrationTestMapReduce extends Configured 
implements Tool {
         Result result = core.run(test);
         if (result.wasSuccessful()) {
           log.info("{} was successful", className);
-          context.getCounter(TestCounts.PASS);
+          context.getCounter(TestCounts.PASS).increment(1);
           context.write(PASS, value);
         } else {
           log.info("{} failed", className);
-          context.getCounter(TestCounts.FAIL);
+          context.getCounter(TestCounts.FAIL).increment(1);
           context.write(FAIL, new Text(className + "(" + 
StringUtils.join(failures, ", ") + ")"));
         }
       } catch (Exception e) {

Reply via email to