Search in sources :

Example 1 with TransformContext

use of alluxio.table.common.transform.TransformContext in project alluxio by Alluxio.

the class Table method getTransformPlans.

/**
 * Returns a list of plans to transform the table, according to the transformation definition.
 *
 * @param definition the transformation definition
 * @return a list of {@link TransformPlan} to transform this table
 */
public List<TransformPlan> getTransformPlans(TransformDefinition definition) throws IOException {
    List<TransformPlan> plans = new ArrayList<>(getPartitions().size());
    for (Partition partition : getPartitions()) {
        if (!partition.isTransformed(definition.getDefinition())) {
            TransformContext transformContext = new TransformContext(mDatabase.getName(), mName, partition.getSpec());
            plans.add(partition.getTransformPlan(transformContext, definition));
        }
    }
    return plans;
}
Also used : UdbPartition(alluxio.table.common.UdbPartition) TransformContext(alluxio.table.common.transform.TransformContext) ArrayList(java.util.ArrayList) TransformPlan(alluxio.table.common.transform.TransformPlan)

Aggregations

UdbPartition (alluxio.table.common.UdbPartition)1 TransformContext (alluxio.table.common.transform.TransformContext)1 TransformPlan (alluxio.table.common.transform.TransformPlan)1 ArrayList (java.util.ArrayList)1