Return-Path: Delivered-To: apmail-lucene-hadoop-dev-archive@locus.apache.org Received: (qmail 17631 invoked from network); 1 Nov 2007 18:10:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Nov 2007 18:10:28 -0000 Received: (qmail 68528 invoked by uid 500); 1 Nov 2007 18:09:59 -0000 Delivered-To: apmail-lucene-hadoop-dev-archive@lucene.apache.org Received: (qmail 68503 invoked by uid 500); 1 Nov 2007 18:09:59 -0000 Mailing-List: contact hadoop-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hadoop-dev@lucene.apache.org Delivered-To: mailing list hadoop-dev@lucene.apache.org Received: (qmail 68488 invoked by uid 99); 1 Nov 2007 18:09:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2007 11:09:59 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2007 18:10:10 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 9B3F6714231 for ; Thu, 1 Nov 2007 11:09:50 -0700 (PDT) Message-ID: <29370245.1193940590632.JavaMail.jira@brutus> Date: Thu, 1 Nov 2007 11:09:50 -0700 (PDT) From: "dhruba borthakur (JIRA)" To: hadoop-dev@lucene.apache.org Subject: [jira] Updated: (HADOOP-1912) Datanode should support block replacement In-Reply-To: <15213579.1190067643702.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HADOOP-1912?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] dhruba borthakur updated HADOOP-1912: ------------------------------------- Resolution: Fixed Status: Resolved (was: Patch Available) I just committed this. Thanks Hairong! > Datanode should support block replacement > ----------------------------------------- > > Key: HADOOP-1912 > URL: https://issues.apache.org/jira/browse/HADOOP-1912 > Project: Hadoop > Issue Type: New Feature > Components: dfs > Affects Versions: 0.14.1 > Reporter: Hairong Kuang > Assignee: Hairong Kuang > Fix For: 0.16.0 > > Attachments: replace.patch, replace1.patch, replace2.patch, replace3.patch, replace4.patch, replace5.patch, replace6.patch > > > This jira Data Node's support for rebalancing (HADOOP-1652). When a balancer decides to move a block B from Source S to Destination D. It also chooses a proxy source PS, which contains a replica of B, to speed up block copy. The block placement is carried in the following steps: > 1. A block copy command is sent to datanode PS in the format of "OP_BLOCK_COPY ". It requests PS to copy B to datanode D. > 2. PS then transfers block B to datanode D with a block replacement command to D in the format of "OP_BLOCK_REPLACEMENT ". > 3. Datanode D writes the block B to its disk and then sends a name node a blockReceived RPC informing the namenode that a block B is received and please delete a replica of B from source S if there is any excessive replica. > 4. The namenode then adds datanode D to block B's map and removes an exesive replicas of B in favor of datanode S. > In addition, each data node has a limited bandwidth for rebalancing. The default value for the bandwidth is 5MB/s. Throttling is done at both source & destination sides. Each data node limits maximum number of concurrent data transfers (including both sending and receiving) for the rebalancing purpose to be 5. In the worst case, each data transfer has a limited bandwidth of 1MB/s. Each sender & receiver has a Throttler. The primary method of the class is "throttle( int numOfBytes )". The parameter numOfBytes indicates the total number of bytes that the caller has sent or received since the last throttle is called. The method calculates the caller's I/O rate. If the rate is faster than the bandwidth limit, it sleeps to slow down the data transfer. After it wakes up, it adjusts its bandwidth limit if the number of concurrent data transfers is changed. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.