[ https://issues.apache.org/jira/browse/FLINK-1819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14658904#comment-14658904 ]
ASF GitHub Bot commented on FLINK-1819: --------------------------------------- Github user fhueske commented on a diff in the pull request: https://github.com/apache/flink/pull/966#discussion_r36352779 --- Diff: flink-core/src/test/java/org/apache/flink/api/common/io/RichOutputFormatTest.java --- @@ -0,0 +1,45 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package org.apache.flink.api.common.io; + +import java.util.HashMap; + +import org.apache.flink.api.common.ExecutionConfig; +import org.apache.flink.api.common.accumulators.Accumulator; +import org.apache.flink.api.common.functions.util.RuntimeUDFContext; +import org.apache.flink.types.Record; +import org.junit.Assert; +import org.junit.Test; + +/** + * Tests runtime context access from inside an RichOutputFormat class + */ +public class RichOutputFormatTest { + + @Test + public void testCheckRuntimeContextAccess() { + final SerializedOutputFormat<Record> inputFormat = new SerializedOutputFormat<Record>(); --- End diff -- Please replace `Record` data type. > 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 > Assignee: Sachin Goel > 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)