/** * Puts the dependency for a table, column tuple. * @param dc The datacontainer whose dependency is being inserted. * @param col The column whose dependency is being inserted. * @param dep The dependency. */ public void putDependency(DataContainer dc, FieldSchema col, Dependency dep) { index.put(new DependencyKey(dc, col), dep); }
if (depK.getDataContainer().isPartition()) { Partition part = depK.getDataContainer().getPartition(); sb.append(part.getTableName()); sb.append(" PARTITION("); int i = 0; for (FieldSchema fs : depK.getDataContainer().getTable().getPartitionKeys()) { if (i != 0) { sb.append(","); sb.append(depK.getDataContainer().getTable().getTableName()); sb.append("." + depK.getFieldSchema().getName() + " " + dep.getType() + " ");
if (depK.getDataContainer().isPartition()) { Partition part = depK.getDataContainer().getPartition(); sb.append(part.getTableName()); sb.append(" PARTITION("); int i = 0; for (FieldSchema fs : depK.getDataContainer().getTable().getPartitionKeys()) { if (i != 0) { sb.append(","); sb.append(depK.getDataContainer().getTable().getTableName()); sb.append("." + depK.getFieldSchema().getName() + " " + dep.getType() + " ");
int ret = o1.getKey().getDataContainer().getTable().getTableName() .compareTo(o2.getKey().getDataContainer().getTable().getTableName()); if (!o1.getKey().getDataContainer().isPartition() && o2.getKey().getDataContainer().isPartition()) { return -1; else if (o1.getKey().getDataContainer().isPartition() && !o2.getKey().getDataContainer().isPartition()) { return 1; if (o1.getKey().getDataContainer().isPartition() && o2.getKey().getDataContainer().isPartition()) { ret = o1.getKey().getDataContainer().getPartition().toString() .compareTo(o2.getKey().getDataContainer().getPartition().toString()); return (o1.getKey().getFieldSchema().getName().compareTo( o2.getKey().getFieldSchema().getName()));
/** * Puts the dependency for a table, column tuple. * @param dc The datacontainer whose dependency is being inserted. * @param col The column whose dependency is being inserted. * @param dep The dependency. */ public void putDependency(DataContainer dc, FieldSchema col, Dependency dep) { index.put(new DependencyKey(dc, col), dep); }
/** * Gets the dependency for a table, column tuple. * @param dc The data container of the column whose dependency is being inspected. * @param col The column whose dependency is being inspected. * @return Dependency for that particular table, column tuple. * null if no dependency is found. */ public Dependency getDependency(DataContainer dc, FieldSchema col) { return index.get(new DependencyKey(dc, col)); }
/** * Gets the dependency for a table, column tuple. * @param dc The data container of the column whose dependency is being inspected. * @param col The column whose dependency is being inspected. * @return Dependency for that particular table, column tuple. * null if no dependency is found. */ public Dependency getDependency(DataContainer dc, FieldSchema col) { return index.get(new DependencyKey(dc, col)); }
public static String getQualifiedName(LineageInfo.DependencyKey key){ String db = key.getDataContainer().getTable().getDbName(); String table = key.getDataContainer().getTable().getTableName(); String col = key.getFieldSchema().getName(); return db + "." + table + "." + col; }
protected String getQualifiedName(DependencyKey column) { String dbName = column.getDataContainer().getTable().getDbName(); String tableName = column.getDataContainer().getTable().getTableName(); String colName = column.getFieldSchema().getName(); return getQualifiedName(dbName, tableName, colName); }
/** * Puts the dependency for a table, column tuple. * @param dc The datacontainer whose dependency is being inserted. * @param col The column whose dependency is being inserted. * @param dep The dependency. */ public void putDependency(DataContainer dc, FieldSchema col, Dependency dep) { index.put(new DependencyKey(dc, col), dep); }
int ret = o1.getKey().getDataContainer().getTable().getTableName() .compareTo(o2.getKey().getDataContainer().getTable().getTableName()); if (!o1.getKey().getDataContainer().isPartition() && o2.getKey().getDataContainer().isPartition()) { return -1; else if (o1.getKey().getDataContainer().isPartition() && !o2.getKey().getDataContainer().isPartition()) { return 1; if (o1.getKey().getDataContainer().isPartition() && o2.getKey().getDataContainer().isPartition()) { ret = o1.getKey().getDataContainer().getPartition().toString() .compareTo(o2.getKey().getDataContainer().getPartition().toString()); return (o1.getKey().getFieldSchema().getName().compareTo( o2.getKey().getFieldSchema().getName()));
if (depK.getDataContainer().isPartition()) { Partition part = depK.getDataContainer().getPartition(); sb.append(part.getTableName()); sb.append(" PARTITION("); int i = 0; for (FieldSchema fs : depK.getDataContainer().getTable().getPartitionKeys()) { if (i != 0) { sb.append(","); sb.append(depK.getDataContainer().getTable().getTableName()); sb.append("." + depK.getFieldSchema().getName() + " " + dep.getType() + " ");
int ret = o1.getKey().getDataContainer().getTable().getTableName() .compareTo(o2.getKey().getDataContainer().getTable().getTableName()); if (!o1.getKey().getDataContainer().isPartition() && o2.getKey().getDataContainer().isPartition()) { return -1; else if (o1.getKey().getDataContainer().isPartition() && !o2.getKey().getDataContainer().isPartition()) { return 1; if (o1.getKey().getDataContainer().isPartition() && o2.getKey().getDataContainer().isPartition()) { ret = o1.getKey().getDataContainer().getPartition().toString() .compareTo(o2.getKey().getDataContainer().getPartition().toString()); return (o1.getKey().getFieldSchema().getName().compareTo( o2.getKey().getFieldSchema().getName()));
/** * Gets the dependency for a table, column tuple. * @param dc The data container of the column whose dependency is being inspected. * @param col The column whose dependency is being inspected. * @return Dependency for that particular table, column tuple. * null if no dependency is found. */ public Dependency getDependency(DataContainer dc, FieldSchema col) { return index.get(new DependencyKey(dc, col)); }
/** * Gets the dependency for a table, column tuple. * @param dc The data container of the column whose dependency is being inspected. * @param col The column whose dependency is being inspected. * @return Dependency for that particular table, column tuple. * null if no dependency is found. */ public Dependency getDependency(DataContainer dc, FieldSchema col) { return index.get(new DependencyKey(dc, col)); }
/** * Puts the dependency for a table, column tuple. * @param dc The datacontainer whose dependency is being inserted. * @param col The column whose dependency is being inserted. * @param dep The dependency. */ public void putDependency(DataContainer dc, FieldSchema col, Dependency dep) { index.put(new DependencyKey(dc, col), dep); }