public class MockSink extends SparkSink<co.cask.cdap.api.data.format.StructuredRecord>
| 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 ETLPlugin |
getPlugin(String tableName)
Get ETL plugin
|
static Map<String,String> |
getValues(Set<String> keys,
DataSetManager<KeyValueTable> tableManager)
Get the values associated with the specified keys.
|
void |
prepareRun(SparkPluginContext context) |
void |
run(SparkExecutionPluginContext context,
org.apache.spark.api.java.JavaRDD<co.cask.cdap.api.data.format.StructuredRecord> input) |
configurePipeline, onRunFinishpublic static final PluginClass PLUGIN_CLASS
public MockSink(MockSink.Config config)
public void prepareRun(SparkPluginContext context) throws Exception
prepareRun in interface SubmitterLifecycle<SparkPluginContext>prepareRun in class BatchConfigurable<SparkPluginContext>Exceptionpublic void run(SparkExecutionPluginContext context, org.apache.spark.api.java.JavaRDD<co.cask.cdap.api.data.format.StructuredRecord> input) throws Exception
run in class SparkSink<co.cask.cdap.api.data.format.StructuredRecord>Exceptionpublic static ETLPlugin getPlugin(String tableName)
tableName - name of the table provided for the configurationpublic static Map<String,String> getValues(Set<String> keys, DataSetManager<KeyValueTable> tableManager) throws Exception
keys - keys for which value to be determinedtableManager - manager for the tableExceptionCopyright © 2017 Cask Data, Inc. Licensed under the Apache License, Version 2.0.