java.lang.Object
com.pervasive.datarush.operators.OperatorSettings
Advanced operator settings that can be specified for an operator.
Primarily used internally; operator/graph consumers should generally not need to use this.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic OperatorSettingsDefault operator settings: unspecified namestatic OperatorSettingsOperator settings withmaxParallelismset to 1 -
Method Summary
Modifier and TypeMethodDescriptionCan be called to forcible disable parallelism for the given operator (and children if this is aCompositeOperator).booleanEquals is implemeted by comparing each of the properties of OperatorSettings.Returns the maximum parallelism to allow for the operator.Returns metadata associated with the operator.getName()Returns the name of the operatorReturns the relative path of the operator.inthashCode()Hashcode is implemented in a way that is consistent with equals.hiddenPath(boolean hidden) Returns an operator settings object, equivalent to this, but withhiddenPathset to the specified value.booleanReturns whether the path to this operator is hidden.static OperatorSettingsMAX_PARALLELISM(int maxParallelism) Operator settings withmaxParallelismset to the specified value.maxParallelism(int maxParallelism) Can be used to restrict the parallelism of an operator.Returns an operator settings object, equivalent to this, but with its metadata modified.static OperatorSettingsOperator settings withnameset to the specified value.static OperatorSettingsRELATIVE_PATH(GraphPath path) Operator settings withrelativePathset to the specified value.Returns an operator settings object, equivalent to this, but withrelativePathandnameset to the specified value.Returns an operator settings object, equivalent to this, but withrelativePathset to a path consisting of a single element equal to the specified name andnameset to the specified value.toString()Returns a display string
-
Field Details
-
DEFAULT
Default operator settings: unspecified name -
PARALLELISM_DISABLED
Operator settings withmaxParallelismset to 1
-
-
Method Details
-
NAME
Operator settings withnameset to the specified value.- Parameters:
name- the name of the operator- Returns:
- an operator settings
-
MAX_PARALLELISM
Operator settings withmaxParallelismset to the specified value.- Parameters:
name- the name of the operator- Returns:
- an operator settings
-
RELATIVE_PATH
Operator settings withrelativePathset to the specified value.- Parameters:
path- the relative path of the operator- Returns:
- an operator settings
-
getName
Returns the name of the operator- Returns:
- the name of the operator
-
getRelativePath
Returns the relative path of the operator. By default this the the same as name, but we have some internal artifacts for which we want control over naming.- Returns:
- the relative of the operator
-
getMaxParallelism
Returns the maximum parallelism to allow for the operator. The actual parallelism used will be the min ofEngineConfig#getParallelism()and that specified here.- Returns:
- the max parallelism or
nullif unspecified
-
isHiddenPath
public boolean isHiddenPath()Returns whether the path to this operator is hidden. Normally this is always false; used internally to hide generated artifacts from displayed error paths.- Returns:
- whether the path to this operator is hidden
-
getMetadata
Returns metadata associated with the operator. Metadata can consist of arbitrary key-value pairs. This is intended to hold application-specific information that is then available in theOperatorInstance.- Returns:
- an immutable view of the metadata
-
hashCode
public int hashCode()Hashcode is implemented in a way that is consistent with equals. -
equals
Equals is implemeted by comparing each of the properties of OperatorSettings. -
toString
Returns a display string -
disableParallelism
Can be called to forcible disable parallelism for the given operator (and children if this is aCompositeOperator). This method should be used sparingly since it will degrade performance significantly; but is needed in certain cases. For example:- If there is a
RunScriptoperator that contains a non-parallelizable script - If there is a
DeriveFieldsoperator that contains a non-parallelizable function
- Returns:
- an operator settings object, equivalent to this, but with parallelism disabled
- If there is a
-
maxParallelism
Can be used to restrict the parallelism of an operator. Note that this can be used to limit the parallelism of an operator but never increase that which the operator already allows.- Parameters:
maxParallelism- the max parallelism to allow- Returns:
- an operator settings object, equivalent to this, but with maxParallelism set to that specified
-
rename
Returns an operator settings object, equivalent to this, but withrelativePathandnameset to the specified value.- Parameters:
path- the relative path- Returns:
- an operator settings object
-
rename
Returns an operator settings object, equivalent to this, but withrelativePathset to a path consisting of a single element equal to the specified name andnameset to the specified value.- Parameters:
name- the name- Returns:
- an operator settings object
-
metadata
Returns an operator settings object, equivalent to this, but with its metadata modified.- Parameters:
key- the metadata key to setvalue- the value to set it to- Returns:
- an operator settings object
-