[
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<Replica> getStoredReplicas(String bpid) throws
IOException {
+292 public Iterator<Replica> 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)