ctubbsii commented on issue #1764:
URL: https://github.com/apache/accumulo/issues/1764#issuecomment-722810021


   > I am uncertain if the stream will have the same order as the current 
iterator class, I am not sure if tservers will stay grouped together in output 
and if the age order created inside flatMap will be preserved.
   
   It looks like the order of this one will depend on which tservers respond 
first, but within a tserver, it looks like they'll still be grouped and ordered 
correctly within a tserver. They could be grouped and sorted by tserver with an 
intermediate multimap or something, though.
   
   While I don't think the flatMap will mess with the ordering, it does look 
like it will prevent parallelization, without using the collector strategy I 
mentioned above. Otherwise, the first item will call go through `map`, 
`flatMap`, `map`, `filter`, and `iterator` on the first call to `next` in the 
iterator... and the second one will wait until `next` is called again. This is 
what the collector strategy I posted above avoids... it ensures all of them are 
iterated, during the `collect` phase, and then operates on the collection with 
the `collectingAndThen` special-purpose collector.


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


Reply via email to