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

Andras Bokor commented on HDFS-10287:
-------------------------------------

I see your point about the tests.
These tests were added with HDFS-2209. Before this patch {{MiniDFSCluster}} 
used only {{test.build.data}} system property to determine the base directory. 
Now the base directory can be set through config object. Based on the comments 
on HDFS-2209 before the patch to create two instance in the same JVM was not 
possible (that is not 100% clear to me why. For me it seems setting the system 
property between the two cluster initialization should work.). It seems to me 
{{testDualCluster}} is a proof of concept that the new feature works. But 
indeed, the first test proves that the {{MiniDFSCluster}} uses 
{{hdfs.minidfs.basedir}} property well.
What is your suggestion? Leave as it is or modify/remove?

> MiniDFSCluster should implement AutoCloseable
> ---------------------------------------------
>
>                 Key: HDFS-10287
>                 URL: https://issues.apache.org/jira/browse/HDFS-10287
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: test
>    Affects Versions: 2.7.0
>            Reporter: John Zhuge
>            Assignee: John Zhuge
>            Priority: Trivial
>         Attachments: HDFS-10287.01.patch
>
>
> {{MiniDFSCluster}} should implement {{AutoCloseable}} in order to support 
> [try-with-resources|https://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html].
>  It will make test code a little cleaner and more reliable.
> Since {{AutoCloseable}} is only in Java 1.7 or later, this can not be 
> backported to Hadoop version prior to 2.7.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to