Class EnterpriseWorkerKind
java.lang.Object
com.illumon.iris.db.tables.remotequery.EnterpriseWorkerKind
- All Implemented Interfaces:
KubernetesWorkerKind
,LocalProcessWorkerKind
,WorkerKind
public class EnterpriseWorkerKind
extends Object
implements WorkerKind, LocalProcessWorkerKind, KubernetesWorkerKind
Basic worker control for Deephaven Enterprise workers, running the same version as the Dispatcher.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.illumon.iris.db.tables.remotequery.process.LocalProcessWorkerKind
LocalProcessWorkerKind.CommandHelper
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final int
static final String
static final String
Fields inherited from interface com.illumon.iris.db.tables.remotequery.process.kubernetes.KubernetesWorkerKind
ENV_KEY_ARGS, ENV_KEY_ARTIFACT_DEST, ENV_KEY_ARTIFACT_USER, ENV_KEY_AUTHENTICATED_USER, ENV_KEY_CLASSPATH_PREFIX, ENV_KEY_EXTRA_JVM_OPTIONS, ENV_KEY_KUBERNETES_NAMESPACE, ENV_KEY_KUBERNETES_SERVICE_HOST, ENV_KEY_PROC_NAME
Fields inherited from interface com.illumon.iris.db.tables.remotequery.WorkerKind
DEFAULT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreatePersistentQueryHandle
(com.fishlib.io.logger.Logger log, Object queryHandleContext) Create a PersistentQueryHandle for use by the Controller.int
Return display order for dropdown list in web UI.getClasspathPrefix
(Worker worker) Get the default pod template filename for the worker kind.int
Get the default worker start timeout for the worker kind, in seconds.Return an optional description of this WorkerKind for use in the UI.getEnvironmentVariables
(Worker worker) Provides a map of environment variable names and values to be added to the k8s container.getJvmArgs
(Worker worker) Provides a list of JVM args to be added to the java command line.getQueryWorkerArg
(Worker worker) Get a command string that will be used to start the worker.getTitle()
Return a string that should be used for drop-down menus in the UI.The worker control type required for a particular request.What protocols does this kind of worker implement?boolean
Some customers have custom artifacts per user, which are passed to the Enterprise start script with the -u, -t, and -r options.boolean
True if temporary dispatcher produced class paths should be included on the command line with -C.boolean
True if -A "name" should be included on the command line.boolean
Check if this kind is a Community worker kindboolean
Does this produce a JVM that requires DHE specific JVM argumentsboolean
Does this produce a JVM that requires JVM like argumentsCreate a helper for generating a new command line.boolean
If true, the query worker args are to be set as the container command.What kind of worker controls could be required for starting these kind of workers?
-
Field Details
-
QUERY_WORKER_POD_TEMPLATE_PROPERTY
- See Also:
-
DEFAULT_QUERY_WORKER_POD_TEMPLATE
- See Also:
-
START_K8S_WORKER_TIMEOUT_SECONDS_PROPERTY
- See Also:
-
DEFAULT_START_K8S_WORKER_TIMEOUT_SECONDS
public static final int DEFAULT_START_K8S_WORKER_TIMEOUT_SECONDS- See Also:
-
-
Constructor Details
-
EnterpriseWorkerKind
-
-
Method Details
-
workerControlTypes
Description copied from interface:WorkerKind
What kind of worker controls could be required for starting these kind of workers?- Specified by:
workerControlTypes
in interfaceWorkerKind
- Returns:
- the desired WorkerControlType
-
getWorkerControlTypeForRequest
Description copied from interface:WorkerKind
The worker control type required for a particular request.- Specified by:
getWorkerControlTypeForRequest
in interfaceWorkerKind
- Parameters:
request
- the request that a worker is being created for- Returns:
- the type of worker control for this particular request
-
needsJvmFlags
public boolean needsJvmFlags()Description copied from interface:LocalProcessWorkerKind
Does this produce a JVM that requires JVM like arguments- Specified by:
needsJvmFlags
in interfaceLocalProcessWorkerKind
- Returns:
- true if this kind of worker needs JVM arguments
-
needsDheJvmFlags
public boolean needsDheJvmFlags()Description copied from interface:LocalProcessWorkerKind
Does this produce a JVM that requires DHE specific JVM arguments- Specified by:
needsDheJvmFlags
in interfaceLocalProcessWorkerKind
- Returns:
- true if this kind of worker needs DHE specific JVM arguments
-
includeNameArgument
public boolean includeNameArgument()Description copied from interface:LocalProcessWorkerKind
True if -A "name" should be included on the command line.- Specified by:
includeNameArgument
in interfaceLocalProcessWorkerKind
- Returns:
- true if the name argument is included
-
includeExtraClassPaths
public boolean includeExtraClassPaths()Description copied from interface:LocalProcessWorkerKind
True if temporary dispatcher produced class paths should be included on the command line with -C.- Specified by:
includeExtraClassPaths
in interfaceLocalProcessWorkerKind
- Returns:
- true if the dispatcher's temporary classpaths should be included
-
includeArtifactArguments
public boolean includeArtifactArguments()Description copied from interface:LocalProcessWorkerKind
Some customers have custom artifacts per user, which are passed to the Enterprise start script with the -u, -t, and -r options. True if those options be included in the command.- Specified by:
includeArtifactArguments
in interfaceLocalProcessWorkerKind
- Returns:
- true if -u, -t, and -r options should be included
-
implementedProtocols
Description copied from interface:WorkerKind
What protocols does this kind of worker implement?- Specified by:
implementedProtocols
in interfaceWorkerKind
- Returns:
- a list of protocol names that this worker implements
-
newCommandHelper
Description copied from interface:LocalProcessWorkerKind
Create a helper for generating a new command line.- Specified by:
newCommandHelper
in interfaceLocalProcessWorkerKind
- Returns:
- a new command line helper.
-
createPersistentQueryHandle
public Object createPersistentQueryHandle(com.fishlib.io.logger.Logger log, Object queryHandleContext) Description copied from interface:WorkerKind
Create a PersistentQueryHandle for use by the Controller. This is necessarily reflexive so implementations must guarantee that the returned object implements the PersistentQueryHandle interface.- Specified by:
createPersistentQueryHandle
in interfaceWorkerKind
- Parameters:
log
- a Log object to use for loggingqueryHandleContext
- an arbitrary context object to initialize the handle with.- Returns:
- a new persistent query handle
-
getDescription
Description copied from interface:WorkerKind
Return an optional description of this WorkerKind for use in the UI.- Specified by:
getDescription
in interfaceWorkerKind
- Returns:
- a description, or null
-
displayOrder
public int displayOrder()Description copied from interface:WorkerKind
Return display order for dropdown list in web UI. Lower values are displayed first. Enterprise workers use displayOrder 100. Community workers use display order 200 by default, which for Vermilion and later installations is overridden in iris-environment.prop to 50.- Specified by:
displayOrder
in interfaceWorkerKind
-
getTitle
Description copied from interface:WorkerKind
Return a string that should be used for drop-down menus in the UI.- Specified by:
getTitle
in interfaceWorkerKind
- Returns:
- the title of the worker
-
isCommunity
public boolean isCommunity()Description copied from interface:WorkerKind
Check if this kind is a Community worker kind- Specified by:
isCommunity
in interfaceWorkerKind
- Returns:
- true if the worker kind is Community
-
getDefaultPodTemplateFile
Description copied from interface:KubernetesWorkerKind
Get the default pod template filename for the worker kind.- Specified by:
getDefaultPodTemplateFile
in interfaceKubernetesWorkerKind
- Returns:
- filename containing the pod template yaml
-
getDefaultWorkerStartTimeoutSecs
public int getDefaultWorkerStartTimeoutSecs()Description copied from interface:KubernetesWorkerKind
Get the default worker start timeout for the worker kind, in seconds.- Specified by:
getDefaultWorkerStartTimeoutSecs
in interfaceKubernetesWorkerKind
- Returns:
- start timeout value to be configured on the worker pod.
-
getQueryWorkerArg
Description copied from interface:KubernetesWorkerKind
Get a command string that will be used to start the worker.- Specified by:
getQueryWorkerArg
in interfaceKubernetesWorkerKind
- Parameters:
worker
- A worker object that will run as a k8s pod.- Returns:
- Worker start command
-
useQueryWorkerArgAsContainerCommand
public boolean useQueryWorkerArgAsContainerCommand()Description copied from interface:KubernetesWorkerKind
If true, the query worker args are to be set as the container command. If false, the query worker args may be set as an environment variable, and a start script configured in the pod template yaml will use that.- Specified by:
useQueryWorkerArgAsContainerCommand
in interfaceKubernetesWorkerKind
- Returns:
- True if getQueryWorkerArg(Worker w) should be set as the worker container's command array.
-
getClasspathPrefix
- Specified by:
getClasspathPrefix
in interfaceKubernetesWorkerKind
-
getJvmArgs
Description copied from interface:KubernetesWorkerKind
Provides a list of JVM args to be added to the java command line.- Specified by:
getJvmArgs
in interfaceKubernetesWorkerKind
- Parameters:
worker
- A worker object that will run as a k8s pod.- Returns:
- JVM arg list, e.g. ["-Dkey1=val1", "-Dkey2=val2", "-Xmx4096m"]
-
getEnvironmentVariables
Description copied from interface:KubernetesWorkerKind
Provides a map of environment variable names and values to be added to the k8s container.- Specified by:
getEnvironmentVariables
in interfaceKubernetesWorkerKind
- Parameters:
worker
- A worker object that will run as a k8s pod.- Returns:
- A map of environment variable names and values
-