accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject git commit: ACCUMULO-1809 parse short args and use reflection tricks to update counters
Date Wed, 23 Oct 2013 20:51:53 GMT
Updated Branches:
  refs/heads/1.5.1-SNAPSHOT b7786fccb -> a7e159219


ACCUMULO-1809 parse short args and use reflection tricks to update counters


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

Branch: refs/heads/1.5.1-SNAPSHOT
Commit: a7e159219a29ca6f127616fd965aa857900e3f9c
Parents: b7786fc
Author: Eric Newton <eric.newton@gmail.com>
Authored: Wed Oct 23 16:51:58 2013 -0400
Committer: Eric Newton <eric.newton@gmail.com>
Committed: Wed Oct 23 16:51:58 2013 -0400

----------------------------------------------------------------------
 .../org/apache/accumulo/test/continuous/ContinuousMoru.java   | 7 ++++---
 .../org/apache/accumulo/test/continuous/ContinuousVerify.java | 2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/a7e15921/test/src/main/java/org/apache/accumulo/test/continuous/ContinuousMoru.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/continuous/ContinuousMoru.java b/test/src/main/java/org/apache/accumulo/test/continuous/ContinuousMoru.java
index 7c4cb53..585dc90 100644
--- a/test/src/main/java/org/apache/accumulo/test/continuous/ContinuousMoru.java
+++ b/test/src/main/java/org/apache/accumulo/test/continuous/ContinuousMoru.java
@@ -32,6 +32,7 @@ import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.security.ColumnVisibility;
 import org.apache.accumulo.core.util.CachedConfiguration;
 import org.apache.accumulo.test.continuous.ContinuousIngest.BaseOpts;
+import org.apache.accumulo.test.continuous.ContinuousIngest.ShortConverter;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.conf.Configured;
 import org.apache.hadoop.io.Text;
@@ -108,16 +109,16 @@ public class ContinuousMoru extends Configured implements Tool {
         }
         
       } else {
-        context.getCounter(Counts.SELF_READ).increment(1);
+        ContinuousVerify.increment(context.getCounter(Counts.SELF_READ));
       }
     }
   }
   
   static class Opts extends BaseOpts {
-    @Parameter(names = "--maxColF", description = "maximum column family value to use")
+    @Parameter(names = "--maxColF", description = "maximum column family value to use", converter=ShortConverter.class)
     short maxColF = Short.MAX_VALUE;
     
-    @Parameter(names = "--maxColQ", description = "maximum column qualifier value to use")
+    @Parameter(names = "--maxColQ", description = "maximum column qualifier value to use",
converter=ShortConverter.class)
     short maxColQ = Short.MAX_VALUE;
     
     @Parameter(names = "--maxMappers", description = "the maximum number of mappers to use",
required = true, validateWith = PositiveInteger.class)

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a7e15921/test/src/main/java/org/apache/accumulo/test/continuous/ContinuousVerify.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/continuous/ContinuousVerify.java
b/test/src/main/java/org/apache/accumulo/test/continuous/ContinuousVerify.java
index e232de6..1ace774 100644
--- a/test/src/main/java/org/apache/accumulo/test/continuous/ContinuousVerify.java
+++ b/test/src/main/java/org/apache/accumulo/test/continuous/ContinuousVerify.java
@@ -64,7 +64,7 @@ public class ContinuousVerify extends Configured implements Tool {
     }
   }
   
-  private static void increment(Object obj) {
+  static void increment(Object obj) {
     try {
       INCREMENT.invoke(obj, 1L);
     } catch (Exception ex) {


Mime
View raw message