code: private void configureUserName(JobConf job) throws IOException {
      UnixUserGroupInformation ugi = getUGI(job);
     // Set the user's name, group and working directory
      job.setUser(ugi.getUserName());
      if (ugi.getGroupNames() != null && ugi.getGroupNames().length > 0) {
        job.set("group.name", ugi.getGroupNames()[0]);
      }
      if (job.getWorkingDirectory() == null) {
        job.setWorkingDirectory(fs.getWorkingDirectory());
      }
    }
docs: set this user's id in job configuration, so later job files can be
  accessed using this user's id
  @param job
  @throws IOException