Return-Path: Delivered-To: apmail-hadoop-mapreduce-issues-archive@minotaur.apache.org Received: (qmail 75522 invoked from network); 17 Sep 2009 14:26:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Sep 2009 14:26:19 -0000 Received: (qmail 8029 invoked by uid 500); 17 Sep 2009 14:26:19 -0000 Delivered-To: apmail-hadoop-mapreduce-issues-archive@hadoop.apache.org Received: (qmail 7982 invoked by uid 500); 17 Sep 2009 14:26:19 -0000 Mailing-List: contact mapreduce-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mapreduce-issues@hadoop.apache.org Delivered-To: mailing list mapreduce-issues@hadoop.apache.org Received: (qmail 7972 invoked by uid 99); 17 Sep 2009 14:26:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Sep 2009 14:26:19 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Sep 2009 14:26:18 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 9D436234C1E9 for ; Thu, 17 Sep 2009 07:25:57 -0700 (PDT) Message-ID: <1465368812.1253197557643.JavaMail.jira@brutus> Date: Thu, 17 Sep 2009 07:25:57 -0700 (PDT) From: "Tom White (JIRA)" To: mapreduce-issues@hadoop.apache.org Subject: [jira] Commented: (MAPREDUCE-954) The new interface's Context objects should be interfaces In-Reply-To: <181108236.1252087558290.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/MAPREDUCE-954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12756559#action_12756559 ] Tom White commented on MAPREDUCE-954: ------------------------------------- I've gone back to the cases that have motivated this in order to better understand why this change is needed. The first motivating case is MAPREDUCE-901, which needs to change the constructor to ReduceContext due to an internal type change. As noted above, user applications should never create context objects, so the constructor could be marked as Private Evolving to solve this problem, couldn't it? The other motivating case is MAPREDUCE-372 (chain MapReduce), where various fields of the context need to be replaced with custom versions. The approach described in [this comment|https://issues.apache.org/jira/browse/MAPREDUCE-372?focusedCommentId=12752452&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_12752452] which is to add a new constructor to ReduceContext (a "pseudo copy constructor"), could again be made Private Evolving to mark its scope. This approach didn't cause any information leakage as far as I can tell (the previous version had to add extra getters, which did cause leakage). Another approach would be to create package private constructors and have a Private Evolving ContextFactory in the same package if the intent is to keep the constructors further away from user code (in IDE autocomplete, for example). The point is that I think we can avoid the problem of leakage with some changes to visibility annotations. > The new interface's Context objects should be interfaces > -------------------------------------------------------- > > Key: MAPREDUCE-954 > URL: https://issues.apache.org/jira/browse/MAPREDUCE-954 > Project: Hadoop Map/Reduce > Issue Type: Improvement > Components: client > Reporter: Owen O'Malley > Assignee: Arun C Murthy > Fix For: 0.21.0 > > Attachments: MAPREDUCE-954.patch, MAPREDUCE-954.patch, MAPREDUCE-954.patch > > > When I was doing HADOOP-1230, I was persuaded to make the Context objects as classes. I think that was a serious mistake. It caused a lot of information leakage into the public classes. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.