Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
HDFS >> mail # dev >> MiniDFSCluster

Copy link to this message
Re: MiniDFSCluster
On 5 September 2012 18:42, Vladimir Rozov <[EMAIL PROTECTED]> wrote:

> There are few methods on MiniDFSCluster class that are declared as static
> (getBlockFile, getStorageDirPath), though as long as MiniDFSCluster is not
> a singleton they should be instance methods not class methods.
These aren't in 1.x, but new stuff in 2.x, which means that this behaviour
is a regression.
> In my tests I see that starting second instance of MiniDFSCluster
> invalidates the first instance if I don’t change cluster base directory
> (existing data directory is fully deleted), but at the same time static
> declaration of getBlockFile and getStorageDirPath does not allow base
> directory to be changed without affecting functionality.

This is a regression. for 1.0 you can change dir by setting the relevant
data directory "test.build.dir".

I don't see any reason why the static stuff is really needed, it's used in
various tests, but that could be changed -especially as the static methods
aren't in 1.x.

Why not file a JIRA -and perhaps a patch?