billoley commented on code in PR #2790:
URL: https://github.com/apache/accumulo/pull/2790#discussion_r910231474


##########
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:
   Was just trying to get the first element, not iterating.  In any case, I 
modified the code to use a LinkedList.



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