public class MockSource extends Object implements DeltaSource
| Modifier and Type | Field and Description |
|---|---|
static String |
NAME |
static PluginClass |
PLUGIN_CLASS |
PLUGIN_TYPE| Constructor and Description |
|---|
MockSource(io.cdap.delta.test.mock.MockSource.Conf conf) |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(SourceConfigurer configurer) |
EventReader |
createReader(EventReaderDefinition definition,
DeltaSourceContext context,
EventEmitter emitter) |
TableAssessor<TableDetail> |
createTableAssessor(Configurer configurer) |
TableRegistry |
createTableRegistry(Configurer configurer) |
static Plugin |
getPlugin(List<? extends ChangeEvent> events)
Get the plugin configuration for a mock source that should emit the given events in order.
|
static Plugin |
getPlugin(List<? extends ChangeEvent> events,
File proceedFile)
Get the plugin configuration for a mock source that should throw exceptions until the specified proceed file
exists.
|
static Plugin |
getPlugin(List<? extends ChangeEvent> events,
int maxEvents)
Get the plugin configuration for a mock source that should emit the given events in order, up to the maximum
number of events given.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitializepublic static final String NAME
public static final PluginClass PLUGIN_CLASS
public void configure(SourceConfigurer configurer)
configure in interface DeltaSourcepublic EventReader createReader(EventReaderDefinition definition, DeltaSourceContext context, EventEmitter emitter)
createReader in interface DeltaSourcepublic TableRegistry createTableRegistry(Configurer configurer)
createTableRegistry in interface DeltaSourcepublic TableAssessor<TableDetail> createTableAssessor(Configurer configurer)
createTableAssessor in interface TableAssessorSupplier<TableDetail>public static Plugin getPlugin(List<? extends ChangeEvent> events)
events - events to emit in orderpublic static Plugin getPlugin(List<? extends ChangeEvent> events, int maxEvents)
events - events to emit in ordermaxEvents - maximum number of events to emit for a single run of the pipelinepublic static Plugin getPlugin(List<? extends ChangeEvent> events, File proceedFile)
events - events to emit in orderproceedFile - file that must exist before events are emittedCopyright © 2021 CDAP Licensed under the Apache License, Version 2.0.