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

    https://github.com/apache/flink/pull/5977#discussion_r187640541
  
    --- Diff: 
flink-core/src/main/java/org/apache/flink/api/common/functions/RuntimeContext.java
 ---
    @@ -71,6 +71,17 @@
        @PublicEvolving
        MetricGroup getMetricGroup();
     
    +   /**
    +    * Returned value is guaranteed to be unique between operators within 
the same job and to be
    +    * stable and the same across job submissions.
    +    *
    +    * <p>This operation is currently only supported in Streaming 
(DataStream) contexts.
    +    *
    +    * @return String representation of the operator's unique id.
    +    */
    +   @PublicEvolving
    +   String getOperatorUniqueID();
    --- End diff --
    
    Rather than adding this here and failing for *DataSet* programs, hoe about 
adding this to `StreamingRuntimeContext` and casting inside the Kafka Producer? 
Not super pretty, but nicer than having something that looks like a pretty 
generic concept (operator id) throwing an exception in a whole class of 
programs (batch jobs). This problem should go away anyways with the batch / 
streaming unification later.


---

Reply via email to