Class JobsActiveLimitProperties

java.lang.Object
com.netflix.genie.web.properties.JobsActiveLimitProperties
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.EnvironmentAware

@ConfigurationProperties(prefix="genie.jobs.active-limit") @Validated public class JobsActiveLimitProperties extends Object implements org.springframework.context.EnvironmentAware
Properties related to number of active jobs per user.
Since:
3.1.0
  • Field Details

    • PROPERTY_PREFIX

      public static final String PROPERTY_PREFIX
      The property prefix for job user limiting.
      See Also:
    • ENABLED_PROPERTY

      public static final String ENABLED_PROPERTY
      The property key for whether this feature is enabled or not.
      See Also:
    • USER_LIMIT_OVERRIDE_PROPERTY_PREFIX

      public static final String USER_LIMIT_OVERRIDE_PROPERTY_PREFIX
      The property key prefix for per-user limit.
      See Also:
    • DEFAULT_ENABLED

      public static final boolean DEFAULT_ENABLED
      Default value for active user job limit enabled.
      See Also:
    • DEFAULT_COUNT

      public static final int DEFAULT_COUNT
      Default value for active user job limit count.
      See Also:
  • Constructor Details

    • JobsActiveLimitProperties

      public JobsActiveLimitProperties()
  • Method Details

    • getUserLimit

      public int getUserLimit(String user)
      Get the maximum number of jobs a user is allowed to run concurrently. Checks whether the user has a special limit associated, and if not it returns the global default.
      Parameters:
      user - the user name
      Returns:
      the maximum number of jobs
    • setEnvironment

      public void setEnvironment(org.springframework.core.env.Environment environment)
      Specified by:
      setEnvironment in interface org.springframework.context.EnvironmentAware