batch_size for multi_get #131

Closed
wants to merge 14 commits into
from

Conversation

Projects
None yet
3 participants

FewKinG commented Nov 16, 2011

Hey there,

I found it nice to have a :batch_size option also for the multi_get method.
If you are working with large rows with many columns or super columns you might get into trouble fetching those with multi_get.

The :batch_size option sets a limit to how many columns are fetched per key in a single query and like the get_range_batch method loops until all possible columns or at least :count columns have been optained.

However, due to the fact, that always up to :batch_size columns are fetched per query and key, you might get back up to :batch_size * num_keys - 1 more columns than you specified with :count.

I've done only minimal testing to this feature and cannot guarantee that it always works as it should. But I want it to share, so others might use it as well.

Greetings,
FewKinG.

Contributor

rwjblue commented Nov 16, 2011

This looks conceptually similar to get_range, get_range_single, and get_range_batch. Would it be possible to structure it the same way? So that a call to multi_get would either call multi_get_single or multi_get_batch based on whether or not a :batch_size was passed. That would keep the external API basically the same (with an extra option), and still allow a lot of flexibility.

Could you add some test coverage for the usual scenarios, update the CHANGELOG, and add information to the README?

FewKinG commented Nov 16, 2011

Yeah I'll structure it the same way. Basically that will just require some of the code in multi_get being transfered to a multi_get_single method as the multi_get method already allows the :batch_size option and calls the multi_get_batch in the proper case.

I will also write tests for it as soon as I have some time for that, maybe this evening.

Member

psanford commented Jan 20, 2014

Closing due to lack of interest. We can reopen if someone wants to clean this up.

@psanford psanford closed this Jan 20, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment