public synchronized void setLineage(Path dir, DataContainer dc,
      List<FieldSchema> cols) {
    // First lookup the file sink operator from the load work.
    Operator<?> op = dirToFop.get(dir.toUri().toString());

    // Go over the associated fields and look up the dependencies
    // by position in the row schema of the filesink operator.
    if (op == null) {
      return;
    }

    List<ColumnInfo> signature = op.getSchema().getSignature();
    int i = 0;
    for (FieldSchema fs : cols) {
      linfo.putDependency(dc, fs, index.getDependency(op, signature.get(i++)));
    }
  }
Set the lineage information for the associated directory.

@param dir The directory containing the query results.
@param dc The associated data container.
@param cols The list of columns.
ql/src/java/org/apache/hadoop/hive/ql/session/LineageState.java