code: public static Path getJobStateFilePath(boolean usingStateStore, Path appWorkPath, String jobId) {
      final Path jobStateFilePath;
  
      // the state store uses a path of the form workdir/_jobstate/job_id/job_id.job.state while old method stores the file
      // in the app work dir.
      if (usingStateStore) {
        jobStateFilePath = new Path(appWorkPath, GobblinClusterConfigurationKeys.JOB_STATE_DIR_NAME
            + Path.SEPARATOR + jobId + Path.SEPARATOR + jobId + "."
            + AbstractJobLauncher.JOB_STATE_FILE_NAME);
  
      } else {
        jobStateFilePath = new Path(appWorkPath, jobId + "." + AbstractJobLauncher.JOB_STATE_FILE_NAME);
      }
  
      log.info("job state file path: " + jobStateFilePath);
  
      return jobStateFilePath;
    }
docs: Generate the path to the job.state file
  @param usingStateStore is a state store being used to store the job.state content
  @param appWorkPath work directory
  @param jobId job id
  @return a {@link Path} referring to the job.state