Dan Burkert has posted comments on this change.
Change subject: feat: add the wrapper for the Iterator by using
InterruptibleIterator
......................................................................
Patch Set 2:
What I had in mind was something like this:
override def hasNext: Boolean = {
while ((currentIterator != null && !currentIterator.hasNext &&
scanner.hasMoreRows) ||
(scanner.hasMoreRows && currentIterator == null)) {
if (TaskContext.get().isInterrupted()) {
throw new RuntimeException("KuduRDD task interrupted")
}
currentIterator = scanner.nextRows()
}
currentIterator.hasNext
}
--
To view, visit http://gerrit.cloudera.org:8080/7753
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I0b4284f2c0a40cd7ba8cf2b76e0403592552c814
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: caiconghui <[email protected]>
Gerrit-Reviewer: Dan Burkert <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <[email protected]>
Gerrit-Reviewer: caiconghui <[email protected]>
Gerrit-HasComments: No