Package oracle.pgx.config
Class RuntimeConfig
- java.lang.Object
-
- oracle.pgx.config.AbstractConfig
-
- oracle.pgx.config.AbstractRuntimeConfig
-
- oracle.pgx.config.RuntimeConfig
-
@Generated("config_generator.py") public class RuntimeConfig extends AbstractRuntimeConfig
PGX Runtime Config
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RuntimeConfig.Field
Fields of PGX Runtime Config
-
Field Summary
-
Fields inherited from class oracle.pgx.config.AbstractConfig
ENV_SEPARATOR, ENV_VARIABLE_PREFIX, SYSTEM_PROPERTY_PREFIX
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.lang.Integer
getBfsIterateQueTaskSize()
task size for BFS iterate QUE phasejava.lang.Double
getBfsThresholdParentReadBased()
threshold of BFS traversal level items above which to switch to parent-read-based visiting strategyjava.lang.Integer
getBfsThresholdReadBased()
threshold of BFS traversal level items above which to switch to read-based visiting strategyjava.lang.Integer
getBfsThresholdSingleThreaded()
until what number of BFS traversal level items vertices are visited single-threadedjava.lang.String
getCharacterSet()
standard charset to use throughout PGX, UTF-8 will be used as default.java.lang.Integer
getCniDiffFactorDefault()
default diff factor value used in the common neighbor iterator implementations.java.lang.Integer
getCniSmallDefault()
default value used in the common neighbor iterator implementations, to indicate below which threshold a subarray is considered small.java.lang.Integer
getCniStopRecursionDefault()
default value used in the common neighbor iterator implementations, to indicate the minimum size where the binary search approach is applied.static RuntimeConfig.Field[]
getConfigFields()
java.lang.Integer
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.EnterpriseSchedulerFlagsConfig
getEnterpriseSchedulerFlags()
[relevant for enterprise_scheduler] enterprise scheduler specific settings.GraphValidationLevel
getGraphValidationLevel()
level of validation performed on newly loaded or created graphsjava.lang.Integer
getLargeArrayThreshold()
threshold when the size of an array is too big to use a normal Java array.java.util.Map<java.lang.String,java.lang.Object>
getLeftoverValues()
Gets the values that do not belong to any field.java.lang.Integer
getMaxDistinctStringsPerPool()
[only relevant if string_pooling_strategy is indexed] amount of distinct strings per property after which to stop pooling.java.lang.Integer
getMaxOffHeapSize()
maximum amount of off-heap memory PGX is allowed to allocate in megabytes, before an OutOfMemoryError will be thrown.java.lang.Double
getMaxOnHeapMemoryUsageRatio()
maximum ratio of on-heap memory that PGX is allowed to use, between 0 and 1.MemoryAllocationStrategy
getMemoryAllocator()
which memory allocator to useFrontierTypeStrategy
getMsBfsFrontierTypeStrategy()
the type strategy to use for MS-BFS frontiersjava.lang.Integer
getNumSpinLocks()
how many spin locks each generated app will create at instantiation.java.lang.Integer
getParallelism()
number of worker threads to be used in thread pool.java.lang.Integer
getPatternMatchingSupernodeCacheThreshold()
minimum number of a node's neighbor to be a supernode.java.lang.Double
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 ineffectiveRandomGeneratorStrategy
getRandomGeneratorStrategy()
method of generating random numbers in pgxjava.lang.Long
getRandomSeed()
[relevant for deterministic random number generator only] seed for the deterministic random number generator used in pgx.java.lang.Integer
getRevisitThreshold()
maximum number of matched results from a node to be cachedSchedulerStrategy
getScheduler()
which scheduler to use.java.lang.Integer
getSmallTaskLength()
task length if total amount of work is small than default task length (only relevant for task-stealing strategies)StringPoolingStrategy
getStringPoolingStrategy()
which string pooling strategy to usejava.lang.Integer
getTaskLength()
default task length (only relevant for task-stealing strategies).ReachabilityIndexCreationMode
getUseIndexForReachabilityQueries()
create index for reachability queriesjava.util.Map<RuntimeConfig.Field,java.lang.Object>
getValues()
Gets the parsed values.java.util.Map<RuntimeConfig.Field,java.lang.Object>
getValuesWithoutDefaults()
Gets the values without defaults.boolean
hasDefaultValue(RuntimeConfig.Field field)
Checks for default value.boolean
isEmpty()
Checks if it's empty.java.lang.Boolean
isExplicitSpinLocks()
true
means spin explicitly in a loop until lock becomes available.static RuntimeConfig
parse(java.io.InputStream is, boolean strict, java.lang.String parentPath)
Parses an input stream.static RuntimeConfig
parse(java.util.Map<java.lang.String,java.lang.Object> raw, boolean strict, java.lang.String parentPath)
Parses a raw key/value mapping.static RuntimeConfig
parse(java.util.Properties props, boolean strict)
Parses a properties file.java.lang.String
toString()
java.lang.String
toString(boolean hideSensitiveData)
java.lang.Boolean
useMemoryMapperForReadingPgb()
if true, use memory mapped files for reading graphs in PGB format if possible; false always use s stream based implementationjava.lang.Boolean
useMemoryMapperForStoringPgb()
if true, use memory mapped files for storing in PGB format if possible; if false always use a stream based implementation-
Methods inherited from class oracle.pgx.config.AbstractRuntimeConfig
areWeEnterprise, getInstance, getInstance, getInstance, isStringPoolEnabled, reset, validate
-
Methods inherited from class oracle.pgx.config.AbstractConfig
getDefault, getValueFromEnvironment, getValueFromEnvironment, parseString, setSerializable
-
-
-
-
Method Detail
-
parse
public static RuntimeConfig parse(java.io.InputStream is, boolean strict, java.lang.String parentPath) throws java.io.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:
java.io.IOException
- Signals that an I/O exception has occurred.
-
parse
public static RuntimeConfig parse(java.util.Map<java.lang.String,java.lang.Object> raw, boolean strict, java.lang.String parentPath)
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
public static RuntimeConfig parse(java.util.Properties props, boolean strict)
Parses a properties file.- Parameters:
props
- the properties to parsestrict
- if true, parses in strict mode- Returns:
- the parsed graph config
-
getConfigFields
public static RuntimeConfig.Field[] getConfigFields()
-
getValues
public java.util.Map<RuntimeConfig.Field,java.lang.Object> getValues()
Gets the parsed values.- Specified by:
getValues
in classAbstractRuntimeConfig
- Returns:
- the parsed values
-
isEmpty
public boolean isEmpty()
Checks if it's empty.- Returns:
- true, if the Map 'values' is empty.
-
hasDefaultValue
public boolean hasDefaultValue(RuntimeConfig.Field field)
Checks for default value.- Parameters:
field
- the field- Returns:
- true, if value for given field is the default value
-
getValuesWithoutDefaults
public java.util.Map<RuntimeConfig.Field,java.lang.Object> getValuesWithoutDefaults()
Gets the values without defaults.- Specified by:
getValuesWithoutDefaults
in classAbstractRuntimeConfig
- Returns:
- the values without defaults
-
getLeftoverValues
public java.util.Map<java.lang.String,java.lang.Object> getLeftoverValues()
Gets the values that do not belong to any field.- Returns:
- the values that do not belong to any field
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
toString
public java.lang.String toString(boolean hideSensitiveData)
-
getNumSpinLocks
public java.lang.Integer 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
public java.lang.Boolean isExplicitSpinLocks()
true
means spin explicitly in a loop until lock becomes available.false
means using JDK locks which rely on the JVM to decide whether to context switch or spin. Our experiments showed that setting this value totrue
results in better performance.
-
getScheduler
public SchedulerStrategy 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:
getScheduler
in classAbstractRuntimeConfig
-
getTaskLength
public java.lang.Integer 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
public java.lang.Integer getSmallTaskLength()
task length if total amount of work is small than default task length (only relevant for task-stealing strategies)
-
getMsBfsFrontierTypeStrategy
public FrontierTypeStrategy getMsBfsFrontierTypeStrategy()
the type strategy to use for MS-BFS frontiers
-
getBfsThresholdSingleThreaded
public java.lang.Integer getBfsThresholdSingleThreaded()
until what number of BFS traversal level items vertices are visited single-threaded
-
getBfsThresholdReadBased
public java.lang.Integer getBfsThresholdReadBased()
threshold of BFS traversal level items above which to switch to read-based visiting strategy
-
getBfsIterateQueTaskSize
public java.lang.Integer getBfsIterateQueTaskSize()
task size for BFS iterate QUE phase
-
getBfsThresholdParentReadBased
public java.lang.Double getBfsThresholdParentReadBased()
threshold of BFS traversal level items above which to switch to parent-read-based visiting strategy
-
getDfsThresholdLarge
public java.lang.Integer 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
public java.lang.Integer getCniStopRecursionDefault()
default value used in the common neighbor iterator implementations, to indicate the minimum size where the binary search approach is applied.
-
getCniSmallDefault
public java.lang.Integer getCniSmallDefault()
default value used in the common neighbor iterator implementations, to indicate below which threshold a subarray is considered small.
-
getCniDiffFactorDefault
public java.lang.Integer getCniDiffFactorDefault()
default diff factor value used in the common neighbor iterator implementations.
-
getLargeArrayThreshold
public java.lang.Integer 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
public java.lang.Integer 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
public java.lang.Double getMaxOnHeapMemoryUsageRatio()
maximum ratio of on-heap memory that PGX is allowed to use, between 0 and 1.
-
getCharacterSet
public java.lang.String getCharacterSet()
standard charset to use throughout PGX, UTF-8 will be used as default. Note: Some formats may not be compatible.
-
getParallelism
public java.lang.Integer 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
public RandomGeneratorStrategy getRandomGeneratorStrategy()
method of generating random numbers in pgx
-
getRandomSeed
public java.lang.Long getRandomSeed()
[relevant for deterministic random number generator only] seed for the deterministic random number generator used in pgx. The default is -24466691093057031
-
getPatternMatchingSupernodeCacheThreshold
public java.lang.Integer getPatternMatchingSupernodeCacheThreshold()
minimum number of a node's neighbor to be a supernode. This is for pattern matching engine.
-
getUseIndexForReachabilityQueries
public ReachabilityIndexCreationMode getUseIndexForReachabilityQueries()
create index for reachability queries
-
getRevisitThreshold
public java.lang.Integer getRevisitThreshold()
maximum number of matched results from a node to be cached
-
getEnterpriseSchedulerFlags
public EnterpriseSchedulerFlagsConfig getEnterpriseSchedulerFlags()
[relevant for enterprise_scheduler] enterprise scheduler specific settings.
-
getMemoryAllocator
public MemoryAllocationStrategy getMemoryAllocator()
which memory allocator to use- Specified by:
getMemoryAllocator
in classAbstractRuntimeConfig
-
getMaxDistinctStringsPerPool
public java.lang.Integer 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
public StringPoolingStrategy getStringPoolingStrategy()
which string pooling strategy to use- Specified by:
getStringPoolingStrategy
in classAbstractRuntimeConfig
-
useMemoryMapperForStoringPgb
public java.lang.Boolean useMemoryMapperForStoringPgb()
if true, use memory mapped files for storing in PGB format if possible; if false always use a stream based implementation
-
useMemoryMapperForReadingPgb
public java.lang.Boolean useMemoryMapperForReadingPgb()
if true, use memory mapped files for reading graphs in PGB format if possible; false always use s stream based implementation
-
getPoolingFactor
public java.lang.Double 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
public GraphValidationLevel getGraphValidationLevel()
level of validation performed on newly loaded or created graphs
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-