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

Confusing error about ManualTimestampSourceFunction

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.10.2, 1.0.0
    • Component/s: None
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: