Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-36138

KinesisStreamsSource.build() should have helpful null errors

    XMLWordPrintableJSON

Details

    Description

      The KinesisStreamsSource is constructed with a help of a builder, in order to successfully create an instance all fields that are null checked need to be provided by invoking the builders set methods.

      In case one required field is not set it will remain null und result in a failure of Preconditions.checkNotNull. This exception currently doesn't say which field is null, therefore it is only possible to resolve the error by looking at the code (the JavaDoc explains it as well, but is missing the sourceConfig field)

       

      I would like to propose to communicate to the user which field must be set in the thrown exception.

       

      In case this can be addressed, I would like to provide a PR to fix it.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              joern Jörn Kottmann
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: