Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A1A1A10543 for ; Mon, 7 Oct 2013 05:29:23 +0000 (UTC) Received: (qmail 15482 invoked by uid 500); 7 Oct 2013 05:28:50 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 15444 invoked by uid 500); 7 Oct 2013 05:28:46 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 15428 invoked by uid 99); 7 Oct 2013 05:28:44 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Oct 2013 05:28:44 +0000 Date: Mon, 7 Oct 2013 05:28:43 +0000 (UTC) From: "Vinay (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-5257) addBlock() retry should return LocatedBlock with locations else client will get AIOBE MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-5257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13787915#comment-13787915 ] Vinay commented on HDFS-5257: ----------------------------- Attached the patch with JavaDoc updation. Please review. > addBlock() retry should return LocatedBlock with locations else client will get AIOBE > ------------------------------------------------------------------------------------- > > Key: HDFS-5257 > URL: https://issues.apache.org/jira/browse/HDFS-5257 > Project: Hadoop HDFS > Issue Type: Bug > Components: hdfs-client, namenode > Affects Versions: 2.1.1-beta > Reporter: Vinay > Assignee: Vinay > Priority: Critical > Attachments: HDFS-5257.patch, HDFS-5257.patch > > > {{addBlock()}} call retry should return the LocatedBlock with locations if the block was created in previous call and failover/restart of namenode happened. > otherwise client will get {{ArrayIndexOutOfBoundsException}} while creating the block and write will fail. > {noformat}java.lang.ArrayIndexOutOfBoundsException: 0 > at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.createBlockOutputStream(DFSOutputStream.java:1118) > at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.nextBlockOutputStream(DFSOutputStream.java:1078) > at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:511){noformat} -- This message was sent by Atlassian JIRA (v6.1#6144)