private boolean skipHeader(int headerCount, LongWritable key, Text value) throws IOException {
    while (headerCount > 0) {
      if (!super.next(key, value)) {
        return false;
      }
      headerCount--;
    }
    return true;
  }
When file doesn't end after skipping header line
and there IS footer lines, update footerBuffer
ql/src/java/org/apache/hadoop/hive/ql/io/RecordReaderWrapper.java