PersistentQueryConfigurationLogV2

The Persistent Query Controller manages all Persistent Queries (PQs) in Deephaven. The controller is responsible for starting, stopping, and monitoring the health of the PQs. It also manages the configuration of the queries, including their memory allocation, scheduling, and other parameters.

Whenever a PQ is created, modified, or deleted, the controller adds a row to the PersistentQueryConfigurationLogV2 table with its latest version. Deephaven uses this log when a query is reverted to a previous version. This table replaces the deprecated PersistentQueryConfigurationLog table.

The history of PQ state (when they're started or stopped) is stored in the Persistent Query State Log table.

Columns

Column NameColumn TypeDescription
DateStringThe date the update occurred. This is the partitioning column.
TimestampDateTimeThe timestamp when the update occurred.
SerialNumberlongThe query's serial number (a system-generated identifier unique to each PQ).
VersionNumberlongThe query's version number (a number that starts at 1 for each query and is incremented each time the query is updated).
OwnerStringThe owner of the PQ.
NameStringThe name of the PQ.
EventTypelongThe query configuration event that triggered the log entry:
  • ADDED - a PQ was added or modified
  • INITIAL - a controller logs all queries it is managing with EventType of INITIAL when it first starts
  • REMOVED - a PQ was deleted
Enabledboolean
  • true - the query is enabled
  • false - the query is disabled (will not be started by the controller)
HeapSizeInGBdoubleThe heap size for the query in GB (the memory the query has available).
AdditionalMemoryInGBdoubleThe amount of additional memory (in GB) allocated to beyond the JVM heap memory.
DataBufferPoolToHeapSizeRatiodoubleThe data buffer to heap size ratio is the fraction of the query's heap dedicated to caching binary data from the underlying Deephaven data sources.
DetailedGCLoggingEnabledbooleanIf true, Java garbage collection details are logged for the query.
OmitDefaultGCParametersbooleanThis parameter is deprecated.
DbServerNameStringThe server on which the query will be run; this is shown as DB_SERVER_<number>, and these names are translated to physical or virtual servers by the controller.
RestartUsersStringSpecifies which group of users are allowed to restart the query:
  • Admin - only administrators of the query can restart it
  • AdminAndViewers - administrators and viewers of the query can restart it
  • ViewersWhenDown - administrators can restart the query, and viewers only if it is not running
ScriptCodeStringThe code for the script if it is not stored in git.
ScriptPathStringThe script path if it is stored in git.
ScriptLanguageStringIf the PQ has a script, the language of the script; either Groovy or Python.
ExtraJvmArgumentsString[]Extra JVM arguments to be passed to Java when the query is started.
ExtraEnvironmentVariablesString[]Environment variables to be set in the PQ's environment before it is started.
ClassPathAdditionsString[]Additional elements to be added to the class path for the JVM.
KubernetesControlStringFor a Kubernetes installation, the advanced Kubernetes options for the PQ such as cpu_shares and container_image.
PythonControlStringFor a Python worker, the advanced Python options for the PQ such as ephemeral_venv and ephemeral_requirements.
GenericWorkerControlStringCore+ worker_creation JSON fields.
AdminGroupsString[]Additional administrators for the query (i.e., users or groups that can edit, start, stop, or delete the query).
ViewerGroupsString[]Additional viewers for the query (i.e., users or groups that can view the query and its resulting tables).
ConfigurationTypeStringThe PQ configuration type.
SchedulingString[]Specifies the scheduling details for the query.
TimeoutlongThe timeout value in milliseconds.
TypeSpecificFieldsjava.util.MapMap for fields specific to configuration types.
WorkerKindStringThe type of worker, either DeephavenEnterprise or DeephavenCommunity.
JVMProfileStringThe JVM profile to be used for the query.
LastModifiedByAuthenticatedStringThe authenticated user who last modified this query.
LastModifiedByEffectiveStringThe effective user who last modified this query.
LastModifiedTimeDateTimeThe last time this query was modified.
ReplicaCountintThe number of replicas of the PQ to run.
SpareCountintThe number of failover spares.
AssignmentPolicyStringThe assignment policy for replica PQs.
AssignmentPolicyParamsStringThe assignment policy parameters for replica PQs.

Example

To see changes in the configuration of a specific Persistent Query (PQ), you can filter the PersistentQueryConfigurationLogV2 table by the query's name. The following example shows how to do this in both Core+ Python and Groovy, using today's data.

pqcl=db.liveTable("DbInternal", "PersistentQueryConfigurationLogV2").where("Date=today()", "Name=`<PQ Name>`").sort("Timestamp")
pqcl = (
    db.live_table("DbInternal", "PersistentQueryConfigurationLogV2")
    .where(["Date=today()", "Name=`<PQ Name>`"])
    .sort("Timestamp")
)