public class MockSink extends BatchSink<co.cask.cdap.api.data.format.StructuredRecord,byte[],Put>
| Modifier and Type | Class and Description |
|---|---|
static class |
MockSink.Config
Config for the sink.
|
| Modifier and Type | Field and Description |
|---|---|
static PluginClass |
PLUGIN_CLASS |
PLUGIN_TYPE| Constructor and Description |
|---|
MockSink(MockSink.Config config) |
| Modifier and Type | Method and Description |
|---|---|
static void |
clear(DataSetManager<Table> tableManager)
Clear any records written to this sink.
|
void |
configurePipeline(PipelineConfigurer pipelineConfigurer) |
static ETLPlugin |
getPlugin(String tableName) |
void |
initialize(BatchRuntimeContext context) |
void |
prepareRun(BatchSinkContext context) |
static List<co.cask.cdap.api.data.format.StructuredRecord> |
readOutput(DataSetManager<Table> tableManager)
Used to read the records written by this sink.
|
void |
transform(co.cask.cdap.api.data.format.StructuredRecord input,
Emitter<KeyValue<byte[],Put>> emitter) |
onRunFinishpublic static final PluginClass PLUGIN_CLASS
public MockSink(MockSink.Config config)
public void configurePipeline(PipelineConfigurer pipelineConfigurer)
configurePipeline in interface PipelineConfigurableconfigurePipeline in class BatchConfigurable<BatchSinkContext>public void prepareRun(BatchSinkContext context) throws Exception
prepareRun in interface SubmitterLifecycle<BatchSinkContext>prepareRun in class BatchConfigurable<BatchSinkContext>Exceptionpublic void initialize(BatchRuntimeContext context) throws Exception
initialize in interface StageLifecycle<BatchRuntimeContext>initialize in class BatchSink<co.cask.cdap.api.data.format.StructuredRecord,byte[],Put>Exceptionpublic void transform(co.cask.cdap.api.data.format.StructuredRecord input, Emitter<KeyValue<byte[],Put>> emitter) throws Exception
transform in interface Transformation<co.cask.cdap.api.data.format.StructuredRecord,KeyValue<byte[],Put>>transform in class BatchSink<co.cask.cdap.api.data.format.StructuredRecord,byte[],Put>Exceptionpublic static List<co.cask.cdap.api.data.format.StructuredRecord> readOutput(DataSetManager<Table> tableManager) throws Exception
tableManager - dataset manager used to get the sink dataset to read fromExceptionpublic static void clear(DataSetManager<Table> tableManager)
tableManager - dataset manager used to get the sink datasetCopyright © 2017 Cask Data, Inc. Licensed under the Apache License, Version 2.0.