public void consume(long position, long sectionEnd) {
      if (position > sectionEnd) {
        return;
      }
      if (position < lowPosition) {
        remainingLineEnds -= queue.size();
        queue.clear();
        queue.add(position);
        lowPosition = position;
      } else if (position > lowPosition) {
        if (queue.size() == remainingLineEnds) {
          queue.poll();
        }
        queue.add(position);
        lowPosition = queue.peek();
      }
    }
SkippingInputFormat is a header/footer aware input format. It truncates
splits identified by TextInputFormat. Header and footers are removed
from the splits.

This InputFormat does NOT support Compressed Files!
ql/src/java/org/apache/hadoop/hive/ql/io/SkippingTextInputFormat.java