Hi all,
I have a 50 node cluster and I am trying to write some logs of size 1GB each into hdfs. I need to write them in temporal fashion say for every 15 mins worth of data, I am closing previously opened file and creating a new file. The snippet of code is if(<some condition>) { if(out != null) { out.close(); } String outFileStr = outputDir+ File.separator + outDate + File.separator + outFileSuffix + "." + outputMinute; System.out.println("Creating outFileStr:"+ outFileStr); Path outFile = new Path(outFileStr); out = fs.create(outFile); //It throws exception here saying Already Being Created } When I run this code, I am getting Intermittent "Already Being Created Exceptions". I am not having any threads and this code is running sequentially. I went thru the previous mailing list posts but couldn't get much information. Can anyone please tell me why this is happening and how to avoid this? Thanks Pallavi