@Generated(value="config_generator.py") public class PgxConfig extends AbstractPgxConfig
Modifier and Type | Class and Description |
---|---|
static class |
PgxConfig.Field
Fields of PGX Engine Config
|
Modifier and Type | Method and Description |
---|---|
ArrayFactoryStrategy |
getArrayFactoryStrategy()
java_arrays = use normal java arrays only (limited to 32bit in length)
java_2d_arrays = use Java 2D arrays only (achieve arrays of 64bit in length with the cost of indirection) off_heap_arrays = use arrays allocated off-heap (achieve 64bit in length without performance penalty, but with the price of breaking out of the JVM) dynamic = decide at run-time which allocation strategy to use based on the requested array length |
Integer |
getBfsThresholdReadBased()
threshold of BFS traversal level items to switch to read-based visiting strategy
|
Integer |
getBfsThresholdSingleThreaded()
until what number of BFS traversal level items vertices are visited single-threaded
|
Integer |
getBigPartitionThreshold()
the threshold for partitions to be considered 'big'.
|
String |
getCc()
(only relevant if native analysis is enabled) C++ compiler executable (either absolute path or resolvable via
$PATH ) |
String |
getCflags()
(only relevant if native analysis is enabled) flags for C++ compiler
|
Charset |
getCharset()
Gets the charset.
|
Integer |
getCniDiffFactorDefault()
default diff factor value used in the common neighbor iterator implementations.
|
Integer |
getCniSmallDefault()
default value used in the common neighbor iterator implementations, to indicate below which threshold a subarray is considered small.
|
Integer |
getCniStopRecursionDefault()
default value used in the common neighbor iterator implementations, to indicate the minimum size where the binary search approach is applied.
|
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.
|
List<String> |
getGraphs()
list of paths to graph configs to be registered at start-up
|
Integer |
getIdleSleepDuration()
if engine is idle, duration in milliseconds the dispatcher thread sleeps until checking for new tasks again
|
List<String> |
getInvokeableProviders()
list of invokeable providers to be loaded during startup
|
ArrayFactoryStrategy |
getLargeArrayStrategy()
[relevant for dynamic array factory only] array factory strategy to use when requested array size is exceeding large_array_threshold
|
Integer |
getLargeArrayThreshold()
[relevant for dynamic array factory only] use large_array_strategy when requested array size is exceeding this number.
|
String |
getLflags()
(only relevant if native analysis is enabled) linker flags for C++ compiler
|
Integer |
getMaxActiveSessions()
the maximum number of sessions allowed to be active at a time
|
Integer |
getMaxOffHeapSize()
maximum amount of off-heap memory PGX is allowed to allocate in megabytes, before an OutOfMemoryError will be thrown.
|
Integer |
getMaxQueueSizePerSession()
the maximum number of pending tasks allowed to be in the queue, per session.
|
Integer |
getMaxSnapshotCount()
Number of snapshots that may be loaded in the engine at the same time.
|
Integer |
getMemoryCleanupInterval()
memory cleanup tick in seconds
|
Integer |
getNumSpinLocks()
how many spin locks each generated app will create at instantiation.
|
Integer |
getNumWorkersAnalysis()
how many worker threads to use for analysis tasks
|
Integer |
getNumWorkersFastTrackAnalysis()
how many worker threads to use for fast-track analysis tasks
|
Integer |
getNumWorkersIo()
how many worker threads to use for I/O tasks (load/refresh/write from/to disk).
|
Integer |
getParallelism()
number of worker threads to be used in thread pool.
|
ParallelizationStrategy |
getParallelizationStrategy()
which parallelization strategy to use.
|
String |
getPathToGmCompiler()
if set, use this path to
gm_comp binary for dynamic compilations. |
Double |
getReleaseMemoryThreshold()
threshold percentage of used memory after which the engine starts freeing un-used graphs.
|
Integer |
getSessionIdleTimeoutSecs()
timeout of idling sessions in seconds.
|
Integer |
getSessionTaskTimeoutSecs()
timeout to interrupt long-running tasks submitted by sessions (algorithms, I/O tasks) in seconds.
|
Integer |
getSmallTaskLength()
task length if total amount of work is small than default task length (only relevant for task-stealing strategies)
|
Integer |
getTaskLength()
default task length (only relevant for task-stealing strategies).
|
String |
getTmpDir()
Use this path as temporary directory to store compilation artifacts and other temporary data.
|
Map<PgxConfig.Field,Object> |
getValues()
Gets the parsed values.
|
Map<PgxConfig.Field,Object> |
getValuesWithoutDefaults()
Gets the values without defaults.
|
boolean |
hasDefaultValue(PgxConfig.Field field)
Checks for default value.
|
Boolean |
isAllowIdleTimeoutOverwrite()
if
true , sessions can overwrite default idle timeout |
Boolean |
isAllowTaskTimeoutOverwrite()
if
true , sessions can overwrite default task timeout |
Boolean |
isEnableGmCompiler()
if
true , enable dynamic compilation of Green-Marl code during runtime. |
Boolean |
isExplicitSpinLocks()
true means spin explicitly in a loop until lock becomes available. |
Boolean |
isLaunchWatchdogs()
(for debugging) if
true , additional watch-dog threads will be launched which monitor and log engine health stats |
Boolean |
isStrictMode()
if
true , exceptions are thrown and logged with ERROR level whenever engine encounters configuration problems, such as invalid keys, mismatches and other potential errors. |
Boolean |
isThrowOutOfMemoryErrorDuringAllocation()
(for debugging) if
true , engine will throw OutOfMemoryErrors on purpose when trying to allocate large memory chunks. |
Boolean |
isThrowOutOfMemoryErrorDuringLoading()
(for debugging) if
true , engine will throw OutOfMemoryErrors on purpose when trying to load graphs from disk. |
Boolean |
isThrowOutOfMemoryErrorDuringMutation()
(for debugging) if
true , engine will throw OutOfMemoryErrors on purpose when trying to mutate graphs. |
Boolean |
isUnsafeAllowForeignSyntax()
(This flag reduces security, enable only if you know what you're doing!) Allow foreign syntax in user-provided Green-Marl programs
|
Boolean |
isUnsafeAllowLocalFilesystem()
(This flag reduces security, enable only if you know what you're doing!) Allow loading from local filesystem, if in client/server mode.
|
Boolean |
isUseNativeAnalysis()
execute analyses using Java (
false ) or C++ (true ) runtime |
Boolean |
isUseNativeLoaders()
use Java (
false ) or C++ (true ) graph loader framework |
Boolean |
isUseStringPool()
If
true , PGX will store string properties in a pool in order to consume less memory on string properties |
static PgxConfig |
parse(InputStream is, boolean strict, File parent)
Parses an input stream.
|
static PgxConfig |
parse(Map<String,Object> raw, boolean strict, File parent)
Parses a raw key/value mapping.
|
static PgxConfig |
parse(Properties props, boolean strict)
Parses a properties file.
|
String |
toString() |
get, getConfigValues, init, isInitialized, reset, strict
setSerializable
public ArrayFactoryStrategy getArrayFactoryStrategy()
public Integer getBfsThresholdReadBased()
public Integer getBfsThresholdSingleThreaded()
public Integer getBigPartitionThreshold()
public String getCc()
$PATH
)public String getCflags()
public Charset getCharset()
public Integer getCniDiffFactorDefault()
public Integer getCniSmallDefault()
public Integer getCniStopRecursionDefault()
public Integer getDfsThresholdLarge()
public List<String> getGraphs()
public Integer getIdleSleepDuration()
public List<String> getInvokeableProviders()
public ArrayFactoryStrategy getLargeArrayStrategy()
public Integer getLargeArrayThreshold()
Integer.MAX_VALUE - 3
)public String getLflags()
public Integer getMaxActiveSessions()
public Integer getMaxOffHeapSize()
public Integer getMaxQueueSizePerSession()
public Integer getMaxSnapshotCount()
public Integer getMemoryCleanupInterval()
public Integer getNumSpinLocks()
public Integer getNumWorkersAnalysis()
public Integer getNumWorkersFastTrackAnalysis()
public Integer getNumWorkersIo()
public Integer getParallelism()
public ParallelizationStrategy getParallelizationStrategy()
public String getPathToGmCompiler()
gm_comp
binary for dynamic compilations. If not set and enable_gm_compiler is true
, PGX will try to utilize one of the built-in compiler binaries.public Double getReleaseMemoryThreshold()
0.0
means graphs get freed as soon as their reference count becomes zero. That is, all sessions which loaded that graph were destroyed/timed out. A value of 1.0
means graphs get never freed. Engine will throw OutOfMemoryError
s as soon as a graph is needed which doesn't fit in memory anymore. A value of 0.7
means the engine keeps all graphs in memory as long as total memory consumption is below 70% of total available memory, even if there is currently no session using them. Once the 70% are surpassed and another graph needs to get loaded, un-used graphs get freed until memory consumption is below 70% again.public Integer getSessionIdleTimeoutSecs()
public Integer getSessionTaskTimeoutSecs()
public Integer getSmallTaskLength()
public Integer getTaskLength()
public String getTmpDir()
/tmp
on Linux)public Map<PgxConfig.Field,Object> getValues()
public Map<PgxConfig.Field,Object> getValuesWithoutDefaults()
public boolean hasDefaultValue(PgxConfig.Field field)
field
- the fieldpublic Boolean isAllowIdleTimeoutOverwrite()
true
, sessions can overwrite default idle timeoutpublic Boolean isAllowTaskTimeoutOverwrite()
true
, sessions can overwrite default task timeoutpublic Boolean isEnableGmCompiler()
true
, enable dynamic compilation of Green-Marl code during runtime. Note: the built-in Green-Marl compilers don't support all platforms. Find the list of supported platforms in the installation section. You can also use your own version of the compiler by setting the path_to_gm_compiler field.public 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 to true
results in better performance.public Boolean isLaunchWatchdogs()
true
, additional watch-dog threads will be launched which monitor and log engine health statspublic Boolean isStrictMode()
true
, exceptions are thrown and logged with ERROR
level whenever engine encounters configuration problems, such as invalid keys, mismatches and other potential errors. If false
, engine logs problems with ERROR
/WARN
level (depending on severity) and makes best guesses / uses sensible defaults instead of throwing exceptions.public Boolean isThrowOutOfMemoryErrorDuringAllocation()
true
, engine will throw OutOfMemoryErrors on purpose when trying to allocate large memory chunks.public Boolean isThrowOutOfMemoryErrorDuringLoading()
true
, engine will throw OutOfMemoryErrors on purpose when trying to load graphs from disk.public Boolean isThrowOutOfMemoryErrorDuringMutation()
true
, engine will throw OutOfMemoryErrors on purpose when trying to mutate graphs.public Boolean isUnsafeAllowForeignSyntax()
public Boolean isUnsafeAllowLocalFilesystem()
public Boolean isUseNativeAnalysis()
false
) or C++ (true
) runtimepublic Boolean isUseNativeLoaders()
false
) or C++ (true
) graph loader frameworkpublic Boolean isUseStringPool()
true
, PGX will store string properties in a pool in order to consume less memory on string propertiespublic static PgxConfig parse(InputStream is, boolean strict, File parent) throws IOException
is
- the input streamstrict
- if true, parses in strict modeparent
- if not null, resolves relative paths against this parentIOException
- Signals that an I/O exception has occurred.public static PgxConfig parse(Map<String,Object> raw, boolean strict, File parent)
raw
- the raw key/value mapping to parsestrict
- if true, parses in strict modeparent
- if not null, resolves relative paths against this parentpublic static PgxConfig parse(Properties props, boolean strict)
props
- the properties to parsestrict
- if true, parses in strict modeCopyright © 2015. All rights reserved.