I - Type of object that sink operates on@Beta public abstract class RealtimeSink<I> extends Object implements PipelineConfigurable, StageLifecycle<RealtimeContext>
| Modifier and Type | Field and Description |
|---|---|
static String |
PLUGIN_TYPE |
| Constructor and Description |
|---|
RealtimeSink() |
| Modifier and Type | Method and Description |
|---|---|
void |
configurePipeline(PipelineConfigurer pipelineConfigurer)
Configure an ETL pipeline, adding datasets and streams that the stage needs.
|
void |
destroy()
Destroy the Sink.
|
void |
initialize(RealtimeContext context)
Initialize the Sink.
|
abstract int |
write(Iterable<I> objects,
DataWriter dataWriter)
Write the given objects.
|
public static final String PLUGIN_TYPE
public void configurePipeline(PipelineConfigurer pipelineConfigurer)
PipelineConfigurableconfigurePipeline in interface PipelineConfigurablepipelineConfigurer - the configurer used to add required datasets and streamspublic void initialize(RealtimeContext context) throws Exception
write(java.lang.Iterable<I>, co.cask.cdap.etl.api.realtime.DataWriter)
are made.initialize in interface StageLifecycle<RealtimeContext>context - RealtimeContextException - if there is any error during initializationpublic abstract int write(Iterable<I> objects, DataWriter dataWriter) throws Exception
objects - Iterable of I to writedataWriter - DataWriter write to CDAP streams and datasetsException - if there was some exception writing the objectspublic void destroy()
destroy in interface DestroyableCopyright © 2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.