You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Jason Rutherglen <ja...@gmail.com> on 2011/04/13 01:28:23 UTC

Does changing the block size of MiniDFSCluster work?

I'm using the append 0.20.3 branch and am wondering why the following
fails, where setting the block size either in the Configuration or the
DFSClient.create method causes a failure later on when writing a file
out.

Configuration conf = new Configuration();
long blockSize = (long)32 * 1024 * 1024 * 1024;
conf.setLong("dfs.block.size", blockSize); // doesn't work
MiniDFSCluster cluster = new MiniDFSCluster(conf, 1, true, null);
FileSystem fileSys = cluster.getFileSystem();
fileSys.create(path, false, bufferSize, replication, blockSize); // doesn't work
fileSys.create(path); //works

Output: http://pastebin.com/MrQJcbJr