Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1676510D8A for ; Tue, 30 Jul 2013 22:31:50 +0000 (UTC) Received: (qmail 59302 invoked by uid 500); 30 Jul 2013 22:31:49 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 59274 invoked by uid 500); 30 Jul 2013 22:31:49 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 59265 invoked by uid 99); 30 Jul 2013 22:31:49 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Jul 2013 22:31:49 +0000 Date: Tue, 30 Jul 2013 22:31:49 +0000 (UTC) From: "Chris Trezzo (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-8771) ensure replication_scope's value is either local(0) or global(1) 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/HBASE-8771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13724521#comment-13724521 ] Chris Trezzo commented on HBASE-8771: ------------------------------------- I think this patch as it stands will break tables that currently have a replication_scope set to something other then 1 or 0. I don't think that is acceptable for current users. [~anoop.hbase] brings up a good point that the original intent of replication_scope was to carry routing information (values outside of 0 and 1) and I don't see that large of a reason to restrict it now given that we might want to allow more values in the future. [~nidmhbase] do you think replication_scope values outside of 0 and 1 are causing a lot of confusion? Thoughts [~jdcryans]? > ensure replication_scope's value is either local(0) or global(1) > ---------------------------------------------------------------- > > Key: HBASE-8771 > URL: https://issues.apache.org/jira/browse/HBASE-8771 > Project: HBase > Issue Type: Bug > Components: Replication > Affects Versions: 0.94.8 > Reporter: Demai Ni > Assignee: Demai Ni > Priority: Minor > Fix For: 0.94.11 > > Attachments: HBASE-8771-0.94.8-v0.patch > > > For replication_scope, only two values are meaningful: > {code} > public static final int REPLICATION_SCOPE_LOCAL = 0; > public static final int REPLICATION_SCOPE_GLOBAL = 1; > {code} > However, there is no checking for that, so currently user can set it to any integer value. And all non-zero value will be treated as 1(GLOBAL). > This jira is to add a checking in HColumnDescriptor#setScope() so that only 0 and 1 will be accept during create_table or alter_table. > In the future, we can leverage replication_scope to store for info. For example: > -1: A columnfam is replicated from another cluster in MASTER_SLAVE setup (i.e readonly) > 2 : A columnfam is set MASTER_MASTER > Probably a major improve JIRA is needed for the future usage. It will be good to ensure the scope value at this moment. > {code:title=Testing|borderStyle=solid} > hbase(main):002:0> create 't1_dn',{NAME=>'cf1',REPLICATION_SCOPE=>2} > ERROR: java.lang.IllegalArgumentException: Replication Scope must be either 0(local) or 1(global) > ... > hbase(main):004:0> alter 't1_dn',{NAME=>'cf1',REPLICATION_SCOPE=>-1} > ERROR: java.lang.IllegalArgumentException: Replication Scope must be either 0(local) or 1(global) > ... > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira