You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-user@hadoop.apache.org by lei liu <li...@gmail.com> on 2011/01/23 07:21:27 UTC
create local file in tasktracker node
I want to use hadoop to create Berkeley DB index, so I need create one
directory to store Berkeley DB index, There are below code in reduce :
String tmp = job.get("hadoop.tmp.dir");
String shardName = "shard" + this.shardNum + "_" +
UUID.randomUUID().toString();
this.localIndexFile = new File(tmp, shardName);
if (!localIndexFile.exists()) {
boolean isSuccessfull = localIndexFile.mkdir();
LOG.info("create directory " + this.localIndexFile + ": " +
isSuccessfull);
}
but the localIndexFile.mkdir() method return false, could everyone tell me
why the method return false, whether my reduce task instance don't have the
permission?
Thanks,
LiuLei