code: public Path getLocalPathForWrite(String pathStr, 
        Configuration conf) throws IOException {
      return getLocalPathForWrite(pathStr, -1, conf);
    }
docs: Get a path from the local FS. This method should be used if the size of
  the file is not known apriori. We go round-robin over the set of disks
  (via the configured dirs) and return the first complete path where
  we could create the parent directory of the passed path.
  @param pathStr the requested path (this will be created on the first
  available disk)
  @param conf the Configuration object
  @return the complete path to the file on a local disk
  @throws IOException