Class PersistentQueryController

java.lang.Object
com.fishlib.util.process.OnetimeShutdownTask
com.illumon.iris.controller.PersistentQueryController
All Implemented Interfaces:
com.fishlib.util.process.ShutdownManager.Task

public final class PersistentQueryController extends com.fishlib.util.process.OnetimeShutdownTask

Stand-alone controller for Iris.

Hosts a configuration PHT, a state PDHT, monitors server status, and dispatches stop/start commands.

Thread-safety notes:

  • All changes to IrisQueryInfos are protected by the lock on the associated PDHT's map.
  • All PersistentQueryConfiguration instances that are published (in the associated PHT or PersistentQueryInfo) are guaranteed not to be further mutated. Hence, they can be read safely at all times.
  • All changes to a PersistentQueryConfiguration (by serial, not by instance, since published instances are immutable) are protected by a serial-specific lock. Query starts/stops are also protected, since they must always use the most up-to-date version of the configuration.

Configuration properties

  • PersistentQueryController.host - The hostname of this controller
  • PersistentQueryController.port - The port for communication
  • PersistentQueryController.useLocalGit (optional) - When set to true use the local filesystem as a repository
  • PersistentQueryController.gitGcEnabled (optional) - When set to true a git gc will be periodically performed
  • PersistentQueryController.statusCheckTimes - When an AnomalyClient is used, defines the times to check in with status
  • PersistentQueryController.failureWindowMillis - How long failures are queued
  • PersistentQueryController.failureNumQueriesThreshold - How many failures are required before notifying the AnomalyClient
  • PersistentQueryController.failureResendMillis - The minimum gap between failure messages
  • PersistentQueryController.commitCheckpointImmediate (optional) - Immediately checkpoint the PDHT state on startup
  • RemoteProcessingRequestProfile.defaultProfile - The default JVM args profile to use
  • RemoteProcessingRequestProfile.noneProfile - The JVM profile to use when "None" is selected
  • Field Details

    • MAX_POSSIBLE_HEAP_GB

      public static final int MAX_POSSIBLE_HEAP_GB
      See Also:
    • DEFAULT_MAX_HEAP_SIZE_GB

      public static final double DEFAULT_MAX_HEAP_SIZE_GB
    • MAX_DESYNC_RETRIES

      public static final int MAX_DESYNC_RETRIES
    • ETCD_PRESENCE_LEASE_TTL_SECONDS

      public static final int ETCD_PRESENCE_LEASE_TTL_SECONDS
      How long does our etcd lease last in seconds? If we do not renew the lease for this many seconds, then etcd will automatically revoke it, and our presence KV will be removed. Any process using our presence KV as sign of liveness will consider us dead.
    • ETCD_PRESENCE_LEASE_RENEW_SECONDS

      public static final int ETCD_PRESENCE_LEASE_RENEW_SECONDS
      How often, in seconds, do we renew our etcd lease. This must be less than ETCD_PRESENCE_LEASE_TTL_SECONDS; for safety it should be no more than 50% of the TTL value.
    • ETCD_PRESENCE_LEASE_RENEW_RETRY_DELAY_SECONDS

      public static final int ETCD_PRESENCE_LEASE_RENEW_RETRY_DELAY_SECONDS
      What is the maximum frequency which we will try to renew a lease. If a lease renewal times out, we will try again more quickly than the standard ETCD_LEASE_RENEW_SECONDS.
    • ETCD_PRESENCE_LEASE_KEEPALIVE_TIMEOUT_MS

      public static final int ETCD_PRESENCE_LEASE_KEEPALIVE_TIMEOUT_MS
      How long will we wait for our etcd lease to be granted or renewed, in milliseconds before determining that we had a failure.
    • ETCD_PRESENCE_KVS_LOAD_TIMEOUT_SECONDS

      public static final int ETCD_PRESENCE_KVS_LOAD_TIMEOUT_SECONDS
    • ETCD_PRESENCE_KVS_LOAD_BATCH_SIZE

      public static final int ETCD_PRESENCE_KVS_LOAD_BATCH_SIZE
  • Constructor Details

  • Method Details