ctubbsii commented on a change in pull request #2347:
URL: https://github.com/apache/accumulo/pull/2347#discussion_r745063876



##########
File path: 
core/src/main/java/org/apache/accumulo/core/iteratorsImpl/system/SortedMapIterator.java
##########
@@ -121,4 +143,9 @@ public void init(SortedKeyValueIterator<Key,Value> source, 
Map<String,String> op
       IteratorEnvironment env) throws IOException {
     throw new UnsupportedOperationException();
   }
+
+  @Override
+  public void setInterruptFlag(AtomicBoolean flag) {
+    this.interruptFlag = flag;
+  }

Review comment:
       My suggestion would be to use BooleanSupplier in the 
InterruptibleIterator interface, and call 
`setInterruptFlag(interruptFlag::get)` (where `interruptFlag` in the caller is 
a final of type `AtomicBoolean`). That would remove any confusion over implied 
atomicity guarantees inside the InterruptibleIterator interface, but wouldn't 
change any behavior. But, obviously, that would be a follow-on issue. It need 
not be done as part of this PR.




-- 
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