code: public static void setRequiredFieldConf(Configuration conf,
                                            RequiredFieldList requiredFieldList) {
  
      // set required fields conf for RCFile[Protobuf|Thrift] input format
      String value = "";
      
      if (requiredFieldList != null) {
        List<Integer> indices = Lists.newArrayList();
        for(RequiredField f : requiredFieldList.getFields()) {
          indices.add(f.getIndex());
        }
  
        value = Joiner.on(",").join(indices);
      }
      
      conf.set(RCFileUtil.REQUIRED_FIELD_INDICES_CONF, value);
    }
docs: Sets {@link #REQUIRED_FIELD_INDICES_CONF} to list of indices
  if requiredFieldList is not null.