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

Confusing error about ManualTimestampSourceFunction

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.10.2, 1.0.0
    • None
    • None

    Description

      I wrote a source like this:

      public class Foo extends RichSourceFunction<Bar> {
      

      and then did

      ctx.collectWithTimestamp(event, event.eventTimestamp);
      

      I got this error:

      Caused by: java.lang.UnsupportedOperationException: Automatic-Timestamp sources cannot emit elements with a timestamp. See interface ManualTimestampSourceFunction if you want to manually assign timestamps to elements.
      	at org.apache.flink.streaming.api.operators.StreamSource$NonTimestampContext.collectWithTimestamp(StreamSource.java:97)
      

      After some digging it turns out that ManualTimestampSourceFunction was renamed to EventTimeSourceFunction and apparently the old name still lingers in this error message.

      Attachments

        Activity

          People

            nielsbasjes Niels Basjes
            nielsbasjes Niels Basjes
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: