DomGarguilo commented on code in PR #4160:
URL: https://github.com/apache/accumulo/pull/4160#discussion_r1462308596


##########
core/src/main/java/org/apache/accumulo/core/fate/accumulo/FateMutatorImpl.java:
##########
@@ -132,12 +140,30 @@ public FateMutator<T> delete() {
     return this;
   }
 
+  /**
+   * Require that the transaction status is one of the given statuses. If no 
statuses are provided,
+   * require that the status column is absent.
+   *
+   * @param statuses The statuses to check against.
+   */
+  public FateMutator<T> requireStatus(TStatus... statuses) {
+    Condition condition = StatusMappingIterator.createCondition(statuses);
+    mutation.addCondition(condition);
+    return this;
+  }
+
   @Override
   public void mutate() {
-    try (BatchWriter writer = context.createBatchWriter(tableName)) {
-      writer.addMutation(mutation);
-    } catch (Exception e) {
-      throw new IllegalStateException(e);
+    try (ConditionalWriter writer = 
context.createConditionalWriter(tableName)) {

Review Comment:
   Fixed in d8a3a05



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to