Return-Path: X-Original-To: apmail-hadoop-hdfs-dev-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C6A7FF2CA for ; Tue, 9 Jul 2013 01:01:55 +0000 (UTC) Received: (qmail 59753 invoked by uid 500); 9 Jul 2013 01:01:54 -0000 Delivered-To: apmail-hadoop-hdfs-dev-archive@hadoop.apache.org Received: (qmail 59675 invoked by uid 500); 9 Jul 2013 01:01:54 -0000 Mailing-List: contact hdfs-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-dev@hadoop.apache.org Delivered-To: mailing list hdfs-dev@hadoop.apache.org Received: (qmail 59667 invoked by uid 99); 9 Jul 2013 01:01:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Jul 2013 01:01:54 +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 (nike.apache.org: domain of azuryyyu@gmail.com designates 209.85.223.170 as permitted sender) Received: from [209.85.223.170] (HELO mail-ie0-f170.google.com) (209.85.223.170) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Jul 2013 01:01:48 +0000 Received: by mail-ie0-f170.google.com with SMTP id e11so11593723iej.15 for ; Mon, 08 Jul 2013 18:01:28 -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=Pz9JcDiOG1+ChwJ7nIv4cCbeLeQuL//q7R6fWuobavk=; b=XIVtlSyRZTJms6Wpzo5dmtXrs3K+Bhr6a6uIe6lgiyeoucVi4pGQWqvuztt/+wYiFM B3sbu/7gWZf8HgouN4zmrJogbI0sQIDXpOL7qUfX6QHcj6wUnu7yKDHaVgCJ1ON0luhA DC04pAQHdoFhkKgbg4QfCmQMiRI/7uY0enrCFq00DlJ5cqo/S4L4eZWZEfbk+eWnJWnP uGiaESwG1NfCeMGmUGJEjJlrww41Dy96YVNufNwxsWewKOfemyWl7RlrIJtiweQcTaRz 66TOZ8ljEwU8PRhu6QVgHdOH052OuBzwgkrHbTEbV/1mheG2s9JDNHMlVegaO0etZEo1 V0DQ== MIME-Version: 1.0 X-Received: by 10.43.65.144 with SMTP id xm16mr7728240icb.112.1373331687924; Mon, 08 Jul 2013 18:01:27 -0700 (PDT) Received: by 10.64.229.36 with HTTP; Mon, 8 Jul 2013 18:01:27 -0700 (PDT) In-Reply-To: References: Date: Tue, 9 Jul 2013 09:01:27 +0800 Message-ID: Subject: Re: Can I move block data directly? From: Azuryy Yu To: "hdfs-dev@hadoop.apache.org" Content-Type: multipart/alternative; boundary=bcaec51b1b6f6aea5004e109b30a X-Virus-Checked: Checked by ClamAV on apache.org --bcaec51b1b6f6aea5004e109b30a Content-Type: text/plain; charset=ISO-8859-1 Hi Harsh, I also do agree with you that this is crude. and balancer is the right way. I just want to slove the problem very quickly. and only a few nodes involved. Thanks. On Tue, Jul 9, 2013 at 8:50 AM, Harsh J wrote: > Eitan, > > The block to host mapping isn't persisted in the metadata. This is > also the reason why the steps include a restart, which will re-trigger > a block report (and avoid gotchas) that will update the NN of the new > listing at each DN. Thats what makes this method "crude" at the same > time - you're leveraging a behavior thats not guaranteed to be > unchanged in future. > > The balancer is the right way to go about it. > > On Mon, Jul 8, 2013 at 6:53 PM, Eitan Rosenfeld wrote: > > Hi Azurry, I'd also like to be able to manually move blocks. > > > > One piece that is missing in your current approach is updating any > > block mappings that the cluster relies on. > > The namenode has a mapping of blocks to datanodes, and the datanode > > has, as the comments say, a "block -> stream of bytes" mapping. > > > > As I understand it, the namenode's mappings have to be updated to > > reflect the new block locations. > > The datanode might not need intervention, I'm not sure. > > > > Can anyone else chime in on those areas? > > > > The balancer that Allan suggested likely demonstrates all of the ins > > and outs in order successfully complete a block transfer. > > Thus, the balancer is where I'll begin my efforts to learn how to > > manually move blocks. > > > > Any other pointers would be helpful. > > > > Thank you, > > Eitan > > > > On Mon, Jul 8, 2013 at 2:15 PM, Allan wrote: > >> If the imbalance is across data nodes then you need to run the balancer. > >> > >> Sent from my iPad > >> > >> On Jul 8, 2013, at 1:15 AM, Azuryy Yu wrote: > >> > >>> Hi Dear all, > >>> > >>> There are some unbalanced data nodes in my cluster, some nodes reached > more > >>> than 95% disk usage. > >>> > >>> so Can I move some block data from one node to another node directly? > >>> > >>> such as: from n1 to n2: > >>> > >>> 1) scp /data/xxxx/blk_* n2:/data/subdir11/ > >>> 2) rm -rf data/xxxx/blk_* > >>> 3) hadoop-dameon.sh stop datanode (on n1) > >>> 4) hadoop-damon.sh start datanode(on n1) > >>> 5) hadoop-dameon.sh stop datanode (on n2) > >>> 6) hadoop-damon.sh start datanode(on n2) > >>> > >>> Am I right? Thanks for any inputs. > > > > -- > Harsh J > --bcaec51b1b6f6aea5004e109b30a--