Return-Path: X-Original-To: apmail-flink-issues-archive@minotaur.apache.org Delivered-To: apmail-flink-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C3BF318C8A for ; Mon, 3 Aug 2015 23:18:04 +0000 (UTC) Received: (qmail 64159 invoked by uid 500); 3 Aug 2015 23:18:04 -0000 Delivered-To: apmail-flink-issues-archive@flink.apache.org Received: (qmail 64106 invoked by uid 500); 3 Aug 2015 23:18:04 -0000 Mailing-List: contact issues-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list issues@flink.apache.org Received: (qmail 64095 invoked by uid 99); 3 Aug 2015 23:18:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Aug 2015 23:18:04 +0000 Date: Mon, 3 Aug 2015 23:18:04 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FLINK-1819) Allow access to RuntimeContext from Input and OutputFormats MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FLINK-1819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14652763#comment-14652763 ] ASF GitHub Bot commented on FLINK-1819: --------------------------------------- Github user sachingoel0101 commented on a diff in the pull request: https://github.com/apache/flink/pull/966#discussion_r36142648 --- Diff: flink-core/src/test/java/org/apache/flink/api/common/operators/util/NonRichGenericInputFormat.java --- @@ -0,0 +1,86 @@ +/* + * 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.operators.util; + +import java.io.IOException; + +import org.apache.flink.api.common.io.InputFormat; +import org.apache.flink.api.common.io.NonParallelInput; +import org.apache.flink.api.common.io.DefaultInputSplitAssigner; +import org.apache.flink.api.common.io.statistics.BaseStatistics; +import org.apache.flink.configuration.Configuration; +import org.apache.flink.core.io.GenericInputSplit; + +/** + * Generic base class for all inputs that are not based on files. + * This is copied from {@link org.apache.flink.api.common.io.GenericInputFormat} + * This class doesn't provide access to RuntimeContext. + */ +public abstract class NonRichGenericInputFormat implements InputFormat { --- End diff -- This was only for testing purposes. I needed to verify that I didn't break any functionality by making every IO format rich. That is, to verify the class casting behavior in the Pact tasks. > 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)