Package org.rumbledb.config
Class RumbleRuntimeConfiguration
java.lang.Object
org.rumbledb.config.RumbleRuntimeConfiguration
- All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable
,Serializable
public class RumbleRuntimeConfiguration
extends Object
implements Serializable, com.esotericsoftware.kryo.KryoSerializable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns whether the returned Pending Update List should be applied when executed on the command line.boolean
Returns whether DataFrame execution is enabled.boolean
Returns whether dates with time zones should be supported.boolean
Returns whether static analysis is enabled.boolean
Returns whether function inlining is enabled.Returns the allowed URI prefixes for read/write (with I/O functions to read data)boolean
Returns whether DataFrame execution mode detection is activated for higher-order functions.static RumbleRuntimeConfiguration
Returns the names of external variables read from DataFrames.Returns the names of external variables read from lists of items.getExternalVariableValue
(Name name) Returns the list of items associated with a specified variable.org.apache.spark.sql.Dataset<org.apache.spark.sql.Row>
getHost()
Returns the host name when used in server mode.Returns the input format for reading from standard input.getInputFormat
(Name variableName) boolean
Returns whether it is fine to consider JSON null values in an object as absent for validation against an optional key.Returns the log path.boolean
Returns whether native SQL predicates are enabled.int
Returns the number of output partitions to write to the output path.Returns the output format for writing the output of the query to the output path.Returns the serialization options to write to the output path.Returns the path to which the output path should be written.boolean
Returns whether the output path should be overwritten.int
getPort()
Returns the port number when used in server mode.getQuery()
Returns the query that was passed from the command line.Returns the version of the query language in use.Returns the path from which the JSONiq or XQuery query is to be read.int
Gets the configured number of Items that should be collected in case of a forced materialization.Returns the serializer in use according to the output format specified.Returns the current shell filter for post-processing output (e.g.boolean
Returns whether verbose error info should be shown in case an error is returned.Returns the static base URI against which relative URIs are resolved when reading or writing data.void
init()
boolean
Returns whether the return type of built-in functions is checked.boolean
isLocal()
Returns whether the underlying Spark instance is local or not.boolean
Returns whether verbose information on query plans should be displayed.boolean
isServer()
boolean
isShell()
boolean
Returns whether advanced native execution for nested FLWOR queries is enabled.boolean
Returns whether general comparisons may be rewritten using value comparisons.boolean
Returns whether parent pointers can be optimized away in XPath expressions.boolean
Returns whether XPath steps should be optimized including experimental algorithms.boolean
Returns whether XPath steps should be optimized.boolean
Returns whether parallel execution (RDD, DataFrames) is enabled.boolean
Returns whether verbose information inferred types should be shown.void
read
(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) boolean
readFromStandardInput
(Name variableName) resetExternalVariableValue
(String variableNameString) void
setAllowedURIPrefixes
(List<String> newValue) Sets the allowed URI prefixes for read/write (with I/O functions to read data)void
setApplyUpdates
(boolean b) Sets whether the returned Pending Update List should be applied when executed on the command line.setCheckReturnTypeOfBuiltinFunctions
(boolean checkReturnTypeOfBuiltinFunctions) Set whether the return type of built-in functions is checked.void
setDataFrameExecution
(boolean b) Sets whether DataFrame execution is enabled.void
setDataFrameExecutionModeDetection
(boolean value) Sets whether DataFrame execution mode detection is activated for higher-order functions.void
setDateWithTimezone
(boolean b) Sets whether dates with time zones should be supported.setExternalVariableValue
(String variableName, List<Item> items) setExternalVariableValue
(String variableName, org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> dataFrame) setExternalVariableValue
(Name name, List<Item> items) setExternalVariableValue
(Name name, org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> dataFrame) void
setFunctionInlining
(boolean b) Sets whether function inlining is enabled.void
setInputFormat
(String newValue) Sets the input format for reading from standard input.void
setLaxJSONNullValidation
(boolean value) Sets whether it is fine to consider JSON null values in an object as absent for validation against an optional key.void
setLogPath
(String path) Sets the log path.void
setNativeExecution
(boolean b) Sets whether advanced native execution for nested FLWOR queries is enabled.void
setNativeSQLPredicates
(boolean value) Sets whether native SQL predicates are enabled.setNumberOfOutputPartitions
(int newValue) Sets the number of output partitions to write to the output path.void
Sets whether general comparisons may be rewritten using value comparisons.void
setOptimizeParentPointers
(boolean value) Sets whether parent pointers can be optimized away in XPath expressions.void
setOptimizeSteps
(boolean value) Sets whether XPath steps should be optimized.void
setOptimizeStepsExperimental
(boolean value) Sets whether XPath steps should be optimized including experimental algorithms.void
setOutputFormat
(String newValue) Sets the output format for writing the output of the query to the output path.setOutputFormatOption
(String key, String value) Sets a serialization option to write to the output path.void
setOutputPath
(String path) Sets the path to which the output path should be written.void
setParallelExecution
(boolean b) Sets whether parallel execution (RDD, DataFrames) is enabled.void
setPrintIteratorTree
(boolean value) Sets whether verbose information on query plans should be displayed.void
setQueryLanguage
(String version) Sets the version of the query language to use.void
setQueryPath
(String path) Sets the path from which the JSONiq or XQuery query is to be read.setResultSizeCap
(int i) Sets the number of Items that should be collected in case of a forced materialization.void
setShellFilter
(String shell) Sets the current shell filter for post-processing output (e.g.void
setShowErrorInfo
(boolean value) Returns whether verbose error info should be shown in case an error is returned.void
setStaticBaseUri
(String value) Sets the static base URI against which relative URIs are resolved when reading or writing data.toString()
Returns high-level aspects of the current configuration as a string.void
write
(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output)
-
Constructor Details
-
RumbleRuntimeConfiguration
public RumbleRuntimeConfiguration() -
RumbleRuntimeConfiguration
-
-
Method Details
-
getDefaultConfiguration
-
getPort
public int getPort()Returns the port number when used in server mode.- Returns:
- the port number.
-
getHost
Returns the host name when used in server mode.- Returns:
- the host name.
-
getAllowedURIPrefixes
Returns the allowed URI prefixes for read/write (with I/O functions to read data)- Returns:
- the allowed URI prefixes.
-
setAllowedURIPrefixes
Sets the allowed URI prefixes for read/write (with I/O functions to read data)- Parameters:
newValue
- the allowed URI prefixes.
-
getOutputFormat
Returns the output format for writing the output of the query to the output path.- Returns:
- the output format.
-
setOutputFormat
Sets the output format for writing the output of the query to the output path.- Parameters:
newValue
- the output format.
-
getInputFormat
Returns the input format for reading from standard input.- Returns:
- the input format.
-
setInputFormat
Sets the input format for reading from standard input.- Parameters:
newValue
- the input format.
-
getNumberOfOutputPartitions
public int getNumberOfOutputPartitions()Returns the number of output partitions to write to the output path.- Returns:
- the number of output partitions.
-
setNumberOfOutputPartitions
Sets the number of output partitions to write to the output path.- Parameters:
newValue
- the number of output partitions.
-
getOutputFormatOptions
Returns the serialization options to write to the output path.- Returns:
- the serialization options.
-
setOutputFormatOption
Sets a serialization option to write to the output path.- Parameters:
key
- the serialization option key.value
- the serialization option value.
-
isCheckReturnTypeOfBuiltinFunctions
public boolean isCheckReturnTypeOfBuiltinFunctions()Returns whether the return type of built-in functions is checked.- Returns:
- whether the return type of built-in functions is checked.
-
setCheckReturnTypeOfBuiltinFunctions
public RumbleRuntimeConfiguration setCheckReturnTypeOfBuiltinFunctions(boolean checkReturnTypeOfBuiltinFunctions) Set whether the return type of built-in functions is checked.- Parameters:
checkReturnTypeOfBuiltinFunctions
- whether the return type of built-in functions is checked.
-
init
public void init() -
getOverwrite
public boolean getOverwrite()Returns whether the output path should be overwritten.- Returns:
- whether the output path should be overwritten.
-
getShowErrorInfo
public boolean getShowErrorInfo()Returns whether verbose error info should be shown in case an error is returned.- Returns:
- whether verbose error info should be shown in case an error is returned.
-
setShowErrorInfo
public void setShowErrorInfo(boolean value) Returns whether verbose error info should be shown in case an error is returned.- Parameters:
value
- whether verbose error info should be shown in case an error is returned.
-
getLaxJSONNullValidation
public boolean getLaxJSONNullValidation()Returns whether it is fine to consider JSON null values in an object as absent for validation against an optional key.- Returns:
- whether it is fine to consider JSON null values in an object as absent for validation against an optional key.
-
setLaxJSONNullValidation
public void setLaxJSONNullValidation(boolean value) Sets whether it is fine to consider JSON null values in an object as absent for validation against an optional key.- Parameters:
value
- whether it is fine to consider JSON null values in an object as absent for validation against an optional key.
-
getLogPath
Returns the log path.- Returns:
- the log path.
-
getQueryPath
Returns the path from which the JSONiq or XQuery query is to be read.- Returns:
- the query path.
-
getOutputPath
Returns the path to which the output path should be written.- Returns:
- the output path.
-
getQuery
Returns the query that was passed from the command line.- Returns:
- the query.
-
getShellFilter
Returns the current shell filter for post-processing output (e.g. JSON beautifier)- Returns:
- the shell filter.
-
getNativeSQLPredicates
public boolean getNativeSQLPredicates()Returns whether native SQL predicates are enabled.- Returns:
- whether native SQL predicates are enabled.
-
getDataFrameExecutionModeDetection
public boolean getDataFrameExecutionModeDetection()Returns whether DataFrame execution mode detection is activated for higher-order functions. If disabled, higher-order functions will be executed locally.- Returns:
- whether DataFrame execution mode detection is activated for higher-order functions.
-
setLogPath
Sets the log path.- Parameters:
path
- the log path.
-
setQueryPath
Sets the path from which the JSONiq or XQuery query is to be read.- Parameters:
path
- the query path.
-
setOutputPath
Sets the path to which the output path should be written.- Parameters:
path
- the output path.
-
setShellFilter
Sets the current shell filter for post-processing output (e.g. JSON beautifier)- Parameters:
shell
- the shell filter.
-
setNativeSQLPredicates
public void setNativeSQLPredicates(boolean value) Sets whether native SQL predicates are enabled.- Parameters:
value
- whether native SQL predicates are enabled.
-
setDataFrameExecutionModeDetection
public void setDataFrameExecutionModeDetection(boolean value) Sets whether DataFrame execution mode detection is activated for higher-order functions. If disabled, higher-order functions will be executed locally.- Parameters:
value
- whether DataFrame execution mode detection is activated for higher-order functions.
-
getResultSizeCap
public int getResultSizeCap()Gets the configured number of Items that should be collected in case of a forced materialization. This applies in particular to a local use of the ItemIterator.- Returns:
- the current number of Items to collect.
-
setResultSizeCap
Sets the number of Items that should be collected in case of a forced materialization. This applies in particular to a local use of the ItemIterator.- Parameters:
i
- the maximum number of Items to collect.
-
getExternalVariablesReadFromDataFrames
Returns the names of external variables read from DataFrames.- Returns:
- the names of external variables read from DataFrames.
-
getExternalVariablesReadFromListsOfItems
Returns the names of external variables read from lists of items.- Returns:
- the names of external variables read from lists of items.
-
getExternalVariableValue
Returns the list of items associated with a specified variable.- Parameters:
name
- the variable name (without dollar).- Returns:
- the list of items associated with the specified variable.
-
getUnparsedExternalVariableValue
-
getExternalVariableValueReadFromFile
-
getExternalVariableValueReadFromDataFrame
public org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> getExternalVariableValueReadFromDataFrame(Name name) -
setExternalVariableValue
public RumbleRuntimeConfiguration setExternalVariableValue(Name name, org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> dataFrame) -
setExternalVariableValue
public RumbleRuntimeConfiguration setExternalVariableValue(String variableName, org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> dataFrame) -
setExternalVariableValue
-
setExternalVariableValue
-
resetExternalVariableValue
-
resetExternalVariableValue
-
readFromStandardInput
-
getInputFormat
-
isShell
public boolean isShell() -
isServer
public boolean isServer() -
setPrintIteratorTree
public void setPrintIteratorTree(boolean value) Sets whether verbose information on query plans should be displayed.- Parameters:
value
- true if verbose information on query plans should be displayed, false otherwise.
-
isPrintIteratorTree
public boolean isPrintIteratorTree()Returns whether verbose information on query plans should be displayed.- Returns:
- true if verbose information on query plans should be displayed, false otherwise.
-
doStaticAnalysis
public boolean doStaticAnalysis()Returns whether static analysis is enabled.- Returns:
- true if static analysis is enabled, false otherwise.
-
printInferredTypes
public boolean printInferredTypes()Returns whether verbose information inferred types should be shown.- Returns:
- true if verbose information inferred types should be shown, false otherwise.
-
dateWithTimezone
public boolean dateWithTimezone()Returns whether dates with time zones should be supported. If supported, RumbleDB will not be able to use DataFrames for data containing dates.- Returns:
- true if dates with time zones should be supported, false otherwise.
-
setDateWithTimezone
public void setDateWithTimezone(boolean b) Sets whether dates with time zones should be supported. If supported, RumbleDB will not be able to use DataFrames for data containing dates.- Parameters:
b
- true if dates with time zones should be supported, false otherwise.
-
parallelExecution
public boolean parallelExecution()Returns whether parallel execution (RDD, DataFrames) is enabled.- Returns:
- true if parallel execution is enabled, false otherwise.
-
setParallelExecution
public void setParallelExecution(boolean b) Sets whether parallel execution (RDD, DataFrames) is enabled.- Parameters:
b
- true if parallel execution is enabled, false otherwise.
-
dataFrameExecution
public boolean dataFrameExecution()Returns whether DataFrame execution is enabled.- Returns:
- true if DataFrame execution is enabled, false otherwise.
-
setDataFrameExecution
public void setDataFrameExecution(boolean b) Sets whether DataFrame execution is enabled.- Parameters:
b
- true if DataFrame execution is enabled, false otherwise.
-
nativeExecution
public boolean nativeExecution()Returns whether advanced native execution for nested FLWOR queries is enabled.- Returns:
- true if advanced native execution for nested FLWOR queries is enabled, false otherwise.
-
setNativeExecution
public void setNativeExecution(boolean b) Sets whether advanced native execution for nested FLWOR queries is enabled.- Parameters:
b
- true if advanced native execution for nested FLWOR queries is enabled, false otherwise.
-
functionInlining
public boolean functionInlining()Returns whether function inlining is enabled.- Returns:
- true if function inlining is enabled, false otherwise.
-
setFunctionInlining
public void setFunctionInlining(boolean b) Sets whether function inlining is enabled.- Parameters:
b
- true if function inlining is enabled, false otherwise.
-
applyUpdates
public boolean applyUpdates()Returns whether the returned Pending Update List should be applied when executed on the command line.- Returns:
- true if the Pending Update List should be applied, false otherwise.
-
setApplyUpdates
public void setApplyUpdates(boolean b) Sets whether the returned Pending Update List should be applied when executed on the command line.- Parameters:
b
- true if the Pending Update List should be applied, false otherwise.
-
optimizeGeneralComparisonToValueComparison
public boolean optimizeGeneralComparisonToValueComparison()Returns whether general comparisons may be rewritten using value comparisons.- Returns:
- true if general comparisons may be rewritten using value comparisons, false otherwise.
-
setOptimizeGeneralComparisonToValueComparison
public void setOptimizeGeneralComparisonToValueComparison(boolean b) Sets whether general comparisons may be rewritten using value comparisons.- Parameters:
b
- true if general comparisons may be rewritten using value comparisons, false otherwise.
-
getQueryLanguage
Returns the version of the query language in use.- Returns:
- the version of the query language in use.
-
setQueryLanguage
Sets the version of the query language to use. Possible values: jsoniq10, jsoniq31, xquery30, xquery31.- Parameters:
version
- the version of the query language to use.
-
getStaticBaseUri
Returns the static base URI against which relative URIs are resolved when reading or writing data.- Returns:
- the static base URI against which relative URIs are resolved.
-
setStaticBaseUri
Sets the static base URI against which relative URIs are resolved when reading or writing data.- Parameters:
value
- the static base URI against which relative URIs are resolved.
-
optimizeSteps
public boolean optimizeSteps()Returns whether XPath steps should be optimized.- Returns:
- true if XPath steps should be optimized, false otherwise.
-
setOptimizeSteps
public void setOptimizeSteps(boolean value) Sets whether XPath steps should be optimized.- Parameters:
value
- true if XPath steps should be optimized, false otherwise.
-
optimizeStepExperimental
public boolean optimizeStepExperimental()Returns whether XPath steps should be optimized including experimental algorithms.- Returns:
- true if XPath steps should be optimized including experimental algorithms, false otherwise.
-
setOptimizeStepsExperimental
public void setOptimizeStepsExperimental(boolean value) Sets whether XPath steps should be optimized including experimental algorithms.- Parameters:
value
- true if XPath steps should be optimized including experimental algorithms, false otherwise.
-
optimizeParentPointers
public boolean optimizeParentPointers()Returns whether parent pointers can be optimized away in XPath expressions.- Returns:
- true if parent pointers can be optimized away in XPath expressions, false otherwise.
-
setOptimizeParentPointers
public void setOptimizeParentPointers(boolean value) Sets whether parent pointers can be optimized away in XPath expressions.- Parameters:
value
- true if parent pointers can be optimized away in XPath expressions, false otherwise.
-
isLocal
public boolean isLocal()Returns whether the underlying Spark instance is local or not.- Returns:
- true if the underlying Spark instance is local, false otherwise.
-
toString
Returns high-level aspects of the current configuration as a string. -
write
public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) - Specified by:
write
in interfacecom.esotericsoftware.kryo.KryoSerializable
-
read
public void read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) - Specified by:
read
in interfacecom.esotericsoftware.kryo.KryoSerializable
-
getSerializer
Returns the serializer in use according to the output format specified.- Returns:
- the serializer in use according to the output format specified.
-