"Cannot copy multiple datasets");
View<Record> source = load(datasets.get(0), Record.class);
View<Record> dest = load(datasets.get(1), Record.class);
CopyTask task = new CopyTask<Record>(source, dest);
task.setConf(getConf());
if (noCompaction) {
task.noCompaction();
}
if (numWriters >= 0) {
task.setNumWriters(numWriters);
}
PipelineResult result = task.run();
if (result.succeeded()) {
console.info("Added {} records to \"{}\"",
task.getCount(), datasets.get(1));
return 0;
} else {
return 1;
}
}