[ 
https://issues.apache.org/jira/browse/HDFS-9281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15048937#comment-15048937
 ] 

Colin Patrick McCabe commented on HDFS-9281:
--------------------------------------------

Thanks, [~eddyxu].

{{checkBlockPool}} feels like an awkward name.  It makes me think this function 
is doing something to validate the contents of the block pool-- when in fact, 
it's just checking for existence.  And the fact that it can also check for 
non-existence if {{false}} is passed makes it even more confusing.

How about splitting this into a {{verifyBlockPoolExists}} function for 
verifying that the block pool exists, and a {{verifyBlockPoolMissing}} function 
for verifying that the block pool is missing?

> Change TestDeleteBlockPool to not explicitly use File to check block pool 
> existence.
> ------------------------------------------------------------------------------------
>
>                 Key: HDFS-9281
>                 URL: https://issues.apache.org/jira/browse/HDFS-9281
>             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-9281.00.patch, HDFS-9281.02.patch, 
> HDFS-9281.combo.00.patch
>
>
> {{TestDeleteBlockPool}} checks the existence of a block pool by checking the 
> directories in the file-based block pool exists. However, it does not apply 
> to non file based fsdataset. 
> We can fix it by abstracting the checking logic behind {{FsDatasetTestUtils}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to