use of co.cask.cdap.internal.app.runtime.batch.BasicOutputFormatProvider in project cdap by caskdata.
the class MockExternalSink method prepareRun.
@Override
public void prepareRun(BatchSinkContext context) throws Exception {
OutputFormatProvider outputFormatProvider = new BasicOutputFormatProvider(TextOutputFormat.class.getCanonicalName(), ImmutableMap.of(TextOutputFormat.OUTDIR, config.dirName));
if (config.name != null) {
Output output = Output.of(config.name, outputFormatProvider);
output.alias(config.alias);
context.addOutput(output);
} else {
context.addOutput(Output.of(config.alias, outputFormatProvider));
}
}
Aggregations