Return-Path: Delivered-To: apmail-hadoop-core-dev-archive@www.apache.org Received: (qmail 28022 invoked from network); 31 Jan 2008 16:51:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 Jan 2008 16:51:33 -0000 Received: (qmail 21035 invoked by uid 500); 31 Jan 2008 16:51:21 -0000 Delivered-To: apmail-hadoop-core-dev-archive@hadoop.apache.org Received: (qmail 21001 invoked by uid 500); 31 Jan 2008 16:51:21 -0000 Mailing-List: contact core-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: core-dev@hadoop.apache.org Delivered-To: mailing list core-dev@hadoop.apache.org Received: (qmail 20901 invoked by uid 99); 31 Jan 2008 16:51:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Jan 2008 08:51:21 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Jan 2008 16:51:01 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 517F1714042 for ; Thu, 31 Jan 2008 08:51:08 -0800 (PST) Message-ID: <3900291.1201798268328.JavaMail.jira@brutus> Date: Thu, 31 Jan 2008 08:51:08 -0800 (PST) From: "Clint Morgan (JIRA)" To: core-dev@hadoop.apache.org Subject: [jira] Updated: (HADOOP-2718) Copy Constructor HBaseConfiguration(Configuration) will override hbase configurations if argumant is not an instance of HBaseConfiguration. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HADOOP-2718?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Clint Morgan updated HADOOP-2718: --------------------------------- Attachment: conf.patch Okay, I see the problem here: In this particular case, the parameter is a JobConf, and so will usually need the hbase resources added. My problem is I had hbase resources in the JobConf which I did not want them overriden by hbase*.xml Dave's problem is that he has a normal JobConf, so he needs all the hbase resources. So we can both be happy if we get the hbase resources in there, then set all of the parametric config's values. So change the super() call to a this() call to get the hbase resources in first. I'd like this for 0.16. > Copy Constructor HBaseConfiguration(Configuration) will override hbase configurations if argumant is not an instance of HBaseConfiguration. > ------------------------------------------------------------------------------------------------------------------------------------------- > > Key: HADOOP-2718 > URL: https://issues.apache.org/jira/browse/HADOOP-2718 > Project: Hadoop Core > Issue Type: Bug > Components: contrib/hbase > Reporter: Clint Morgan > Priority: Blocker > Fix For: 0.16.0 > > Attachments: conf.patch, conf.patch > > > Copy Constructor HBaseConfiguration(Configuration) will override hbase > settings from the argument if the arg is not an instance of HBaseConfiguration. > This was happening to me when I was passing around hbase settings as > part of a Table Map/Reduce job configuration. > Observer the following unexpected behavior: > JobConf jobConf = new JobConf("job.xml"); > HBaseConfiguration hbaseConf = new HBaseConfiguration(jobConf); > String result1 = jobConf.get("hbase.master"); // Value from job.xml loaded by tasktracker > String result2 = hbaseConf.get("hbase.master"); // Value from hbase-site.xml > Assert.assertEquals(result1, result2); // Fail > In particular, this copy constructor is called in hbase.mapred.TableInputFormat.configure(JobConf). > I have a hbase.master defined in my JobConf that gets overridden in the HbaseConfiguration by hbase-site.xml. > Should the Constructor instead add new hbase-specific values if they are not already defined in the Configuration parameter? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.