Github user mjsax commented on the pull request:

    https://github.com/apache/flink/pull/1483#issuecomment-170244363
  
    I understand your skeptic, but I don't see it as dangerous as you. If 
somebody access this information and does not use it properly, it's his/her own 
fault... (same as using a static variable in an UDF -- we cannot "protect" 
users from writing bad code).
    
    Nevertheless, originally I had the same idea as you suggest (ie, use 
`processRecord()`). However, the compatibility layer also used two 
`CoFlatMapFunction`s which need to access this information, too. 
    
     - 
https://github.com/apache/flink/blob/master/flink-contrib/flink-storm/src/main/java/org/apache/flink/storm/api/TwoFlinkStreamsMerger.java
     - 
https://github.com/apache/flink/blob/master/flink-contrib/flink-storm/src/main/java/org/apache/flink/storm/api/StormFlinkStreamMerger.java
    
    It would be possible to rewrite both functions as custom operators, but 
this makes the translation code for multiple inputs streams more complex. Thus, 
I would prefer to expose this information in `RuntimeContext`. We can also 
extend the JavaDoc to warn the user to use this information carefully...


---
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