Return-Path: X-Original-To: apmail-hbase-user-archive@www.apache.org Delivered-To: apmail-hbase-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6529210431 for ; Wed, 5 Jun 2013 04:37:49 +0000 (UTC) Received: (qmail 6095 invoked by uid 500); 5 Jun 2013 04:37:46 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 6013 invoked by uid 500); 5 Jun 2013 04:37:46 -0000 Mailing-List: contact user-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hbase.apache.org Delivered-To: mailing list user@hbase.apache.org Received: (qmail 6004 invoked by uid 99); 5 Jun 2013 04:37:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Jun 2013 04:37:45 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of anoop.hbase@gmail.com designates 209.85.216.174 as permitted sender) Received: from [209.85.216.174] (HELO mail-qc0-f174.google.com) (209.85.216.174) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Jun 2013 04:37:40 +0000 Received: by mail-qc0-f174.google.com with SMTP id m16so668943qcq.33 for ; Tue, 04 Jun 2013 21:37:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=lAskGMc67TdZB5bmKadcrGw0t7N7moflCQ5HwSzdvjs=; b=ESNv8qLZIZJuT9hso/cKisxNpQ51uZNZovuo02ZYrQ+nuMDCb3uvuTIUHB2rIxDQPi msYIk08nNqO8vCfWyQm5aiCJ1gsdEPqrSo0sup6/Y1qKVBExCzm0mgzITQp64DkI6iV9 eBC+7PP+m/DPIa00PG191y6SlNPWXIDhFiTglyz3AwyXuZj7HZzIdogDkrGIbfq61vCl XpVutslDFj+vVeZ0b8gLOHEoUE/LOgAkWBar21s3GC8smZI4fW/niyi53otlR0xJsasX +FdMtp83W19zG6jl0Y4qB7Jl2zxBK1K4oakjOjfH8zwy+eDYTt3M4Kgl/LNmekySYDeu KGZA== MIME-Version: 1.0 X-Received: by 10.229.171.202 with SMTP id i10mr10365814qcz.33.1370407039409; Tue, 04 Jun 2013 21:37:19 -0700 (PDT) Received: by 10.49.132.34 with HTTP; Tue, 4 Jun 2013 21:37:19 -0700 (PDT) In-Reply-To: References: Date: Wed, 5 Jun 2013 10:07:19 +0530 Message-ID: Subject: Re: Replication is on columnfamily level or table level? From: Anoop John To: user@hbase.apache.org Content-Type: multipart/alternative; boundary=001a11c35e1ec8244204de60c0d5 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c35e1ec8244204de60c0d5 Content-Type: text/plain; charset=ISO-8859-1 Yes the replication can be specified at the CF level.. You have used HCD#setScope() right? > S => '3', BLOCKSIZE => '65536'}, {*NAME => 'cf2', REPLICATION_SCOPE => '2'*, You set scope as 2?? You have to set one CF to be replicated to one cluster and another to to another cluster. I dont think it is supported even now. You can see in the HCD code that there are 2 constants for scope 0 and 1 where 1 means replicate and 0 means not to be replicated. -Anoop- On Wed, Jun 5, 2013 at 3:31 AM, N Dm wrote: > hi, folks, > > > > By reading several documents, I always have the impression that * > "Replication* works at the table-*column*-*family level*". However, when I > am setting up a table with two columnfamilies and replicate them to two > different slavers, the whole table replicated. Is this a bug? Thanks > > Here is the simple steps to receate. > > *Environment: * > Replication Master: hdtest014 > Replication Slave 1: hdtest017 > Replication Slave 2: hdtest009 > > *Create Table*: on Master, and the two slaves: create 't2_dn','cf1','cf2' > > *setup replication on Master*(hdtest014), so that > Master> list_peers > PEER_ID CLUSTER_KEY STATE > 1 hdtest017.svl.ibm.com:2181:/hbase ENABLED > 2 hdtest009.svl.ibm.com:2181:/hbase ENABLED > Master> > describe 't2_dn' > DESCRIPTION > ENABLED > {NAME => 't2_dn', FAMILIES => [{*NAME => 'cf1', REPLICATION_SCOPE => '1'*, > KEEP_DELETED_CELLS => 'fals > true > e', COMPRESSION => 'NONE', ENCODE_ON_DISK => 'true', BLOCKCACHE => 'true', > MIN_VERSIONS => '0', > DATA > _BLOCK_ENCODING => 'NONE', IN_MEMORY => 'false', BLOOMFILTER => 'NONE', > TTL => '2147483647', > VERSION > S => '3', BLOCKSIZE => '65536'}, {*NAME => 'cf2', REPLICATION_SCOPE => > '2'*, > KEEP_DELETED_CELLS => > 'fa > lse', COMPRESSION => 'NONE', ENCODE_ON_DISK => 'true', BLOCKCACHE => > 'true', MIN_VERSIONS => '0', > DA > TA_BLOCK_ENCODING => 'NONE', IN_MEMORY => 'false', BLOOMFILTER => 'NONE', > TTL => '2147483647', > VERSI > ONS => '3', BLOCKSIZE => > '65536'}]} > > 1 row(s) in 0.0250 seconds > > *Put rows into t2_dn on Master* > put 't2_dn','row1','cf1:q1','val1cf1fromMaster' > put 't2_dn','row1','cf2:q1','val1cf2fromMaster' > put 't2_dn','row2','cf1:q1','val2cf1fromMaster' > put 't2_dn','row3','cf2:q1','val3cf2fromMaster' > > *Expecting cf1 replicated to slave1, and cf2 replicatedto slave2. Where all > the three clusters got: * > scan 't2_dn' > ROW > COLUMN+CELL > > row1 column=cf1:q1, timestamp=1370382328358, > value=val1cf1fromMaster > row1 column=cf2:q1, timestamp=1370382334303, > value=val1cf2fromMaster > row2 column=cf1:q1, timestamp=1370382351716, > value=val2cf1fromMaster > row3 column=cf2:q1, timestamp=1370382367724, > value=val3cf2fromMaster > 3 row(s) in 0.0160 seconds > > Many thanks > > Demai > --001a11c35e1ec8244204de60c0d5--