Class RuntimeConfig
java.lang.Object
oracle.pgx.config.AbstractConfig
oracle.pgx.config.AbstractRuntimeConfig
oracle.pgx.config.RuntimeConfig
PGX Runtime Config
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class AbstractConfig
ENV_SEPARATOR, ENV_VARIABLE_PREFIX, SYSTEM_PROPERTY_PREFIX -
Method Summary
Modifier and TypeMethodDescriptionbooleantask size for BFS iterate QUE phasethreshold of BFS traversal level items above which to switch to parent-read-based visiting strategythreshold of BFS traversal level items above which to switch to read-based visiting strategyuntil what number of BFS traversal level items vertices are visited single-threadedstandard charset to use throughout PGX, UTF-8 will be used as default.default diff factor value used in the common neighbor iterator implementations.default value used in the common neighbor iterator implementations, to indicate below which threshold a subarray is considered small.default value used in the common neighbor iterator implementations, to indicate the minimum size where the binary search approach is applied.static RuntimeConfig.Field[]value that determines at which number of visited vertices the DFS implementation will switch to data-structures that are more optimized for larger numbers of vertices.[relevant for enterprise_scheduler] enterprise scheduler specific settings.level of validation performed on newly loaded or created graphsthreshold when the size of an array is too big to use a normal Java array.Gets the values that do not belong to any field.[only relevant if string_pooling_strategy is indexed] amount of distinct strings per property after which to stop pooling.maximum amount of off-heap memory PGX is allowed to allocate in megabytes, before an OutOfMemoryError will be thrown.maximum ratio of on-heap memory that PGX is allowed to use, between 0 and 1.which memory allocator to usethe type strategy to use for MS-BFS frontiershow many spin locks each generated app will create at instantiation.number of worker threads to be used in thread pool.minimum number of a node's neighbor to be a supernode.[only relevant if string_pooling_strategy is on_heap] this value prevents the string pool to grow as big as the property size which could render the pooling ineffectivemethod of generating random numbers in pgx[relevant for deterministic random number generator only] seed for the deterministic random number generator used in pgx.maximum number of matched results from a node to be cachedwhich scheduler to use.task length if total amount of work is small than default task length (only relevant for task-stealing strategies)which string pooling strategy to usedefault task length (only relevant for task-stealing strategies).create index for reachability queriesGets the parsed values.Gets the values without defaults.booleanChecks for default value.iftrue, PGX will automatically load graphs from the database when they are first referenced in graph queriesbooleanisEmpty()Checks if it's empty.truemeans spin explicitly in a loop until lock becomes available.static RuntimeConfigparse(InputStream is, boolean strict, String parentPath) Parses an input stream.static RuntimeConfigParses a raw key/value mapping.static RuntimeConfigparse(Properties props, boolean strict) Parses a properties file.toString()toString(boolean hideSensitiveData) if true, use memory mapped files for reading graphs in PGB format if possible; false always use s stream based implementationif true, use memory mapped files for storing in PGB format if possible; if false always use a stream based implementationMethods inherited from class AbstractRuntimeConfig
areWeEnterprise, getInstance, getInstance, getInstance, isStringPoolEnabled, reset, validateMethods inherited from class AbstractConfig
getDefault, getValueFromEnvironment, getValueFromEnvironment, parseString, setSerializable
-
Method Details
-
parse
public static RuntimeConfig parse(InputStream is, boolean strict, String parentPath) throws IOException Parses an input stream.- Parameters:
is- the input streamstrict- if true, parses in strict modeparentPath- if not null, resolves relative paths against this parentPath- Returns:
- the parsed graph config
- Throws:
IOException- Signals that an I/O exception has occurred.
-
parse
Parses a raw key/value mapping.- Parameters:
raw- the raw key/value mapping to parsestrict- if true, parses in strict modeparentPath- if not null, resolves relative paths against this parentPath- Returns:
- the parsed graph config
-
parse
Parses a properties file.- Parameters:
props- the properties to parsestrict- if true, parses in strict mode- Returns:
- the parsed graph config
-
getConfigFields
-
getValues
Gets the parsed values.- Specified by:
getValuesin classAbstractRuntimeConfig- Returns:
- the parsed values
-
isEmpty
public boolean isEmpty()Checks if it's empty.- Returns:
- true, if the Map 'values' is empty.
-
hasDefaultValue
Checks for default value.- Parameters:
field- the field- Returns:
- true, if value for given field is the default value
-
getValuesWithoutDefaults
Gets the values without defaults.- Specified by:
getValuesWithoutDefaultsin classAbstractRuntimeConfig- Returns:
- the values without defaults
-
getLeftoverValues
-
toString
-
toString
-
getNumSpinLocks
how many spin locks each generated app will create at instantiation. Trade-off: small number implies less memory consumption. Big number implies faster execution (if algorithm uses spin locks) -
isExplicitSpinLocks
truemeans spin explicitly in a loop until lock becomes available.falsemeans using JDK locks which rely on the JVM to decide whether to context switch or spin. Our experiments showed that setting this value totrueresults in better performance. -
getScheduler
which scheduler to use.
basic_scheduler = use scheduler with basic features.
enterprise_scheduler = use scheduler with advanced, enterprise features for running multiple tasks concurrently and increased performance.
low_latency_scheduler = use scheduler that privileges latency of tasks over throughput or fairness across multiple sessions. The low_latency_scheduler is only available in embedded mode- Specified by:
getSchedulerin classAbstractRuntimeConfig
-
getTaskLength
default task length (only relevant for task-stealing strategies). F/J pool documentation says this value should be between 100 and 10000. Trade-off: small number implies more fine-grained tasks are generated, higher stealing throughput. High number implies less memory consumption and GC activity -
getSmallTaskLength
task length if total amount of work is small than default task length (only relevant for task-stealing strategies) -
getMsBfsFrontierTypeStrategy
the type strategy to use for MS-BFS frontiers -
getBfsThresholdSingleThreaded
until what number of BFS traversal level items vertices are visited single-threaded -
getBfsThresholdReadBased
threshold of BFS traversal level items above which to switch to read-based visiting strategy -
getBfsIterateQueTaskSize
task size for BFS iterate QUE phase -
getBfsThresholdParentReadBased
threshold of BFS traversal level items above which to switch to parent-read-based visiting strategy -
getDfsThresholdLarge
value that determines at which number of visited vertices the DFS implementation will switch to data-structures that are more optimized for larger numbers of vertices. -
getCniStopRecursionDefault
default value used in the common neighbor iterator implementations, to indicate the minimum size where the binary search approach is applied. -
getCniSmallDefault
default value used in the common neighbor iterator implementations, to indicate below which threshold a subarray is considered small. -
getCniDiffFactorDefault
default diff factor value used in the common neighbor iterator implementations. -
getLargeArrayThreshold
threshold when the size of an array is too big to use a normal Java array. This depends on the used JVM. (defaults toInteger.MAX_VALUE - 3) -
getMaxOffHeapSize
maximum amount of off-heap memory PGX is allowed to allocate in megabytes, before an OutOfMemoryError will be thrown. Note: this limit is not guaranteed to never be exceeded because of rounding and synchronization trade-offs. It only serves as threshold when PGX starts to reject new memory allocation requests. -
getMaxOnHeapMemoryUsageRatio
maximum ratio of on-heap memory that PGX is allowed to use, between 0 and 1. -
getCharacterSet
standard charset to use throughout PGX, UTF-8 will be used as default. Note: Some formats may not be compatible. -
getParallelism
number of worker threads to be used in thread pool. Note: if caller thread is part of another thread-pool, this value is ignored and parallelism of parent pool is used. -
getRandomGeneratorStrategy
method of generating random numbers in pgx -
getRandomSeed
[relevant for deterministic random number generator only] seed for the deterministic random number generator used in pgx. The default is -24466691093057031 -
getPatternMatchingSupernodeCacheThreshold
minimum number of a node's neighbor to be a supernode. This is for pattern matching engine. -
getUseIndexForReachabilityQueries
create index for reachability queries -
getRevisitThreshold
maximum number of matched results from a node to be cached -
getEnterpriseSchedulerFlags
[relevant for enterprise_scheduler] enterprise scheduler specific settings. -
getMemoryAllocator
which memory allocator to use- Specified by:
getMemoryAllocatorin classAbstractRuntimeConfig
-
getMaxDistinctStringsPerPool
[only relevant if string_pooling_strategy is indexed] amount of distinct strings per property after which to stop pooling. If the limit is reached an exception is thrown -
getStringPoolingStrategy
which string pooling strategy to use- Specified by:
getStringPoolingStrategyin classAbstractRuntimeConfig
-
useMemoryMapperForStoringPgb
if true, use memory mapped files for storing in PGB format if possible; if false always use a stream based implementation -
useMemoryMapperForReadingPgb
if true, use memory mapped files for reading graphs in PGB format if possible; false always use s stream based implementation -
getPoolingFactor
[only relevant if string_pooling_strategy is on_heap] this value prevents the string pool to grow as big as the property size which could render the pooling ineffective -
getGraphValidationLevel
level of validation performed on newly loaded or created graphs -
isAllowLazyLoadingForDatabaseGraphs
iftrue, PGX will automatically load graphs from the database when they are first referenced in graph queries -
getBackendFields
-
equals
-