code: public void configFields(Configuration conf, String[] fields) 
              throws IllegalArgumentException, IOException {
          for (int i = 0; i < fields.length; i++) {
              fields[i] = fields[i].trim();
              if ("".equals(fields[i])) {
                  LOG.warn("Column " + (i+1) + " has no header and will be skipped");
              }
          }
      }
docs: Check document header fields.
  @param fields
  @throws IOException