@Generated(value={"common/src/templates/ConfigBuilder.stg","common/common.gradle"})
public final class PgxConfigBuilder
extends java.lang.Object
PgxConfig
.Constructor and Description |
---|
PgxConfigBuilder()
Constructs an empty PgxConfigBuilder
|
PgxConfigBuilder(java.util.Map<PgxConfig.Field,java.lang.Object> values)
Constructs a PgxConfigBuilder initialized with the values from the given map
|
PgxConfigBuilder(PgxConfig config)
Constructs a PgxConfigBuilder initialized with the values from the given config
|
PgxConfigBuilder(PgxConfigBuilder builder)
Constructs a PgxConfigBuilder initialized with the values from the given builder
|
Modifier and Type | Method and Description |
---|---|
PgxConfig |
build()
Builds the PgxConfig with a
parentPath of null . |
PgxConfig |
build(java.lang.String parentPath)
Builds the PgxConfig.
|
static PgxConfig |
buildPgxConfig(java.util.function.Consumer<PgxConfigBuilder> builderSetup)
Builds a
PgxConfig in-place |
PgxConfigBuilder |
clear()
Clears all values from the builder
|
java.util.Map<PgxConfig.Field,java.lang.Object> |
getValues() |
PgxConfigBuilder |
putAll(java.util.Map<PgxConfig.Field,java.lang.Object> values)
Puts all values from the given map into this builder.
|
PgxConfigBuilder |
putAll(PgxConfig config)
Puts all values from the given config into this builder
|
PgxConfigBuilder |
setAdminRequestCacheTimeout(int adminRequestCacheTimeout)
after how many seconds admin request results get removed from the cache.
|
PgxConfigBuilder |
setAllowIdleTimeoutOverwrite(boolean allowIdleTimeoutOverwrite)
if
true , sessions can overwrite default idle timeout |
PgxConfigBuilder |
setAllowLocalFilesystem(boolean allowLocalFilesystem)
(This flag reduces security, enable only if you know what you're doing!) Allow loading from local filesystem, if in client/server mode.
|
PgxConfigBuilder |
setAllowOverrideSchedulingInformation(boolean allowOverrideSchedulingInformation)
if
true allow all users to override scheduling information like task weight, task priority and number of threads |
PgxConfigBuilder |
setAllowTaskTimeoutOverwrite(boolean allowTaskTimeoutOverwrite)
if
true , sessions can overwrite default task timeout |
PgxConfigBuilder |
setAllowUserAutoRefresh(boolean allowUserAutoRefresh)
if
true users may enable auto refresh for graphs they load. |
PgxConfigBuilder |
setBasicSchedulerConfig(BasicSchedulerConfig basicSchedulerConfig)
configuration parameters for the fork join pool backend
|
PgxConfigBuilder |
setBasicSchedulerConfig(java.util.function.Consumer<BasicSchedulerConfigBuilder> basicSchedulerConfigBuilderSetup)
Builds a BasicSchedulerConfig in-place.
|
PgxConfigBuilder |
setBfsIterateQueTaskSize(int bfsIterateQueTaskSize)
task size for BFS iterate QUE phase
|
PgxConfigBuilder |
setBfsThresholdReadBased(int bfsThresholdReadBased)
threshold of BFS traversal level items to switch to read-based visiting strategy
|
PgxConfigBuilder |
setBfsThresholdSingleThreaded(int bfsThresholdSingleThreaded)
until what number of BFS traversal level items vertices are visited single-threaded
|
PgxConfigBuilder |
setCc(java.lang.String cc)
(only relevant if native analysis is enabled) C++ compiler executable (either absolute path or resolvable via
$PATH ) |
PgxConfigBuilder |
setCctrace(boolean cctrace)
if
true log every call to a Control or Core interface |
PgxConfigBuilder |
setCctraceOut(java.lang.String cctraceOut)
[relevant for cctrace] when cctrace is enabled, specifies a path to a file where cctrace should log to.
|
PgxConfigBuilder |
setCctracePrintStacktraces(boolean cctracePrintStacktraces)
[relevant for cctrace] when cctrace is enabled, print the stacktrace for each request and result
|
PgxConfigBuilder |
setCflags(java.lang.String cflags)
(only relevant if native analysis is enabled) flags for C++ compiler
|
PgxConfigBuilder |
setCharacterSet(java.lang.String characterSet)
standard charset to use throughout PGX, UTF-8 will be used as default.
|
PgxConfigBuilder |
setCniDiffFactorDefault(int cniDiffFactorDefault)
default diff factor value used in the common neighbor iterator implementations.
|
PgxConfigBuilder |
setCniSmallDefault(int cniSmallDefault)
default value used in the common neighbor iterator implementations, to indicate below which threshold a subarray is considered small.
|
PgxConfigBuilder |
setCniStopRecursionDefault(int cniStopRecursionDefault)
default value used in the common neighbor iterator implementations, to indicate the minimum size where the binary search approach is applied.
|
PgxConfigBuilder |
setDfsThresholdLarge(int dfsThresholdLarge)
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.
|
PgxConfigBuilder |
setEnableCsrfTokenChecks(boolean enableCsrfTokenChecks)
if true, the PGX webapp will verify CSRF token cookie and request parameters sent by the client exist and match.
|
PgxConfigBuilder |
setEnableGmCompiler(boolean enableGmCompiler)
if
true , enable dynamic compilation of Green-Marl code during runtime. |
PgxConfigBuilder |
setEnableSolarisStudioLabeling(boolean enableSolarisStudioLabeling)
[relevant when profiling with solaris studio] when enabled, label experiments using the 'er_label' command
|
PgxConfigBuilder |
setEnterpriseSchedulerConfig(java.util.function.Consumer<EnterpriseSchedulerConfigBuilder> enterpriseSchedulerConfigBuilderSetup)
Builds a EnterpriseSchedulerConfig in-place.
|
PgxConfigBuilder |
setEnterpriseSchedulerConfig(EnterpriseSchedulerConfig enterpriseSchedulerConfig)
configuration parameters for the enterprise scheduler
|
PgxConfigBuilder |
setEnterpriseSchedulerFlags(java.util.function.Consumer<EnterpriseSchedulerFlagsConfigBuilder> enterpriseSchedulerFlagsBuilderSetup)
Builds a EnterpriseSchedulerFlagsConfig in-place.
|
PgxConfigBuilder |
setEnterpriseSchedulerFlags(EnterpriseSchedulerFlagsConfig enterpriseSchedulerFlags)
[relevant for enterprise_scheduler] enterprise scheduler specific settings.
|
PgxConfigBuilder |
setExplicitSpinLocks(boolean explicitSpinLocks)
true means spin explicitly in a loop until lock becomes available. |
PgxConfigBuilder |
setGraphs(java.lang.String... graphs)
list of paths to graph configs to be registered at start-up
|
PgxConfigBuilder |
setIgnoreIncompatibleBackendOperations(boolean ignoreIncompatibleBackendOperations)
if
true only log when encountering incompatible operations and configuration values in RTS or FJ pool. |
PgxConfigBuilder |
setInitPgqlOnStartup(boolean initPgqlOnStartup)
if
true PGQL is directly initialized on start-up of PGX. |
PgxConfigBuilder |
setLargeArrayThreshold(int largeArrayThreshold)
threshold when the size of an array is too big to use a normal Java array.
|
PgxConfigBuilder |
setLaunchWatchdogs(boolean launchWatchdogs)
(for debugging) if
true , additional watch-dog threads will be launched which monitor and log engine health stats |
PgxConfigBuilder |
setLflags(java.lang.String lflags)
(only relevant if native analysis is enabled) linker flags for C++ compiler
|
PgxConfigBuilder |
setMaxActiveSessions(int maxActiveSessions)
the maximum number of sessions allowed to be active at a time
|
PgxConfigBuilder |
setMaxOffHeapSize(int maxOffHeapSize)
maximum amount of off-heap memory PGX is allowed to allocate in megabytes, before an OutOfMemoryError will be thrown.
|
PgxConfigBuilder |
setMaxQueueSizePerSession(int maxQueueSizePerSession)
the maximum number of pending tasks allowed to be in the queue, per session.
|
PgxConfigBuilder |
setMaxSnapshotCount(int maxSnapshotCount)
Number of snapshots that may be loaded in the engine at the same time.
|
PgxConfigBuilder |
setMemoryAllocator(MemoryAllocationStrategy memoryAllocator)
which memory allocator to use
|
PgxConfigBuilder |
setMemoryCleanupInterval(int memoryCleanupInterval)
memory cleanup tick in seconds
|
PgxConfigBuilder |
setMsBfsFrontierTypeStrategy(FrontierTypeStrategy msBfsFrontierTypeStrategy)
the type strategy to use for MS-BFS frontiers
|
PgxConfigBuilder |
setNumSpinLocks(int numSpinLocks)
how many spin locks each generated app will create at instantiation.
|
PgxConfigBuilder |
setParallelism(int parallelism)
number of worker threads to be used in thread pool.
|
PgxConfigBuilder |
setPathToGmCompiler(java.lang.String pathToGmCompiler)
if set, use this path to
gm_comp binary for dynamic compilations. |
PgxConfigBuilder |
setPatternMatchingSemantic(PatternMatchingSemantic patternMatchingSemantic)
the graph pattern matching semantic which is either homomorphism or isomorphism
|
PgxConfigBuilder |
setPatternMatchingSupernodeCacheThreshold(int patternMatchingSupernodeCacheThreshold)
minimum number of a node's neighbor to be a supernode.
|
PgxConfigBuilder |
setRandomGeneratorStrategy(RandomGeneratorStrategy randomGeneratorStrategy)
method of generating random numbers in pgx
|
PgxConfigBuilder |
setRandomSeed(long randomSeed)
[relevant for deterministic random number generator only] seed for the deterministic random number generator used in pgx.
|
PgxConfigBuilder |
setReleaseMemoryThreshold(double releaseMemoryThreshold)
threshold percentage of used memory after which the engine starts freeing un-used graphs.
|
PgxConfigBuilder |
setRevisitThreshold(int revisitThreshold)
maximum number of matched results from a node to be cached
|
PgxConfigBuilder |
setScheduler(SchedulerStrategy scheduler)
which scheduler to use.
|
PgxConfigBuilder |
setSessionIdleTimeoutSecs(int sessionIdleTimeoutSecs)
timeout of idling sessions in seconds.
|
PgxConfigBuilder |
setSessionTaskTimeoutSecs(int sessionTaskTimeoutSecs)
timeout to interrupt long-running tasks submitted by sessions (algorithms, I/O tasks) in seconds.
|
PgxConfigBuilder |
setSmallTaskLength(int smallTaskLength)
task length if total amount of work is small than default task length (only relevant for task-stealing strategies)
|
PgxConfigBuilder |
setSparkStreamsInterface(java.lang.String sparkStreamsInterface)
the name of an interface will be used spark data communication
|
PgxConfigBuilder |
setStrictMode(boolean strictMode)
if
true , exceptions are thrown and logged with ERROR level whenever engine encounters configuration problems, such as invalid keys, mismatches and other potential errors. |
PgxConfigBuilder |
setTaskLength(int taskLength)
default task length (only relevant for task-stealing strategies).
|
PgxConfigBuilder |
setTmpDir(java.lang.String tmpDir)
Use this path as temporary directory to store compilation artifacts and other temporary data.
|
PgxConfigBuilder |
setUNSAFEAllowForeignSyntax(boolean uNSAFEAllowForeignSyntax)
(This flag reduces security, enable only if you know what you're doing!) Allow foreign syntax in user-provided Green-Marl programs
|
PgxConfigBuilder |
setUseNativeAnalysis(boolean useNativeAnalysis)
execute analyses using Java (
false ) or C++ (true ) runtime |
PgxConfigBuilder |
setUseNativeLoaders(boolean useNativeLoaders)
use Java (
false ) or C++ (true ) graph loader framework |
PgxConfigBuilder |
setUseStringPool(boolean useStringPool)
If
true , PGX will store string properties in a pool in order to consume less memory on string properties |
java.io.InputStream |
toInputStream() |
java.lang.String |
toString() |
public PgxConfigBuilder()
public PgxConfigBuilder(java.util.Map<PgxConfig.Field,java.lang.Object> values)
values
- a map containing configuration valuespublic PgxConfigBuilder(PgxConfig config)
config
- the configuration to take the values frompublic PgxConfigBuilder(PgxConfigBuilder builder)
builder
- the builder to take the values frompublic PgxConfig build()
parentPath
of null
.build(String)
public PgxConfig build(java.lang.String parentPath)
parentPath
- if not null, resolves relative paths against this parentPathpublic static PgxConfig buildPgxConfig(java.util.function.Consumer<PgxConfigBuilder> builderSetup)
PgxConfig
in-placebuilderSetup
- a consumer to setup a newly created PgxConfig
public PgxConfigBuilder clear()
public java.util.Map<PgxConfig.Field,java.lang.Object> getValues()
public PgxConfigBuilder putAll(java.util.Map<PgxConfig.Field,java.lang.Object> values)
values
- the values to put in the builderpublic PgxConfigBuilder putAll(PgxConfig config)
config
- the config to take the values frompublic PgxConfigBuilder setAdminRequestCacheTimeout(int adminRequestCacheTimeout)
public PgxConfigBuilder setAllowIdleTimeoutOverwrite(boolean allowIdleTimeoutOverwrite)
true
, sessions can overwrite default idle timeoutpublic PgxConfigBuilder setAllowLocalFilesystem(boolean allowLocalFilesystem)
public PgxConfigBuilder setAllowOverrideSchedulingInformation(boolean allowOverrideSchedulingInformation)
true
allow all users to override scheduling information like task weight, task priority and number of threadspublic PgxConfigBuilder setAllowTaskTimeoutOverwrite(boolean allowTaskTimeoutOverwrite)
true
, sessions can overwrite default task timeoutpublic PgxConfigBuilder setAllowUserAutoRefresh(boolean allowUserAutoRefresh)
true
users may enable auto refresh for graphs they load. If false
only graphs mentioned in graphs
can have auto refresh enabledpublic PgxConfigBuilder setBasicSchedulerConfig(BasicSchedulerConfig basicSchedulerConfig)
public PgxConfigBuilder setBasicSchedulerConfig(java.util.function.Consumer<BasicSchedulerConfigBuilder> basicSchedulerConfigBuilderSetup)
basicSchedulerConfigBuilderSetup
- a consumer to setup a newly created BasicSchedulerConfigBuilder
BasicSchedulerConfigBuilder
public PgxConfigBuilder setBfsIterateQueTaskSize(int bfsIterateQueTaskSize)
public PgxConfigBuilder setBfsThresholdReadBased(int bfsThresholdReadBased)
public PgxConfigBuilder setBfsThresholdSingleThreaded(int bfsThresholdSingleThreaded)
public PgxConfigBuilder setCc(java.lang.String cc)
$PATH
)public PgxConfigBuilder setCctrace(boolean cctrace)
true
log every call to a Control or Core interfacepublic PgxConfigBuilder setCctraceOut(java.lang.String cctraceOut)
null
it will use the default PGX logger on level TRACE. If it is the special value :stderr:
it will log to stderrpublic PgxConfigBuilder setCctracePrintStacktraces(boolean cctracePrintStacktraces)
public PgxConfigBuilder setCflags(java.lang.String cflags)
public PgxConfigBuilder setCharacterSet(java.lang.String characterSet)
public PgxConfigBuilder setCniDiffFactorDefault(int cniDiffFactorDefault)
public PgxConfigBuilder setCniSmallDefault(int cniSmallDefault)
public PgxConfigBuilder setCniStopRecursionDefault(int cniStopRecursionDefault)
public PgxConfigBuilder setDfsThresholdLarge(int dfsThresholdLarge)
public PgxConfigBuilder setEnableCsrfTokenChecks(boolean enableCsrfTokenChecks)
public PgxConfigBuilder setEnableGmCompiler(boolean enableGmCompiler)
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 PgxConfigBuilder setEnableSolarisStudioLabeling(boolean enableSolarisStudioLabeling)
public PgxConfigBuilder setEnterpriseSchedulerConfig(java.util.function.Consumer<EnterpriseSchedulerConfigBuilder> enterpriseSchedulerConfigBuilderSetup)
enterpriseSchedulerConfigBuilderSetup
- a consumer to setup a newly created EnterpriseSchedulerConfigBuilder
EnterpriseSchedulerConfigBuilder
public PgxConfigBuilder setEnterpriseSchedulerConfig(EnterpriseSchedulerConfig enterpriseSchedulerConfig)
public PgxConfigBuilder setEnterpriseSchedulerFlags(java.util.function.Consumer<EnterpriseSchedulerFlagsConfigBuilder> enterpriseSchedulerFlagsBuilderSetup)
enterpriseSchedulerFlagsBuilderSetup
- a consumer to setup a newly created EnterpriseSchedulerFlagsConfigBuilder
EnterpriseSchedulerFlagsConfigBuilder
public PgxConfigBuilder setEnterpriseSchedulerFlags(EnterpriseSchedulerFlagsConfig enterpriseSchedulerFlags)
public PgxConfigBuilder setExplicitSpinLocks(boolean explicitSpinLocks)
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 PgxConfigBuilder setGraphs(java.lang.String... graphs)
graphs
- uri to graph config filepublic PgxConfigBuilder setIgnoreIncompatibleBackendOperations(boolean ignoreIncompatibleBackendOperations)
true
only log when encountering incompatible operations and configuration values in RTS or FJ pool. If false
throw exceptionspublic PgxConfigBuilder setInitPgqlOnStartup(boolean initPgqlOnStartup)
true
PGQL is directly initialized on start-up of PGX. Otherwise, it is initialized during the first use of PGQL.public PgxConfigBuilder setLargeArrayThreshold(int largeArrayThreshold)
Integer.MAX_VALUE - 3
)public PgxConfigBuilder setLaunchWatchdogs(boolean launchWatchdogs)
true
, additional watch-dog threads will be launched which monitor and log engine health statspublic PgxConfigBuilder setLflags(java.lang.String lflags)
public PgxConfigBuilder setMaxActiveSessions(int maxActiveSessions)
public PgxConfigBuilder setMaxOffHeapSize(int maxOffHeapSize)
public PgxConfigBuilder setMaxQueueSizePerSession(int maxQueueSizePerSession)
public PgxConfigBuilder setMaxSnapshotCount(int maxSnapshotCount)
public PgxConfigBuilder setMemoryAllocator(MemoryAllocationStrategy memoryAllocator)
public PgxConfigBuilder setMemoryCleanupInterval(int memoryCleanupInterval)
public PgxConfigBuilder setMsBfsFrontierTypeStrategy(FrontierTypeStrategy msBfsFrontierTypeStrategy)
public PgxConfigBuilder setNumSpinLocks(int numSpinLocks)
public PgxConfigBuilder setParallelism(int parallelism)
public PgxConfigBuilder setPathToGmCompiler(java.lang.String pathToGmCompiler)
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 PgxConfigBuilder setPatternMatchingSemantic(PatternMatchingSemantic patternMatchingSemantic)
public PgxConfigBuilder setPatternMatchingSupernodeCacheThreshold(int patternMatchingSupernodeCacheThreshold)
public PgxConfigBuilder setRandomGeneratorStrategy(RandomGeneratorStrategy randomGeneratorStrategy)
public PgxConfigBuilder setRandomSeed(long randomSeed)
public PgxConfigBuilder setReleaseMemoryThreshold(double releaseMemoryThreshold)
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 PgxConfigBuilder setRevisitThreshold(int revisitThreshold)
public PgxConfigBuilder setScheduler(SchedulerStrategy scheduler)
public PgxConfigBuilder setSessionIdleTimeoutSecs(int sessionIdleTimeoutSecs)
public PgxConfigBuilder setSessionTaskTimeoutSecs(int sessionTaskTimeoutSecs)
public PgxConfigBuilder setSmallTaskLength(int smallTaskLength)
public PgxConfigBuilder setSparkStreamsInterface(java.lang.String sparkStreamsInterface)
public PgxConfigBuilder setStrictMode(boolean strictMode)
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 PgxConfigBuilder setTaskLength(int taskLength)
public PgxConfigBuilder setTmpDir(java.lang.String tmpDir)
/tmp
on Linux)public PgxConfigBuilder setUNSAFEAllowForeignSyntax(boolean uNSAFEAllowForeignSyntax)
public PgxConfigBuilder setUseNativeAnalysis(boolean useNativeAnalysis)
false
) or C++ (true
) runtimepublic PgxConfigBuilder setUseNativeLoaders(boolean useNativeLoaders)
false
) or C++ (true
) graph loader frameworkpublic PgxConfigBuilder setUseStringPool(boolean useStringPool)
true
, PGX will store string properties in a pool in order to consume less memory on string propertiespublic java.io.InputStream toInputStream()
InputStream
representing the configpublic java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2017 Oracle Corp. All Rights Reserved.