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 9CA841074A for ; Sat, 15 Feb 2014 04:09:32 +0000 (UTC) Received: (qmail 88088 invoked by uid 500); 15 Feb 2014 04:09:30 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 86893 invoked by uid 500); 15 Feb 2014 04:09:28 -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 86878 invoked by uid 99); 15 Feb 2014 04:09:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 15 Feb 2014 04:09:26 +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 divs.sheth@gmail.com designates 209.85.219.49 as permitted sender) Received: from [209.85.219.49] (HELO mail-oa0-f49.google.com) (209.85.219.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 15 Feb 2014 04:09:21 +0000 Received: by mail-oa0-f49.google.com with SMTP id i7so15500080oag.36 for ; Fri, 14 Feb 2014 20:09:00 -0800 (PST) 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=uMK34E/TNFSZDiix3Th47Din+RP7QBxoNlfxX1QLDEA=; b=HFg3toC6oGGTan3oaE1xF1fDUV0MrfO/m6lhoILCSoiqOs0hGbct9cvc3yat3nxnpn W6jx6NZpBtNAYew9MItIesLDIrJk+kw+Ci/Kh4av9URh0EeIA8tZu9KGOVcQjXvLQBI6 wN8NQkJx7EE7wRDuxP+1qjFjiDqo+5aP8UUlt6/saGpWN4IZl/dgnRiYV+7HrIW7hSUl 4CEk3bmILgK/KSCy9xFm9SVs33/mWtgj0GqW6yuvFny1XfPodxbP/UDoK+WcjHLAUv3O SmVQwhZhaFQw/WTipSJfhf1IZIbcU+WPylgfqAP7udJ9N7lSlKt2qFo0IuyYWpz0nbfM nPxQ== MIME-Version: 1.0 X-Received: by 10.182.81.197 with SMTP id c5mr6886495oby.40.1392437340600; Fri, 14 Feb 2014 20:09:00 -0800 (PST) Received: by 10.76.23.4 with HTTP; Fri, 14 Feb 2014 20:09:00 -0800 (PST) Received: by 10.76.23.4 with HTTP; Fri, 14 Feb 2014 20:09:00 -0800 (PST) In-Reply-To: References: Date: Sat, 15 Feb 2014 09:39:00 +0530 Message-ID: Subject: Re: Copying data from one Hbase cluster to Another Hbase cluster From: divye sheth To: user@hbase.apache.org Content-Type: multipart/alternative; boundary=047d7b2e4d580effa004f26a1550 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b2e4d580effa004f26a1550 Content-Type: text/plain; charset=ISO-8859-1 You could try the hadoop distcp command to transfer the hbase directory from one cluster to other. This does not require u to setup mapreduce, it will start a mapred job in local mode i.e. single mapper. When copying from one cluster to another remember not to copy -ROOT- and .META. I have used this method without facing any data loss. After the copy is complete start ur new hbase it should be able to read the contents and build region infornation from new directory. Thanks D On Feb 14, 2014 5:45 PM, "Samir Ahmic" wrote: > Well that depends on size of your dataset. You can use hadoop -copyToLocal > to copy /hbase directory to local disk or some other storage device that > is mounted on your original cluster. Then you can copy /hbase dir to second > cluster with hadoop -copyFromLocal . Of course this will require that > source and destionation hbase cluster are offline. I have never used this > approach but it should work. > > Regards > > > > > On Fri, Feb 14, 2014 at 11:15 AM, Vimal Jain wrote: > > > Hi Samir, > > As far as i know all these techniques require map reduce daemons to be up > > on source and destination cluster. > > Is there any other solution which does not require map reduce at all ? > > > > > > On Fri, Feb 14, 2014 at 2:41 PM, Samir Ahmic > > wrote: > > > > > Hi Vimal, > > > > > > I have few options how to move data from one hbase cluster to another: > > > > > > > > > 1. You can use org.apache.hadoop.hbase.mapreduce.Export tool to > export > > > tables to HDFS and then you can use hadoop distcp to move data to > > > another > > > cluster. When data is place on second cluster you can use > > > org.apache.hadoop.hbase.mapreduce.Import tool to import tables. > Please > > > look at http://hbase.apache.org/book.html#export. > > > 2. Second option is to us CopyTable tool, please look at: > > > http://hbase.apache.org/book.html#copytable > > > 3. Third option is to enable hbase Snapshots, create table > snapshots, > > > and then use ExportSnapshot tool to move them to second cluster. > When > > > snapshots are on second cluster you can clone tables from snapshots. > > > Please > > > look: http://hbase.apache.org/book.html#ops.snapshots > > > > > > I was using 1 and 3 for moving data between clusters and i in my case 3 > > was > > > better solution. > > > > > > Regards > > > Samir > > > > > > > > > > > > On Fri, Feb 14, 2014 at 8:33 AM, Vimal Jain wrote: > > > > > > > Hi, > > > > I have Hbase and Hadoop setup in pseudo distributed mode in > production. > > > > Now i am planning to move from pseudo distributed mode to fully > > > distributed > > > > mode ( 2 node cluster). > > > > My existing Hbase and Hadoop version are 1.1.2 and 0.94.7. > > > > And i am planning to have full distributed mode with Hbase version > > > 0.94.16 > > > > and Hadoop version ( either 1.X or 2.X , not yet decided ). > > > > > > > > What are different ways to copy data from existing setup ( pseudo > > > > distributed mode ) to this new setup ( 2 node fully distributed > mode). > > > > > > > > Please help. > > > > > > > > -- > > > > Thanks and Regards, > > > > Vimal Jain > > > > > > > > > > > > > > > -- > > Thanks and Regards, > > Vimal Jain > > > --047d7b2e4d580effa004f26a1550--