hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashish Singhi (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-14154) DFS Replication should be configurable at column family level
Date Fri, 31 Jul 2015 06:11:05 GMT

    [ https://issues.apache.org/jira/browse/HBASE-14154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14648798#comment-14648798

Ashish Singhi commented on HBASE-14154:

Thanks [~lhofhansl] for the review.
Thank you so much [~andrew.purtell@gmail.com] for the patch.
bq. Another minor nit: I think there should be a check in setDFSReplication on whether the
passed value is valid.
Is It really required ? Because we are already calling {{HMaster#sanityCheckTableDescriptor}}
for both create and modify table calls, which will internally check this and I have not seen
any setter validating for the passed values except {{HColumnDescriptor#setVersions}}, which
is also being validated in {{HMaster#sanityCheckTableDescriptor}}.

(Not related to this jira)
While checking the code I see that {{MIN_VERSIONS}} in {{HColumnDescriptor}} class in HMaster#sanityCheckTableDescriptor
is getting validated for less than 0 
      // check versions
      if (hcd.getMinVersions() < 0) {
        String message = "Min versions for column family " + hcd.getNameAsString()
          + "  must be positive.";
        warnOrThrowExceptionForFailure(logWarn, CONF_KEY, message, null);
where as in HColumnDescriptor#setVersions, it is getting validated for less than or equal
to 0
    if (minVersions <= 0) {
      // TODO: Allow minVersion and maxVersion of 0 to be the way you say "Keep all versions".
      // Until there is support, consider 0 or < 0 -- a configuration error.
      throw new IllegalArgumentException("Minimum versions must be positive");
There are chances(very light) that it may lead to inconsistency.

> DFS Replication should be configurable at column family level
> -------------------------------------------------------------
>                 Key: HBASE-14154
>                 URL: https://issues.apache.org/jira/browse/HBASE-14154
>             Project: HBase
>          Issue Type: New Feature
>            Reporter: Ashish Singhi
>            Assignee: Ashish Singhi
>            Priority: Minor
>             Fix For: 2.0.0, 0.98.14, 1.3.0
>         Attachments: HBASE-14154-0.98-v1.patch, HBASE-14154-0.98.patch, HBASE-14154-branch-1-v1.patch,
HBASE-14154-branch-1.patch, HBASE-14154-v1.patch, HBASE-14154-v2.patch, HBASE-14154.patch
> There are cases where a user wants to have a control on the number of hfile copies he/she
can have in the cluster.
> For eg: For a test table user would like to have only one copy instead of three(default).

This message was sent by Atlassian JIRA

View raw message