use of org.apache.gobblin.runtime.api.JobExecutionResult in project incubator-gobblin by apache.
the class MRCompactionTaskTest method testDedup.
@Test
public void testDedup() throws Exception {
File basePath = Files.createTempDir();
basePath.deleteOnExit();
File jobDir = new File(basePath, "Identity/MemberAccount/minutely/2017/04/03/10/20_30/run_2017-04-03-10-20");
Assert.assertTrue(jobDir.mkdirs());
GenericRecord r1 = createRandomRecord();
GenericRecord r2 = createRandomRecord();
writeFileWithContent(jobDir, "file1", r1, 20);
writeFileWithContent(jobDir, "file2", r2, 18);
EmbeddedGobblin embeddedGobblin = createEmbeddedGobblin("dedup", basePath.getAbsolutePath().toString());
JobExecutionResult result = embeddedGobblin.run();
Assert.assertTrue(result.isSuccessful());
}
Aggregations