[ https://issues.apache.org/jira/browse/FLINK-1819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14652612#comment-14652612 ]
ASF GitHub Bot commented on FLINK-1819: --------------------------------------- Github user fhueske commented on the pull request: https://github.com/apache/flink/pull/966#issuecomment-127415936 Hi @sachingoel0101, thanks for opening this PR! I see your point that users would have to implement `setRuntimeContext()` and `getRuntimeContext()` if we would use an interface. However, I am not sure that this would affect many people because we could implement the methods in all our base Input/OutputFormats which should cover a large portion of new formats. Also, these methods can be implemented in less than a minute. I think @StephanEwen has a point that all Input/OutputFormats are always quite rich. I would opt for the interface solution but implement it for all relevant Input/OutputFormats that Flink provides. I would also remove the `postConfigure()` method in favor of a clear documentation of the interface stating that the `RuntimeContext`is available in `open()`. > Allow access to RuntimeContext from Input and OutputFormats > ----------------------------------------------------------- > > Key: FLINK-1819 > URL: https://issues.apache.org/jira/browse/FLINK-1819 > Project: Flink > Issue Type: Improvement > Components: Local Runtime > Affects Versions: 0.9, 0.8.1 > Reporter: Fabian Hueske > Priority: Minor > Fix For: 0.9 > > > User function that extend a RichFunction can access a {{RuntimeContext}} > which gives the parallel id of the task and access to Accumulators and > BroadcastVariables. > Right now, Input and OutputFormats cannot access their {{RuntimeContext}}. -- This message was sent by Atlassian JIRA (v6.3.4#6332)