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 B00FA17A3E for ; Wed, 2 Dec 2015 08:19:11 +0000 (UTC) Received: (qmail 79762 invoked by uid 500); 2 Dec 2015 08:19:11 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 79697 invoked by uid 500); 2 Dec 2015 08:19:11 -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 79513 invoked by uid 99); 2 Dec 2015 08:19:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Dec 2015 08:19:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 071982C1F6E for ; Wed, 2 Dec 2015 08:19:11 +0000 (UTC) Date: Wed, 2 Dec 2015 08:19:11 +0000 (UTC) From: "Colin Patrick McCabe (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-9267) TestDiskError should get stored replicas through FsDatasetTestUtils. 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-9267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15035454#comment-15035454 ] Colin Patrick McCabe commented on HDFS-9267: -------------------------------------------- Thanks for working on this, [~eddyxu]. This is a lot more code than I was expecting. Patch 002 is really simple... I wish we could do something that was as simple. Does it make sense to do something like what patch 002 is doing and just change {code} -292 public Collection getStoredReplicas(String bpid) throws IOException { +292 public Iterator getStoredReplicas(String bpid) throws IOException { {code} and {code} -308 return ret; +308 return ret.iterator(); {code} Since this is part of the test utils, we might not need to optimize it yet. Thanks again for working on this and sorry for the sometime slow reviews. > TestDiskError should get stored replicas through FsDatasetTestUtils. > -------------------------------------------------------------------- > > Key: HDFS-9267 > URL: https://issues.apache.org/jira/browse/HDFS-9267 > Project: Hadoop HDFS > Issue Type: Improvement > Components: test > Affects Versions: 2.7.1 > Reporter: Lei (Eddy) Xu > Assignee: Lei (Eddy) Xu > Priority: Minor > Attachments: HDFS-9267.00.patch, HDFS-9267.01.patch, HDFS-9267.02.patch, HDFS-9267.03.patch, HDFS-9267.04.patch, HDFS-9267.05.patch > > > {{TestDiskError#testReplicationError}} scans local directories to verify blocks and metadata files, which leaks the details of {{FsDataset}} implementation. > This JIRA will abstract the "scanning" operation to {{FsDatasetTestUtils}}. -- This message was sent by Atlassian JIRA (v6.3.4#6332)