use of alluxio.job.plan.transform.CompactConfig in project alluxio by Alluxio.
the class CompactActionTest method dynamicNumFiles.
@Test
public void dynamicNumFiles() {
final CompactAction compactAction = parse("file.count.max=1000;file.size.min=1024");
HiveLayout from = TableTestUtils.createLayout("/from");
HiveLayout to = TableTestUtils.createLayout("/to");
JobConfig job = compactAction.generateJobConfig(from, to, false);
assertEquals(CompactConfig.class, job.getClass());
CompactConfig compact = (CompactConfig) job;
assertEquals("/from", compact.getInput());
assertEquals("/to", compact.getOutput());
assertEquals(1000, compact.getMaxNumFiles());
assertEquals(1024, compact.getMinFileSize());
}
use of alluxio.job.plan.transform.CompactConfig in project alluxio by Alluxio.
the class CompactActionTest method generateJobConfig.
@Test
public void generateJobConfig() {
final CompactAction compactAction = parse("file.count.max=12");
HiveLayout from = TableTestUtils.createLayout("/from");
HiveLayout to = TableTestUtils.createLayout("/to");
JobConfig job = compactAction.generateJobConfig(from, to, false);
assertEquals(CompactConfig.class, job.getClass());
CompactConfig compact = (CompactConfig) job;
assertEquals("/from", compact.getInput());
assertEquals("/to", compact.getOutput());
assertEquals(12, compact.getMaxNumFiles());
}
use of alluxio.job.plan.transform.CompactConfig in project alluxio by Alluxio.
the class TransformPlanTest method getJobConfigs.
@Test
public void getJobConfigs() {
HiveLayout from = TableTestUtils.createLayout("/from");
HiveLayout to = TableTestUtils.createLayout("/to");
TransformDefinition definition = TransformDefinition.parse("file.count.max=12");
TransformPlan plan = new TransformPlan(from, to, definition);
assertEquals(from, plan.getBaseLayout());
assertEquals(to, plan.getTransformedLayout());
ArrayList<JobConfig> jobs = plan.getJobConfigs();
assertEquals(1, jobs.size());
assertEquals(CompactConfig.class, jobs.get(0).getClass());
CompactConfig compact = (CompactConfig) jobs.get(0);
assertEquals("/from", compact.getInput());
assertEquals("/to", compact.getOutput());
assertEquals(12, compact.getMaxNumFiles());
}
Aggregations