Search in sources :

Example 1 with TaskContext

use of org.apache.gobblin.runtime.TaskContext in project incubator-gobblin by apache.

the class HiveMaterializerTest method getTaskContextForRun.

private TaskContext getTaskContextForRun(WorkUnit workUnit) {
    workUnit.setProp(ConfigurationKeys.JOB_ID_KEY, "job123");
    workUnit.setProp(ConfigurationKeys.TASK_ID_KEY, "task123");
    workUnit.setProp(HiveConverterUtils.HIVE_DATASET_DESTINATION_SKIP_SETGROUP, Boolean.toString(true));
    HiveTask.disableHiveWatermarker(workUnit);
    JobState jobState = new JobState("job", "job123");
    return new TaskContext(new WorkUnitState(workUnit, jobState));
}
Also used : TaskContext(org.apache.gobblin.runtime.TaskContext) WorkUnitState(org.apache.gobblin.configuration.WorkUnitState) JobState(org.apache.gobblin.runtime.JobState)

Aggregations

WorkUnitState (org.apache.gobblin.configuration.WorkUnitState)1 JobState (org.apache.gobblin.runtime.JobState)1 TaskContext (org.apache.gobblin.runtime.TaskContext)1