Interface DataStreamSourceExternalContext<T>

    • Method Detail

      • createSourceSplitDataWriter

        ExternalSystemSplitDataWriter<T> createSourceSplitDataWriter​(TestingSourceSettings sourceSettings)
        Create a new split in the external system and return a data writer corresponding to the new split.
        Parameters:
        sourceSettings - options of the source
      • generateTestData

        List<T> generateTestData​(TestingSourceSettings sourceSettings,
                                 int splitIndex,
                                 long seed)
        Generate test data.

        These test data will be written to external system using ExternalSystemSplitDataWriter, consume back by source in testing Flink job, and make comparison with Object.equals(Object) for validating correctness.

        Note: Make sure that the Object.equals(Object) returns false when the records in different splits.

        Parameters:
        sourceSettings - options of the source
        splitIndex - index of the split.
        seed - Seed for generating random test data set.
        Returns:
        List of generated test data.