code: public static void checkJobProperties(final int projectId, final Props props,
        final Map<String, Props> jobPropsMap, final Set<String> errors) {
      // if project is in the memory check whitelist, then we don't need to check
      // its memory settings
      if (ProjectWhitelist.isProjectWhitelisted(projectId,
          ProjectWhitelist.WhitelistType.MemoryCheck)) {
        return;
      }
  
      final MemConfValue maxXms = MemConfValue.parseMaxXms(props);
      final MemConfValue maxXmx = MemConfValue.parseMaxXmx(props);
  
      for (final String jobName : jobPropsMap.keySet()) {
        final Props jobProps = jobPropsMap.get(jobName);
        final String xms = jobProps.getString(XMS, null);
        if (xms != null && !PropsUtils.isVariableReplacementPattern(xms)
            && Utils.parseMemString(xms) > maxXms.getSize()) {
          errors.add(String.format(
              "%s: Xms value has exceeded the allowed limit (max Xms = %s)",
              jobName, maxXms.getString()));
        }
        final String xmx = jobProps.getString(XMX, null);
        if (xmx != null && !PropsUtils.isVariableReplacementPattern(xmx)
            && Utils.parseMemString(xmx) > maxXmx.getSize()) {
          errors.add(String.format(
              "%s: Xmx value has exceeded the allowed limit (max Xmx = %s)",
              jobName, maxXmx.getString()));
        }
  
        // job callback properties check
        JobCallbackValidator.validate(jobName, props, jobProps, errors);
      }
    }
docs: Check job properties.
  
  @param projectId the project id
  @param props the server props
  @param jobPropsMap the job props map
  @param errors the errors