/**
  * Creates a temporary file in the local FS. Pass size as -1 if not known apriori. We round-robin
  * over the set of disks (via the configured dirs) and select the first complete path which has
  * enough space. A file is created on this directory. The file is guaranteed to go away when the
  * JVM exits.
  *
  * @param pathStr prefix for the temporary file
  * @param size the size of the file that is going to be written
  * @param conf the Configuration object
  * @return a unique temporary file
  * @throws IOException
  */
 public File createTmpFileForWrite(String pathStr, long size, Configuration conf)
     throws IOException {
   AllocatorPerContext context = obtainContext(contextCfgItemName);
   return context.createTmpFileForWrite(pathStr, size, conf);
 }