code: public static Optional<Path> getPersistDir(State state) throws IOException {
      if (state.contains(PERSIST_DIR_KEY)) {
        return Optional
            .of(new Path(state.getProp(PERSIST_DIR_KEY), UserGroupInformation.getCurrentUser().getShortUserName()));
      }
      return Optional.absent();
    }
docs: Get the persist directory for this job.
  @param state {@link State} containing job information.
  @return A {@link Path} used as persist directory for this job. Note this path is user-specific for security reasons.
  @throws java.io.IOException