basho/riak_core — pull request #290 by jrwest (2013-04-01 21:38:23+00:00)
Title: Add support for tracking progress of individual handoffs

Vnodes can optionally provide the size of their data (in bytes or # of objects/keys) when returning from `is_empty/1` (the original API is also preserved). The size returned should be considered an upper-bound on the amount of bytes/objects that may be sent during handoff. For vnodes whose size may change during handoff (e.g. a non read-isolated iterator in riak_kv like ets) a function may be provided instead. The function is called to calculate the size of the vnode each time transfer stats are requested from the handoff manager. The provided size as well as the existing handoff stats are used to calculate completion percentage.

This PR also moves the `transfers/1` console function from `riak_kv_console` to `riak_core_console`. It is not specific to kv and other applications should be able to take advantage of it. In addition, `transfers/1` now prints completion percentage w/ progress bar
and can optionally take a number of seconds, N, and a maximum, M. The output
is printed every N seconds a total of M times. If M is not given or is not a number
the output will be printed every N seconds until CTRL+C is pressed or the nodetool timeout is reached. If N is not a number it is ignored.