If you dont need line by line but you want to get a number of linestogether, use NLineInputFormat. If you dont want to split at all, overrideisSplitable in FileInputFormat. Or you can use FileInputFormat, get eachline as key/value and compute over it, saving the results and emitting onlyas necessary.