public class MockExternalSink extends BatchSink<co.cask.cdap.api.data.format.StructuredRecord,NullWritable,String>
| Modifier and Type | Class and Description |
|---|---|
static class |
MockExternalSink.Config
Config for the sink.
|
| Modifier and Type | Field and Description |
|---|---|
static PluginClass |
PLUGIN_CLASS |
static String |
PLUGIN_NAME |
PLUGIN_TYPE| Constructor and Description |
|---|
MockExternalSink(MockExternalSink.Config config) |
| Modifier and Type | Method and Description |
|---|---|
static ETLPlugin |
getPlugin(String name,
String alias,
String dirName)
Returns
ETLPlugin for MockExternalSink. |
void |
prepareRun(BatchSinkContext context) |
static List<co.cask.cdap.api.data.format.StructuredRecord> |
readOutput(String dirName)
Used to read the records written by this sink.
|
void |
transform(co.cask.cdap.api.data.format.StructuredRecord input,
Emitter<KeyValue<NullWritable,String>> emitter) |
destroy, initializeconfigurePipeline, onRunFinishpublic static final PluginClass PLUGIN_CLASS
public static final String PLUGIN_NAME
public MockExternalSink(MockExternalSink.Config config)
public void prepareRun(BatchSinkContext context) throws Exception
prepareRun in class BatchConfigurable<BatchSinkContext>Exceptionpublic void transform(co.cask.cdap.api.data.format.StructuredRecord input, Emitter<KeyValue<NullWritable,String>> emitter) throws Exception
transform in interface Transformation<co.cask.cdap.api.data.format.StructuredRecord,KeyValue<NullWritable,String>>transform in class BatchSink<co.cask.cdap.api.data.format.StructuredRecord,NullWritable,String>Exceptionpublic static ETLPlugin getPlugin(@Nullable String name, String alias, String dirName)
ETLPlugin for MockExternalSink.name - name of the provider, use null for backwards compatibilityalias - alias of the providerdirName - directory nameETLPlugin for MockExternalSinkpublic static List<co.cask.cdap.api.data.format.StructuredRecord> readOutput(String dirName) throws Exception
dirName - directory where output files are foundExceptionCopyright © 2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.