Corresponds to a Cascading Buffer which allows you to stream through the data, keeping some, dropping, scanning, etc.
Corresponds to a Cascading Buffer which allows you to stream through the data, keeping some, dropping, scanning, etc... The iterator you are passed is lazy, and mapping will not trigger the entire evaluation. If you convert to a list (i.e. to reverse), you need to be aware that memory constraints may become an issue.
WARNING: Any fields not referenced by the input fields will be aligned to the first output, and the final hadoop stream will have a length of the maximum of the output of this, and the input stream. So, if you change the length of your inputs, the other fields won't be aligned. YOU NEED TO INCLUDE ALL THE FIELDS YOU WANT TO KEEP ALIGNED IN THIS MAPPING! POB: This appears to be a Cascading design decision.
WARNING: mapfn needs to be stateless. Multiple calls needs to be safe (no mutable state captured)
Remove the first cnt elements
Drop while the predicate is true, starting at the first false, output all
Only keep the first cnt elements
Take while the predicate is true, stopping at the first false.
Take while the predicate is true, stopping at the first false. Output all taken elements.
Implements reductions on top of a simple abstraction for the Fields-API We use the f-bounded polymorphism trick to return the type called Self in each operation.