accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject git commit: ACCUMULO-2729 check conditional mutation status in RW test
Date Thu, 24 Apr 2014 00:53:58 GMT
Repository: accumulo
Updated Branches:
  refs/heads/1.6.0-SNAPSHOT 0d10bda87 -> fac91d3b9


ACCUMULO-2729 check conditional mutation status in RW test


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: fac91d3b97121096199248fe085133bf590983b3
Parents: 0d10bda
Author: Keith Turner <kturner@apache.org>
Authored: Wed Apr 23 20:54:54 2014 -0400
Committer: Keith Turner <kturner@apache.org>
Committed: Wed Apr 23 20:55:47 2014 -0400

----------------------------------------------------------------------
 .../apache/accumulo/test/randomwalk/conditional/Init.java | 10 ++++++++--
 .../accumulo/test/randomwalk/conditional/Transfer.java    |  4 ++++
 2 files changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/fac91d3b/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Init.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Init.java
b/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Init.java
index 28f1fd8..b89d315 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Init.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Init.java
@@ -77,8 +77,14 @@ public class Init extends Test {
         }
 
       }
-      if (m.getConditions().size() > 0)
-        cw.write(m);
+      if (m.getConditions().size() > 0){
+        Status status = cw.write(m).getStatus();
+        while(status == Status.UNKNOWN)
+          status = cw.write(m).getStatus();
+        
+        if (status == Status.ACCEPTED)
+          acceptedCount++;
+      }
 
       log.debug("Added bank " + Utils.getBank(i) + " " + acceptedCount);
     }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/fac91d3b/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Transfer.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Transfer.java
b/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Transfer.java
index 93f0d55..91d456f 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Transfer.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Transfer.java
@@ -122,6 +122,10 @@ public class Transfer extends Test {
 
       ConditionalWriter cw = (ConditionalWriter) state.get("cw");
       Status status = cw.write(cm).getStatus();
+      while(status == Status.UNKNOWN){
+        log.debug("retrying transfer "+status);
+        status = cw.write(cm).getStatus();
+      }
       log.debug("transfer result " + bank + " " + status + " " + a1 + " " + a2);
     }
 


Mime
View raw message