apache / fluo

Apache Fluo
https://fluo.apache.org
Apache License 2.0
188 stars 73 forks source link

Add scanner over multiple Spans #759

Open keith-turner opened 8 years ago

keith-turner commented 8 years ago

The original intent of #626 was to support fetching multiple Spans. This was not done because the result may not fit into memory. At the time when #626 was worked on the Scanner API was in a bad state. After the scanner the scanner API improvements in #639, it would be relatively easy to add multiple spans to the API. Could support something like the following.

Snapshot snap = ...
snap.scanner().over(span1, span2, span3).build();

Collection<Span> spans = ...
snap.scanner().over(spans).fetch(col1, col2).build()

Multiple spans may result in out of order key iteration.

jkosh44 commented 7 years ago

Is this still relevant? If so I'd like to give it a shot

keith-turner commented 7 years ago

@jkosh44 I am uncertain about this issue at the moment. There was the work done in #923 which should be considered. Also the scanner builder API has a byRow() method that would not make sense for multiple spans.

For the moment, I think many (but not all) of the use case for this are satisfied by the snap.get(Collection<RowColumn>) method. Also, I have been thinking about an asynchronous API that may be more convenient than this and some of the other get methods. I need to write that up.

keith-turner commented 7 years ago

@jkosh44 would you be interested in prototyping #967 ? Its very open ended, I am not even sure what the best way to implement it is. If you are interested I can post some notes on what I think may be a possible way to implement it, but I am not sure if it would work.

jkosh44 commented 7 years ago

I'd definitely be interested in giving it a shot.