T
- Type of elements after deserialization by source@Experimental public interface ExternalContext<T> extends Serializable, AutoCloseable
This context is responsible for providing:
SourceSplitDataWriter
for creating splits and writing test data into the created
split
Modifier and Type | Interface and Description |
---|---|
static interface |
ExternalContext.Factory<T>
Factory for
ExternalContext . |
Modifier and Type | Method and Description |
---|---|
Source<T,?,?> |
createSource(Boundedness boundedness)
Create a new instance of connector source implemented in
Source . |
SourceSplitDataWriter<T> |
createSourceSplitDataWriter()
Create a new split in the external system and a data writer corresponding to the new split.
|
List<T> |
generateTestData(int splitIndex,
long seed)
Generate test data.
|
close
Source<T,?,?> createSource(Boundedness boundedness)
Source
.SourceSplitDataWriter<T> createSourceSplitDataWriter()
List<T> generateTestData(int splitIndex, long seed)
Make sure that the T#equals(Object)
returns false when the records in different
splits.
splitIndex
- index of the split.seed
- Seed for generating random test data set.Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.