accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Busbey (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ACCUMULO-2882) Initialize double-sets the initial configuration for the metadata and root tables
Date Fri, 13 Jun 2014 06:25:02 GMT

    [ https://issues.apache.org/jira/browse/ACCUMULO-2882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14030297#comment-14030297
] 

Sean Busbey commented on ACCUMULO-2882:
---------------------------------------

Hi Anson!

1) I think your patch accidentally included previous commits from some other tickets. please
review [the guide for contributors|http://accumulo.apache.org/git.html#contributors] and ensure
you're generating a patch for only your fix for this issue.

2) the initiMetadataConfig call should continue to use a passed tableID. rather than rely
on idempotency to mask the bug, the function should properly only set table properties on
the passed in table id.

> 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.6.1, 1.7.0
>
>         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<String,String> 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.2#6252)

Mime
View raw message