Add datset.urn in GTE for MRCompactionTask
Add datset.urn in GTE for MRCompactionTask
Revert the change of default datset.urn
Closes from autumnust/populatedatasetUrn
@@ -426,12 +426,14 @@ public class CompactionSource implements WorkUnitStreamSource<String, String> {
WorkUnit workUnit = new WorkUnit();
TaskUtils.setTaskFactoryClass(workUnit, MRCompactionTaskFactory.class);
suite.save(dataset, workUnit);
+ workUnit.setProp(ConfigurationKeys.DATASET_URN_KEY, dataset.getUrn());
return workUnit;
}
protected WorkUnit createWorkUnitForFailure (Dataset dataset) throws IOException {
WorkUnit workUnit = new FailedTask.FailedWorkUnit();
TaskUtils.setTaskFactoryClass(workUnit, CompactionFailedTask.CompactionFailedTaskFactory.class);
+ workUnit.setProp(ConfigurationKeys.DATASET_URN_KEY, dataset.getUrn());
suite.save(dataset, workUnit);
return workUnit;
}
@@ -440,6 +442,7 @@ public class CompactionSource implements WorkUnitStreamSource<String, String> {
WorkUnit workUnit = new FailedTask.FailedWorkUnit();
workUnit.setProp(CompactionVerifier.COMPACTION_VERIFICATION_FAIL_REASON, reason);
TaskUtils.setTaskFactoryClass(workUnit, CompactionFailedTask.CompactionFailedTaskFactory.class);
+ workUnit.setProp(ConfigurationKeys.DATASET_URN_KEY, dataset.getUrn());
suite.save(dataset, workUnit);
return workUnit;
}
