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 2C99911B4A for ; Fri, 2 May 2014 20:40:27 +0000 (UTC) Received: (qmail 10682 invoked by uid 500); 2 May 2014 20:40:16 -0000 Delivered-To: apmail-hadoop-hdfs-dev-archive@hadoop.apache.org Received: (qmail 10540 invoked by uid 500); 2 May 2014 20:40:15 -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 10525 invoked by uid 99); 2 May 2014 20:40:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 May 2014 20:40:15 +0000 Date: Fri, 2 May 2014 20:40:15 +0000 (UTC) From: "Konstantin Shvachko (JIRA)" To: hdfs-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HDFS-6325) Append should fail if the last block has unsufficient number of replicas MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Konstantin Shvachko created HDFS-6325: ----------------------------------------- Summary: Append should fail if the last block has unsufficient number of replicas Key: HDFS-6325 URL: https://issues.apache.org/jira/browse/HDFS-6325 Project: Hadoop HDFS Issue Type: Bug Components: namenode Affects Versions: 2.2.0 Reporter: Konstantin Shvachko Fix For: 2.5.0 Currently append() succeeds on a file with the last block that has no replicas. But the subsequent updatePipeline() fails as there are no replicas with the exception "Unable to retrieve blocks locations for last block". This leaves the file unclosed, and others can not do anything with it until its lease expires. The solution is to check replicas of the last block on the NameNode and fail during append() rather than during updatePipeline(). How many replicas should be present before NN allows to append? I see two options: # min-replication: allow append if the last block is minimally replicated (1 by default) # full-replication: allow append if the last block is fully replicated (3 by default) -- This message was sent by Atlassian JIRA (v6.2#6252)