@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()); }
@Override public JobConfig generateJobConfig(Layout base, Layout transformed, boolean deleteSrc) { alluxio.job.plan.transform.PartitionInfo basePartitionInfo = TransformActionUtils.generatePartitionInfo(base); alluxio.job.plan.transform.PartitionInfo transformedPartitionInfo = TransformActionUtils.generatePartitionInfo(transformed); return new CompactConfig(basePartitionInfo, base.getLocation().toString(), transformedPartitionInfo, transformed.getLocation().toString(), mNumFiles, mFileSize); }
CompactAction implements TransformAction { @Override public JobConfig generateJobConfig(Layout base, Layout transformed, boolean deleteSrc) { alluxio.job.plan.transform.PartitionInfo basePartitionInfo = TransformActionUtils.generatePartitionInfo(base); alluxio.job.plan.transform.PartitionInfo transformedPartitionInfo = TransformActionUtils.generatePartitionInfo(transformed); return new CompactConfig(basePartitionInfo, base.getLocation().toString(), transformedPartitionInfo, transformed.getLocation().toString(), mNumFiles, mFileSize); } }
CompactAction implements TransformAction { @Override public JobConfig generateJobConfig(Layout base, Layout transformed, boolean deleteSrc) { alluxio.job.plan.transform.PartitionInfo basePartitionInfo = TransformActionUtils.generatePartitionInfo(base); alluxio.job.plan.transform.PartitionInfo transformedPartitionInfo = TransformActionUtils.generatePartitionInfo(transformed); return new CompactConfig(basePartitionInfo, base.getLocation().toString(), transformedPartitionInfo, transformed.getLocation().toString(), mNumFiles, mFileSize); } private  CompactAction(int numFiles, long fileSize); }
CompactAction implements TransformAction { @Override public JobConfig generateJobConfig(Layout base, Layout transformed, boolean deleteSrc) { alluxio.job.plan.transform.PartitionInfo basePartitionInfo = TransformActionUtils.generatePartitionInfo(base); alluxio.job.plan.transform.PartitionInfo transformedPartitionInfo = TransformActionUtils.generatePartitionInfo(transformed); return new CompactConfig(basePartitionInfo, base.getLocation().toString(), transformedPartitionInfo, transformed.getLocation().toString(), mNumFiles, mFileSize); } private  CompactAction(int numFiles, long fileSize); @Override JobConfig generateJobConfig(Layout base, Layout transformed, boolean deleteSrc); }
CompactAction implements TransformAction { @Override public JobConfig generateJobConfig(Layout base, Layout transformed, boolean deleteSrc) { alluxio.job.plan.transform.PartitionInfo basePartitionInfo = TransformActionUtils.generatePartitionInfo(base); alluxio.job.plan.transform.PartitionInfo transformedPartitionInfo = TransformActionUtils.generatePartitionInfo(transformed); return new CompactConfig(basePartitionInfo, base.getLocation().toString(), transformedPartitionInfo, transformed.getLocation().toString(), mNumFiles, mFileSize); } private  CompactAction(int numFiles, long fileSize); @Override JobConfig generateJobConfig(Layout base, Layout transformed, boolean deleteSrc);  }