code: private void markOutputDirSuccessful(JobContext context)
    throws IOException {
      if (outputPath != null) {
        FileSystem fileSys = outputPath.getFileSystem(context.getConfiguration());
        if (fileSys.exists(outputPath)) {
          // create a file in the folder to mark it
          Path filePath = new Path(outputPath, SUCCEEDED_FILE_NAME);
          fileSys.create(filePath).close();
        }
      }
    }
docs: Mark the output dir of the job for which the context is passed.