The Persistent Query Controller (the controller, for short) is listed as iris_controller in monit, and runs on the controller pod in Kubernetes. It is the service responsible for managing Persistent Queries. For instance, when it is time to start a scheduled Persistent Query, it is the controller that starts the PQ and monitors its state. The Query Monitor (Web) and Query Config (Java Swing) panels obtain information about Persistent Queries in the system from the controller using the PersistentQueryControllerClient for Legacy or the PersistentQueryControllerClient for Core+.
For management of persistent queries from Core+ Python workers, you can use the standard Core+ client. When executed in the context of a worker, authentication is automatic.
import io.deephaven.enterprise.dnd.ControllerClientFactory;client = ControllerClientFactory.makeControllerClientFactory().getSubscribed();for (PQ in client.getDataCopy().values()) { println (PQ.getConfig().getName());}
Each PersistentQueryInfo object represent a PQ's current state, and includes methods to get additional details about it:
getState() retrieves a PersistentQueryState, which provides the details about the running PQ, such as workerHost and workerPort.
getConfig() retrieves a PersistentQueryConfiguration, which provides the details about the PQ, such as owner, worker settings, etc.
For Legacy Workers
Legacy workers use the getData() method, as shown.
import io.deephaven.enterprise.dnd.ControllerClientFactory;client = ControllerClientFactory.makeControllerClientFactory().getSubscribed();for (PQ in client.getDataCopy().values()) { println (PQ.getConfig().getName());}
from deephaven_enterprise.client.session_manager import SessionManagersm = SessionManager()for serial, pq in sm.controller_client.map().items(): print(pq.config.name)
Each PersistentQueryInfo object represent a PQ's current state, and includes methods to get additional details about it:
getState() retrieves a PersistentQueryState, which provides the details about the running PQ, such as workerHost and workerPort.
getConfig() retrieves a PersistentQueryConfiguration, which provides the details about the PQ, such as owner, worker settings, etc.
Appendix A - Constant values for Persistent Query configuration types and type-specific fields
Note
Among the classes listed below, only io.deephaven.shadow.enterprise.com.illumon.util.IngesterPersistentQueryConstants is available to Core+ workers. The other classes listed here are available to Legacy workers directly, or through jpy.get_type. For Core+ workers, use the values documented here when setting configuration type or type-specific fields when creating or updating a Persistent Query.
com.illumon.util.IngesterPersistentQueryConstants (also available from io.deephaven.shadow.enterprise.com.illumon.util.IngesterPersistentQueryConstants)
Modifier and Type
Constant Field
Value
public static final String
CONFIGURATION_TYPE_MERGE
"Merge"
public static final String
CONFIGURATION_TYPE_VALIDATE
"Validate"
public static final String
TYPE_SPECIFIC_FIELD_NAMESPACE
"Namespace"
public static final String
TYPE_SPECIFIC_FIELD_TABLE
"Table"
public static final String
TYPE_SPECIFIC_FIELD_PARTITION_FORMULA
"PartitionFormula"
Appendix B - Restart users enum and constant values