Github user rmetzger commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2350#discussion_r75298087
  
    --- Diff: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/StreamSource.java
 ---
    @@ -146,16 +146,24 @@ void checkAsyncException() {
                private final Output<StreamRecord<T>> output;
                private final StreamRecord<T> reuse;
     
    -           public NonTimestampContext(StreamSource<?, ?> owner, Object 
lockingObject, Output<StreamRecord<T>> output) {
    -                   this.owner = owner;
    +           public NonTimestampContext(AbstractStreamOperator<T> owner, 
Object lockingObject, Output<StreamRecord<T>> output) {
                        this.lockingObject = lockingObject;
                        this.output = output;
                        this.reuse = new StreamRecord<T>(null);
    +
    +                   // if it is a source, then we cast and cache it
    +                   // here so that we do not have to do it in every 
collect(),
    +                   // collectWithTimestamp() and emitWatermark()
    +
    +                   this.owner = (owner instanceof StreamSource) ?
    +                           (StreamSource) owner : null;
    --- End diff --
    
    For the file reader, the method can just be empty



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to