private static int getHeaderOrFooterCount(TableDesc table,
      String propertyName) {
    int count =
        Integer.parseInt(table.getProperties().getProperty(propertyName, "0"));
    if (count > 0 && table.getInputFileFormatClass() != null
        && !TextInputFormat.class
        .isAssignableFrom(table.getInputFileFormatClass())) {
      LOG.warn(propertyName
          + "  is only valid for TextInputFormat, ignoring the value.");
      count = 0;
    }
    return count;
  }
Get footer line count for a table.

@param table
         Table description for target table.

@param job
         Job configuration for current job.
ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java