tolitius / cbass

adding "simple" to HBase
Eclipse Public License 1.0
24 stars 11 forks source link

Added a scan that returns a seq. #4

Closed chrishowejones closed 8 years ago

chrishowejones commented 8 years ago

I've added a version of scan that returns a lazy sequence of vectors instead of a map. Coercing the results into a map using into forces the whole result set to be realised in memory leading to out of memory errors.

This abstraction of a sequence of vectors makes more sense to me for a scan. A map is great when you want to access the results by key, however a scan tends to return results when you don't know the row keys and therefore a map is not actually as useful as a sequence of vectors. With a sequence of vectors per row you can map over the sequence to carry out actions which in my opinion is more useful.