[
https://issues.apache.org/jira/browse/HBASE-10950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13973461#comment-13973461
]
Nick Dimiduk commented on HBASE-10950:
--------------------------------------
I'm suggesting a pattern more like other config access
{noformat}
public static final DEFAULT_VERSIONS = 1;
...
int myMaxVersions = conf.getInt("hbase.column.max.version", DEFAULT_VERSIONS);
{noformat}
However, looking at how DEFAULT_VERSIONS is used consumed in the codebase, it's
mostly in static initializers and not convenient for configuration override.
For instance, it's use in HColumnDescriptor(byte[]) isn't amiable to a local
configuration context.
bq. They can just add it to hbase-site.xml and it will get parsed in won't it?
Yes, this is true for deployments. I'm thinking in mind of tests and other
runtime scenarios where it may be desirable to override this value. When the
configs are read statically at class load time, there's no opportunity to
inject an override to this behavior.
In light of that, I revoke my objection to this approach.
Why is the test in package org.apache.hadoop.hbase.master.handler? I think it
should be in org.apache.hadoop.hbase. Test name should be
Test*H*ColumnDescriptorDefaultVersions.
Cleanup those two nits and I think you're good to go.
> Add a configuration point for MaxVersion of Column Family
> ----------------------------------------------------------
>
> Key: HBASE-10950
> URL: https://issues.apache.org/jira/browse/HBASE-10950
> Project: HBase
> Issue Type: Improvement
> Components: Admin
> Affects Versions: 0.98.0, 0.96.0
> Reporter: Demai Ni
> Assignee: Enoch Hsu
> Fix For: 0.99.0, 0.98.2, 0.96.3
>
> Attachments: HBASE_10950.patch, HBASE_10950_v2.patch
>
>
> Starting on 0.96.0. HColumnDescriptor.DEFAULT_VERSIONS change to 1 from 3.
> So a columnfamily will be default have 1 version of data. Currently a user
> can specifiy the maxVersion during create table time or alter the columnfam
> later. This feature will add a configuration point in hbase-sit.xml so that
> an admin can set the default globally.
> a small discussion in
> [HBASE-10941|https://issues.apache.org/jira/browse/HBASE-10941] lead to this
> jira
--
This message was sent by Atlassian JIRA
(v6.2#6252)