EdColeman commented on code in PR #2790:
URL: https://github.com/apache/accumulo/pull/2790#discussion_r908922561
##########
server/tserver/src/main/java/org/apache/accumulo/tserver/scan/LookupTask.java:
##########
@@ -87,23 +85,23 @@ public void run() {
Key partNextKey = null;
boolean partNextKeyInclusive = false;
- Iterator<Entry<KeyExtent,List<Range>>> iter =
session.queries.entrySet().iterator();
+ // Iterator<Entry<KeyExtent,List<Range>>> iter =
session.queries.entrySet().iterator();
+ log.error("number of extents: " + session.queries.size() + " -- " +
session.queries.keySet());
Review Comment:
Is this an error? If so, could the message also include what the error /
issue is?
##########
server/tserver/src/main/java/org/apache/accumulo/tserver/scan/LookupTask.java:
##########
@@ -87,23 +85,23 @@ public void run() {
Key partNextKey = null;
boolean partNextKeyInclusive = false;
- Iterator<Entry<KeyExtent,List<Range>>> iter =
session.queries.entrySet().iterator();
+ // Iterator<Entry<KeyExtent,List<Range>>> iter =
session.queries.entrySet().iterator();
+ log.error("number of extents: " + session.queries.size() + " -- " +
session.queries.keySet());
// check the time so that the read ahead thread is not monopolized
- while (iter.hasNext() && bytesAdded < maxResultsSize
+ while (!session.queries.isEmpty() && bytesAdded < maxResultsSize
&& (System.currentTimeMillis() - startTime) < maxScanTime) {
- Entry<KeyExtent,List<Range>> entry = iter.next();
-
- iter.remove();
+ KeyExtent extent = session.queries.keySet().iterator().next();
Review Comment:
Question: Does this really walk the iterator - or is it always returning the
first entry pointed at by the iterator?
--
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]