use of co.cask.cdap.api.dataset.lib.TimePartitionOutput in project cdap by caskdata.
the class PartitionCorrectorTestRun method createPartition.
private void createPartition(DataSetManager<TimePartitionedFileSet> tpfsManager, long time, int i) throws Exception {
TimePartitionedFileSet tpfs = tpfsManager.get();
TimePartitionOutput output = tpfs.getPartitionOutput(time);
try (PrintStream out = new PrintStream(output.getLocation().append("file").getOutputStream())) {
out.println(String.format("%d,x%d", i, i));
}
output.addPartition();
tpfsManager.flush();
}
Aggregations