code: public 
    static Path getPathForWorkFile(TaskInputOutputContext<?,?,?,?> context, 
                                   String name,
                                   String extension
                                  ) throws IOException, InterruptedException {
      return new Path(getWorkOutputPath(context),
                      getUniqueFile(context, name, extension));
    }
docs: Helper function to generate a {@link Path} for a file that is unique for
  the task within the job output directory.
  
  <p>The path can be used to create custom files from within the map and
  reduce tasks. The path name will be unique for each task. The path parent
  will be the job output directory.</p>ls
  
  <p>This method uses the {@link #getUniqueFile} method to make the file name
  unique for the task.</p>
  
  @param context the context for the task.
  @param name the name for the file.
  @param extension the extension for the file
  @return a unique path accross all tasks of the job.