hadoop-hdfs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <ste...@hortonworks.com>
Subject Re: MiniDFSCluster
Date Fri, 07 Sep 2012 13:15:11 GMT
On 5 September 2012 18:42, Vladimir Rozov <v.rozov@comcast.net> 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?

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message