Return-Path: Delivered-To: apmail-hadoop-general-archive@minotaur.apache.org Received: (qmail 23693 invoked from network); 2 Jul 2010 06:15:08 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Jul 2010 06:15:08 -0000 Received: (qmail 5769 invoked by uid 500); 2 Jul 2010 06:15:07 -0000 Delivered-To: apmail-hadoop-general-archive@hadoop.apache.org Received: (qmail 5497 invoked by uid 500); 2 Jul 2010 06:15:04 -0000 Mailing-List: contact general-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: general@hadoop.apache.org Delivered-To: mailing list general@hadoop.apache.org Received: (qmail 5484 invoked by uid 99); 2 Jul 2010 06:15:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Jul 2010 06:15:04 +0000 X-ASF-Spam-Status: No, hits=4.4 required=10.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of eltonsky9404@gmail.com designates 209.85.216.169 as permitted sender) Received: from [209.85.216.169] (HELO mail-qy0-f169.google.com) (209.85.216.169) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Jul 2010 06:14:56 +0000 Received: by qyk32 with SMTP id 32so289238qyk.14 for ; Thu, 01 Jul 2010 23:13:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=Z6EwRxpL+L8fXYpexHkXFSrePams1QsdTpKMMFtOtvg=; b=PhU6paSlxidd0cE889l06YdKJu1IzEF0hme+6RNAeKJgBEURz1nW3T+32iklS+afV/ oKAGV2OM4XFBzD3We5Z/9OacD9O0valyKDiTAUSs3kzurjaB9i/t6bh2ivfcVzdlkMyA Yx0SGKXmN7P71wEGsm+mxczpuX9d+h9PRqxDg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=kZtKkDslC+Cp9+QM1J/GKBeVtdjm2cxy/3JeHnoOJqSyhY+uD9Njqh0rQ6zmov/uPK JE6P5LrCgXPjzqAFRga4VIAo/C3WN/rbeaAI36dNQAJI4hYoTyU/a/be2pqfdP523BAR 9suV7ViodaKn0ufEJu6hPHcQwAj6Jd32NqVb4= MIME-Version: 1.0 Received: by 10.224.87.6 with SMTP id u6mr96737qal.214.1278051215262; Thu, 01 Jul 2010 23:13:35 -0700 (PDT) Received: by 10.224.89.18 with HTTP; Thu, 1 Jul 2010 23:13:35 -0700 (PDT) Date: Fri, 2 Jul 2010 16:13:35 +1000 Message-ID: Subject: Why single thread for HDFS? From: elton sky To: general@hadoop.apache.org Content-Type: multipart/alternative; boundary=00c09f99e549b0c5ec048a617cb5 X-Virus-Checked: Checked by ClamAV on apache.org --00c09f99e549b0c5ec048a617cb5 Content-Type: text/plain; charset=ISO-8859-1 I guess this question was igored, so I just post it again. >From my understanding, HDFS uses a single thread to do read and write. Since a file is composed of many blocks and each block is stored as a file in the underlying FS, we can do some parallelism on block base. When read across multi-blocks, threads can be used to read all blocks. When write, we can calculate the offset of each block and write to all of them simultaneously. Is this right? --00c09f99e549b0c5ec048a617cb5--