Return-Path: X-Original-To: apmail-accumulo-notifications-archive@minotaur.apache.org Delivered-To: apmail-accumulo-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A77DE104EF for ; Fri, 19 Dec 2014 22:48:13 +0000 (UTC) Received: (qmail 14807 invoked by uid 500); 19 Dec 2014 22:48:13 -0000 Delivered-To: apmail-accumulo-notifications-archive@accumulo.apache.org Received: (qmail 14770 invoked by uid 500); 19 Dec 2014 22:48:13 -0000 Mailing-List: contact notifications-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jira@apache.org Delivered-To: mailing list notifications@accumulo.apache.org Received: (qmail 14756 invoked by uid 99); 19 Dec 2014 22:48:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Dec 2014 22:48:13 +0000 Date: Fri, 19 Dec 2014 22:48:13 +0000 (UTC) From: "Christopher Tubbs (JIRA)" To: notifications@accumulo.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ACCUMULO-2882) Initialize double-sets the initial configuration for the metadata and root tables 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/ACCUMULO-2882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14254166#comment-14254166 ] Christopher Tubbs commented on ACCUMULO-2882: --------------------------------------------- Some changes were made to Initialize since this patch was made. Also, the contributor's questions were left unanswered. This issue needs to be reviewed to determine if it is current. > Initialize double-sets the initial configuration for the metadata and root tables > --------------------------------------------------------------------------------- > > Key: ACCUMULO-2882 > URL: https://issues.apache.org/jira/browse/ACCUMULO-2882 > Project: Accumulo > Issue Type: Bug > Components: start > Affects Versions: 1.6.0 > Reporter: Sean Busbey > Assignee: Anson Liu > Priority: Trivial > Labels: newbie > Fix For: 1.7.0, 1.6.3 > > Attachments: ACCUMULO-2882.patch > > > We handle initializing a new instance by calling a utility method on each of the metadata and root tables. That utility method ignores the passed table id and instead sets the initial table configs for each of the metadata and root tables. > That means we end up setting them twice. I believe the action is idempotent (since we're using the same values each time), so no failure should result. > {code} > public static void initMetadataConfig(String tableId) throws IOException { > try { > Configuration conf = CachedConfiguration.getInstance(); > int max = conf.getInt("dfs.replication.max", 512); > // Hadoop 0.23 switched the min value configuration name > int min = Math.max(conf.getInt("dfs.replication.min", 1), conf.getInt("dfs.namenode.replication.min", 1)); > if (max < 5) > setMetadataReplication(max, "max"); > if (min > 5) > setMetadataReplication(min, "min"); > for (Entry entry : initialMetadataConf.entrySet()) { > /* XXX There should only be one of these, and the table id should > be the one passed in. > */ > if (!TablePropUtil.setTableProperty(RootTable.ID, entry.getKey(), entry.getValue())) > throw new IOException("Cannot create per-table property " + entry.getKey()); > if (!TablePropUtil.setTableProperty(MetadataTable.ID, entry.getKey(), entry.getValue())) > throw new IOException("Cannot create per-table property " + entry.getKey()); > } > } catch (Exception e) { > log.fatal("error talking to zookeeper", e); > throw new IOException(e); > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)