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