EdColeman commented on a change in pull request #2021:
URL: https://github.com/apache/accumulo/pull/2021#discussion_r613528941
##########
File path: core/src/main/java/org/apache/accumulo/core/client/admin/FindMax.java
##########
@@ -118,27 +118,26 @@ private static Text _findMax(Scanner scanner, Text start,
boolean inclStart, Tex
Iterator<Entry<Key,Value>> iter = scanner.iterator();
- if (iter.hasNext()) {
- Key next = iter.next().getKey();
+ if (!iter.hasNext()) {
- int count = 0;
- while (count < 10 && iter.hasNext()) {
- next = iter.next().getKey();
- count++;
- }
+ return _findMax(scanner, start, inclStart, mid, mid.equals(start) ?
inclStart : false);
+ }
+ Key next = iter.next().getKey();
Review comment:
was this an auto suggestion? With a quick glance its hard to convince
myself this is equivalent - mainly is there a side-effect of calling
iter.hasNext up to 10 times
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]