examples: Modify the examples to avoid reading the whole input at once.

This will let the map job operate on the inputs that are larger than the
physical memory.