Package oracle.pgx.config
Class PgxConfigBuilder
- java.lang.Object
-
- oracle.pgx.config.PgxConfigBuilder
-
@Generated({"common/config/src/templates/ConfigBuilder.stg","common/config/config.gradle"}) public final class PgxConfigBuilder extends java.lang.Object
Builder forPgxConfig
.
-
-
Constructor Summary
Constructors Constructor Description PgxConfigBuilder()
Constructs an empty PgxConfigBuilderPgxConfigBuilder(java.util.Map<PgxConfig.Field,java.lang.Object> values)
Constructs a PgxConfigBuilder initialized with the values from the given mapPgxConfigBuilder(PgxConfig config)
Constructs a PgxConfigBuilder initialized with the values from the given configPgxConfigBuilder(PgxConfigBuilder builder)
Constructs a PgxConfigBuilder initialized with the values from the given builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PgxConfig
build()
Builds the PgxConfig with aparentPath
ofnull
.PgxConfig
build(java.lang.String parentPath)
Builds the PgxConfig.static PgxConfig
buildPgxConfig(java.util.function.Consumer<PgxConfigBuilder> builderSetup)
Builds aPgxConfig
in-placePgxConfigBuilder
clear()
Clears all values from the builderjava.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 builderPgxConfigBuilder
setAdminRequestCacheTimeout(int adminRequestCacheTimeout)
after how many seconds admin request results get removed from the cache.PgxConfigBuilder
setAllowedRemoteLoadingLocations(java.lang.String... allowedRemoteLoadingLocations)
(This option may reduce security, use it only if you know what you are doing!) Allow loading graphs into the PGX engine from remote locations.PgxConfigBuilder
setAllowIdleTimeoutOverwrite(boolean allowIdleTimeoutOverwrite)
iftrue
, sessions can overwrite default idle timeoutPgxConfigBuilder
setAllowLazyLoadingForDatabaseGraphs(boolean allowLazyLoadingForDatabaseGraphs)
iftrue
, PGX will automatically load graphs from the database when they are first referenced in graph queriesPgxConfigBuilder
setAllowOverrideSchedulingInformation(boolean allowOverrideSchedulingInformation)
iftrue
allow all users to override scheduling information like task weight, task priority and number of threadsPgxConfigBuilder
setAllowTaskTimeoutOverwrite(boolean allowTaskTimeoutOverwrite)
iftrue
, sessions can overwrite default task timeoutPgxConfigBuilder
setAllowUserAutoRefresh(boolean allowUserAutoRefresh)
iftrue
users may enable auto refresh for graphs they load.PgxConfigBuilder
setAuthorization(java.lang.Object... authorization)
mapping of users and roles to resources and permissions for authorizationPgxConfigBuilder
setAuthorization(java.util.List<?> authorization)
mapping of users and roles to resources and permissions for authorizationPgxConfigBuilder
setAuthorizationSessionCreateAllowAll(boolean authorizationSessionCreateAllowAll)
iftrue
allow all users to create a PGX session regardless of permissions granted to themPgxConfigBuilder
setBackendWrapper(java.lang.String backendWrapper)
Only for internal use.PgxConfigBuilder
setBasicSchedulerConfig(java.util.function.Consumer<BasicSchedulerConfigBuilder> basicSchedulerConfigBuilderSetup)
Builds a BasicSchedulerConfig in-place.PgxConfigBuilder
setBasicSchedulerConfig(BasicSchedulerConfig basicSchedulerConfig)
configuration parameters for the fork join pool backendPgxConfigBuilder
setBfsIterateQueTaskSize(int bfsIterateQueTaskSize)
task size for BFS iterate QUE phasePgxConfigBuilder
setBfsThresholdParentReadBased(double bfsThresholdParentReadBased)
threshold of BFS traversal level items above which to switch to parent-read-based visiting strategyPgxConfigBuilder
setBfsThresholdReadBased(int bfsThresholdReadBased)
threshold of BFS traversal level items above which to switch to read-based visiting strategyPgxConfigBuilder
setBfsThresholdSingleThreaded(int bfsThresholdSingleThreaded)
until what number of BFS traversal level items vertices are visited single-threadedPgxConfigBuilder
setBuiltinsPath(java.lang.String builtinsPath)
Path to the builtin algorithms directory.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
setCommonLogConfigure(java.lang.String commonLogConfigure)
Path to a log configuration in Logback syntax.PgxConfigBuilder
setDataMemoryLimits(java.util.function.Consumer<DataMemoryLimitsConfigBuilder> dataMemoryLimitsBuilderSetup)
Builds a DataMemoryLimitsConfig in-place.PgxConfigBuilder
setDataMemoryLimits(DataMemoryLimitsConfig dataMemoryLimits)
memory limits configuration parametersPgxConfigBuilder
setDebugServer(java.lang.String debugServer)
Hostname of the debug server.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
setEnableEngineTls(boolean enableEngineTls)
Iftrue
, the engine enables transport layer security (TLS) for connections between engine processes.PgxConfigBuilder
setEnableGmCompiler(boolean enableGmCompiler)
iftrue
, enable dynamic compilation of Green-Marl code during runtimePgxConfigBuilder
setEnableGraphLoadingCache(boolean enableGraphLoadingCache)
iftrue
, activate the graph loading cache that will accelerate loading of graphs that were previously loaded (can only be disabled in embedded mode)PgxConfigBuilder
setEnableMemoryLimitsChecks(boolean enableMemoryLimitsChecks)
if true, PGX will enforce the configured memory limitsPgxConfigBuilder
setEnableMlAccelerators(boolean enableMlAccelerators)
iftrue
, will utilize available ML accelerators to run machine learning trainings faster.PgxConfigBuilder
setEnableShutdownCleanupHook(boolean enableShutdownCleanupHook)
iftrue
PGX will add a JVM shutdown hook that will automatically shutdown PGX at JVM shutdown.PgxConfigBuilder
setEnableSnapshotPropertiesPublishStatePropagation(boolean enableSnapshotPropertiesPublishStatePropagation)
iftrue
, properties in a new snapshot will inherit the publishing state of properties in the parent snapshotPgxConfigBuilder
setEngineConnectionTimeoutSecs(int engineConnectionTimeoutSecs)
Timeout in seconds to setup the initial connections among PGX.D processes.PgxConfigBuilder
setEngineTlsCipher(java.lang.String engineTlsCipher)
Cipher suite name (in OpenSSL syntax) to be used by the engine for securing TLS connections.PgxConfigBuilder
setEngineTlsExpectedDn(java.lang.String engineTlsExpectedDn)
If non empty, the engine will verify that the peer's certificate's Subject Distinguished Name matches exactly the given string.PgxConfigBuilder
setEngineTlsKeystore(java.lang.String engineTlsKeystore)
Path to the PKCS12 keystore to be used by the engine for securing mutual TLS connections between engine processes.PgxConfigBuilder
setEngineTlsTruststore(java.lang.String engineTlsTruststore)
Path to the PEM truststore to be used by the engine for securing mutual TLS connections between engine processes.PgxConfigBuilder
setEngineTlsVerifyHostname(boolean engineTlsVerifyHostname)
Iftrue
, the engine will verify that the hostname contained in the peer's certificate matches the hostname of the peer.PgxConfigBuilder
setEnterpriseSchedulerConfig(java.util.function.Consumer<EnterpriseSchedulerConfigBuilder> enterpriseSchedulerConfigBuilderSetup)
Builds a EnterpriseSchedulerConfig in-place.PgxConfigBuilder
setEnterpriseSchedulerConfig(EnterpriseSchedulerConfig enterpriseSchedulerConfig)
configuration parameters for the enterprise schedulerPgxConfigBuilder
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
setExecutablePath(java.lang.String executablePath)
Path to the PGX.D executable.PgxConfigBuilder
setExistingHostnames(java.lang.String... existingHostnames)
A list of names or IP addresses of hosts that are already part of an existing PGX.D cluster.PgxConfigBuilder
setExplicitSpinLocks(boolean explicitSpinLocks)
true
means spin explicitly in a loop until lock becomes available.PgxConfigBuilder
setFileLocations(java.lang.Object... fileLocations)
the file-locations that can be used in the authorization-configPgxConfigBuilder
setFileLocations(java.util.List<?> fileLocations)
the file-locations that can be used in the authorization-configPgxConfigBuilder
setGraphAlgorithmLanguage(Compiler graphAlgorithmLanguage)
Frontend compiler to use.PgxConfigBuilder
setGraphSharingOption(GraphSharingOption graphSharingOption)
control if a graph can be published and shared with other usersPgxConfigBuilder
setGraphValidationLevel(GraphValidationLevel graphValidationLevel)
level of validation performed on newly loaded or created graphsPgxConfigBuilder
setHandshakePort(int handshakePort)
a TCP port which will be used for handshaking of distributed backend processes.PgxConfigBuilder
setHostnames(java.lang.String... hostnames)
A list of names or IP addresses of hosts which should be involved in initial bootstrapping of a PGX.D cluster.PgxConfigBuilder
setIfEthernet(java.lang.String ifEthernet)
Ethernet network interface, used to initialize the network transport layer when using Ethernet.PgxConfigBuilder
setIfInfiniband(java.lang.String ifInfiniband)
InfiniBand network interface, used to initialize the network transport layer when using InfiniBand.PgxConfigBuilder
setIgnoreIncompatibleBackendOperations(boolean ignoreIncompatibleBackendOperations)
iftrue
only log when encountering incompatible operations and configuration values in RTS or FJ pool.PgxConfigBuilder
setInitPgqlOnStartup(boolean initPgqlOnStartup)
iftrue
PGQL is directly initialized on start-up of PGX.PgxConfigBuilder
setInPlaceUpdateConsistencyModel(UpdateConsistencyModel inPlaceUpdateConsistencyModel)
Consistency model used when in-place updates occur.PgxConfigBuilder
setInstanceName(java.lang.String instanceName)
Instance name sent as label to debug server.PgxConfigBuilder
setIntervalToPollMax(int intervalToPollMax)
Exponential backoff upper bound (in ms) to which -once reached, the job status polling interval is fixedPgxConfigBuilder
setJavaClassPath(java.lang.String javaClassPath)
Path to required java libraries.PgxConfigBuilder
setJavaHomeDir(java.lang.String javaHomeDir)
The path to Java's home directory.PgxConfigBuilder
setLargeArrayThreshold(int largeArrayThreshold)
threshold when the size of an array is too big to use a normal Java array.PgxConfigBuilder
setLargeBufCount(int largeBufCount)
Number of large buffers populated in the pool.PgxConfigBuilder
setLargeBufSizeKb(int largeBufSizeKb)
Size in kB of the large buffers.PgxConfigBuilder
setLaunchWatchdogs(boolean launchWatchdogs)
(for debugging) iftrue
, additional watch-dog threads will be launched which monitor and log engine health statsPgxConfigBuilder
setLivenessCheckDelaySecs(int livenessCheckDelaySecs)
Liveness check interval, i.e., how often to check that the PGX.D server is alive and that it can accept and execute commands.PgxConfigBuilder
setLivenessCheckTimeoutSecs(int livenessCheckTimeoutSecs)
Fails liveness check task if it cannot complete the liveness task in the period of time.PgxConfigBuilder
setLogConfigure(java.lang.String logConfigure)
Path to a log configuration in Log4j (version 1) syntax.PgxConfigBuilder
setLogStdRedirect(java.lang.String logStdRedirect)
Path to a log file into which the standard output streams (stdout, stderr) of PGX.D backend should be redirected.PgxConfigBuilder
setMaxActiveSessions(int maxActiveSessions)
the maximum number of sessions allowed to be active at a timePgxConfigBuilder
setMaxDistinctStringsPerPool(int maxDistinctStringsPerPool)
[only relevant if string_pooling_strategy is indexed] amount of distinct strings per property after which to stop pooling.PgxConfigBuilder
setMaxHttpClientRequestSize(long maxHttpClientRequestSize)
maximum size in bytes of any http request sent to to the PGX server over the REST API.PgxConfigBuilder
setMaximumAttainableMemory(java.lang.String maximumAttainableMemory)
The maximum memory that can ever be made available to this PGX.D cluster.PgxConfigBuilder
setMaximumCommandBuffersPosted(int maximumCommandBuffersPosted)
The max number of posted buffers in an MQL channel for incoming command messages from all remotes.PgxConfigBuilder
setMaximumDataBuffersPosted(int maximumDataBuffersPosted)
The max number of large buffers posted in an MQL channel for incoming data messages from all remotes.PgxConfigBuilder
setMaximumReceivedMessagesBuffer(int maximumReceivedMessagesBuffer)
The max size of per remote received message queue.PgxConfigBuilder
setMaximumSendBuffersInFlight(int maximumSendBuffersInFlight)
The max number of in-flight messages can be sent globally at the same 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
setMaxOnHeapMemoryUsageRatio(double maxOnHeapMemoryUsageRatio)
maximum ratio of on-heap memory that PGX is allowed to use, between 0 and 1.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 usePgxConfigBuilder
setMemoryCleanupInterval(int memoryCleanupInterval)
memory cleanup tick in secondsPgxConfigBuilder
setMinArrayCompactionThreshold(double minArrayCompactionThreshold)
[only relevant for graphs optimized for updates] minimum value that can be used for the array_compaction_threshold value in graph configuration.PgxConfigBuilder
setMinFetchIntervalSec(int minFetchIntervalSec)
(only relevant if the graph format supports delta updates) for delta-refresh, the lowest interval at which a graph source is queried for changes.PgxConfigBuilder
setMinUpdateIntervalSec(int minUpdateIntervalSec)
for auto-refresh, the lowest interval after which a new snapshot is created, either by reloading the entire graph or if the format supports delta-updates, out of the cached changes (only relevant if the format supports delta updates).PgxConfigBuilder
setMsBfsFrontierTypeStrategy(FrontierTypeStrategy msBfsFrontierTypeStrategy)
the type strategy to use for MS-BFS frontiersPgxConfigBuilder
setNetworkCredits(int networkCredits)
The number of network credits will be provided to MQL (per MQL remote queue).PgxConfigBuilder
setNewFollowerConnectionTimeoutSecs(int newFollowerConnectionTimeoutSecs)
Timeout in seconds for existing PGX.D processes to wait for the new follower to join the cluster in elastic scenarios.PgxConfigBuilder
setNumSpinLocks(int numSpinLocks)
how many spin locks each generated app will create at instantiation.PgxConfigBuilder
setObfuscateLog(boolean obfuscateLog)
If set totrue
and iflog_sensitive_data
is disabled (by default in release mode), the engine will irreversibly hash any remaining parameters of the log messages.PgxConfigBuilder
setOnHoldJobTimeoutSecs(int onHoldJobTimeoutSecs)
Timeout in seconds to keep the job waiting in case it is put on hold due to lack of memory resources.PgxConfigBuilder
setParallelism(int parallelism)
number of worker threads to be used in thread pool.PgxConfigBuilder
setPartitioningShuffleVertices(boolean partitioningShuffleVertices)
If set totrue
, the vertices of the graph will be randomly shuffled among machines before partitioning.PgxConfigBuilder
setPartitioningStrategy(java.lang.String partitioningStrategy)
Partitioning strategy of the vertices of the graph.PgxConfigBuilder
setPatternMatchingSupernodeCacheThreshold(int patternMatchingSupernodeCacheThreshold)
minimum number of a node's neighbor to be a supernode.PgxConfigBuilder
setPermissionChecksInterval(int permissionChecksInterval)
interval in seconds to perform permission checks on source graphsPgxConfigBuilder
setPgqlMaximumNumBuffers(int pgqlMaximumNumBuffers)
The max number of large buffers used by the PGQL engine per query.PgxConfigBuilder
setPgxRealm(java.util.function.Consumer<RealmConfigBuilder> pgxRealmBuilderSetup)
Builds a RealmConfig in-place.PgxConfigBuilder
setPgxRealm(RealmConfig pgxRealm)
configuration parameters for the realmPgxConfigBuilder
setPgxServerBaseUrl(java.lang.String pgxServerBaseUrl)
should be used when deploying pgx server behind a load balancer to make clients before 21.3 backward compatible, the value should be set to the load balancer addressPgxConfigBuilder
setPoolingFactor(double poolingFactor)
[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 ineffectivePgxConfigBuilder
setPreloadGraphs(java.lang.Object... preloadGraphs)
list of graph configs to be registered at start-up.PgxConfigBuilder
setPreloadGraphs(java.util.List<?> preloadGraphs)
list of graph configs to be registered at start-up.PgxConfigBuilder
setProcId(int procId)
Internal unique machine identifier in the cluster.PgxConfigBuilder
setRandomGeneratorStrategy(RandomGeneratorStrategy randomGeneratorStrategy)
method of generating random numbers in pgxPgxConfigBuilder
setRandomSeed(long randomSeed)
[relevant for deterministic random number generator only] seed for the deterministic random number generator used in pgx.PgxConfigBuilder
setReadinessMemoryUsageRatio(double readinessMemoryUsageRatio)
memory limit ratio that should be considered to detect if PGX server is ready, used by isReady API, default value is 1.0PgxConfigBuilder
setReleaseMemoryThreshold(double releaseMemoryThreshold)
threshold percentage of used memory after which the engine starts freeing un-used graphs.PgxConfigBuilder
setResourceMonitor(int resourceMonitor)
Frequency at which to send resource statistics to the debug server, in ms.PgxConfigBuilder
setRevisitThreshold(int revisitThreshold)
maximum number of matched results from a node to be cachedPgxConfigBuilder
setRunningMemoryUsageRatio(double runningMemoryUsageRatio)
memory limit ratio that should be considered to detect if PGX server is running, used by isRunning API default value is 1.0PgxConfigBuilder
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
setStrictMode(boolean strictMode)
iftrue
, exceptions are thrown and logged withERROR
level whenever engine encounters configuration problems, such as invalid keys, mismatches and other potential errors.PgxConfigBuilder
setStringPoolingStrategy(StringPoolingStrategy stringPoolingStrategy)
which string pooling strategy to usePgxConfigBuilder
setSystemIdleDelayBeforeIdlingMsecs(int systemIdleDelayBeforeIdlingMsecs)
When the system is idle for longer than `system_idle_delay_before_idling_msecs`, start placing active background threads to sleep to reduce CPU usage and power consumption.PgxConfigBuilder
setSystemIdleSleepIncrementIntervalMsecs(int systemIdleSleepIncrementIntervalMsecs)
Idling will start withsystem_idle_sleep_increment_msecs
sleep duration and will increment this much everysystem_idle_sleep_increment_interval_msecs
to a maximum sleep ofsystem_idle_sleep_max_msecs
.PgxConfigBuilder
setSystemIdleSleepIncrementMsecs(int systemIdleSleepIncrementMsecs)
Idling will start withsystem_idle_sleep_increment_msecs
sleep duration and will increment this much everysystem_idle_sleep_increment_interval_msecs
to a maximum sleep ofsystem_idle_sleep_max_msecs
.PgxConfigBuilder
setSystemIdleSleepMaxMsecs(int systemIdleSleepMaxMsecs)
Idling will start withsystem_idle_sleep_increment_msecs
sleep duration and will increment this much everysystem_idle_sleep_increment_interval_msecs
to a maximum sleep ofsystem_idle_sleep_max_msecs
.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
setUdfConfigDirectory(java.lang.String udfConfigDirectory)
directory path containing udf config filesPgxConfigBuilder
setUNSAFEAllowForeignSyntax(boolean uNSAFEAllowForeignSyntax)
(This flag reduces security, enable only if you know what you're doing!) Allow foreign syntax in user-provided Green-Marl programsPgxConfigBuilder
setUseDedicatedPollerThreads(boolean useDedicatedPollerThreads)
Iftrue
, the engine will use dedicated RTS poller threads that will always be scheduled, whereas if set to code>false, IO threads will be used and will share RTS slots with other worker threads.PgxConfigBuilder
setUseIndexForReachabilityQueries(ReachabilityIndexCreationMode useIndexForReachabilityQueries)
create index for reachability queriesPgxConfigBuilder
setUseInfiniband(boolean useInfiniband)
If set totrue
, an InfiniBand network interface will be used.PgxConfigBuilder
setUseMemoryMapperForReadingPgb(boolean useMemoryMapperForReadingPgb)
if true, use memory mapped files for reading graphs in PGB format if possible; false always use s stream based implementationPgxConfigBuilder
setUseMemoryMapperForStoringPgb(boolean useMemoryMapperForStoringPgb)
if true, use memory mapped files for storing in PGB format if possible; if false always use a stream based implementationjava.io.InputStream
toInputStream()
java.lang.String
toString()
-
-
-
Constructor Detail
-
PgxConfigBuilder
public PgxConfigBuilder()
Constructs an empty PgxConfigBuilder
-
PgxConfigBuilder
public PgxConfigBuilder(java.util.Map<PgxConfig.Field,java.lang.Object> values)
Constructs a PgxConfigBuilder initialized with the values from the given map- Parameters:
values
- a map containing configuration values
-
PgxConfigBuilder
public PgxConfigBuilder(PgxConfig config)
Constructs a PgxConfigBuilder initialized with the values from the given config- Parameters:
config
- the configuration to take the values from
-
PgxConfigBuilder
public PgxConfigBuilder(PgxConfigBuilder builder)
Constructs a PgxConfigBuilder initialized with the values from the given builder- Parameters:
builder
- the builder to take the values from
-
-
Method Detail
-
buildPgxConfig
public static PgxConfig buildPgxConfig(java.util.function.Consumer<PgxConfigBuilder> builderSetup)
Builds aPgxConfig
in-place- Parameters:
builderSetup
- a consumer to setup a newly createdPgxConfig
-
putAll
public PgxConfigBuilder putAll(java.util.Map<PgxConfig.Field,java.lang.Object> values)
Puts all values from the given map into this builder.- Parameters:
values
- the values to put in the builder
-
putAll
public PgxConfigBuilder putAll(PgxConfig config)
Puts all values from the given config into this builder- Parameters:
config
- the config to take the values from
-
clear
public PgxConfigBuilder clear()
Clears all values from the builder
-
build
public PgxConfig build(java.lang.String parentPath)
Builds the PgxConfig.- Parameters:
parentPath
- if not null, resolves relative paths against this parentPath- Returns:
- an instance of PgxConfig
-
build
public PgxConfig build()
Builds the PgxConfig with aparentPath
ofnull
.- Returns:
- An instance of PgxConfig
- See Also:
build(String)
-
toInputStream
public java.io.InputStream toInputStream()
- Returns:
- an
InputStream
representing the config
-
getValues
public java.util.Map<PgxConfig.Field,java.lang.Object> getValues()
- Returns:
- the raw config values
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
setEnableGraphLoadingCache
public PgxConfigBuilder setEnableGraphLoadingCache(boolean enableGraphLoadingCache)
iftrue
, activate the graph loading cache that will accelerate loading of graphs that were previously loaded (can only be disabled in embedded mode)
-
setBasicSchedulerConfig
public PgxConfigBuilder setBasicSchedulerConfig(BasicSchedulerConfig basicSchedulerConfig)
configuration parameters for the fork join pool backend
-
setBasicSchedulerConfig
public PgxConfigBuilder setBasicSchedulerConfig(java.util.function.Consumer<BasicSchedulerConfigBuilder> basicSchedulerConfigBuilderSetup)
Builds a BasicSchedulerConfig in-place. configuration parameters for the fork join pool backend- Parameters:
basicSchedulerConfigBuilderSetup
- a consumer to setup a newly createdBasicSchedulerConfigBuilder
- See Also:
BasicSchedulerConfigBuilder
-
setEnterpriseSchedulerConfig
public PgxConfigBuilder setEnterpriseSchedulerConfig(EnterpriseSchedulerConfig enterpriseSchedulerConfig)
configuration parameters for the enterprise scheduler
-
setEnterpriseSchedulerConfig
public PgxConfigBuilder setEnterpriseSchedulerConfig(java.util.function.Consumer<EnterpriseSchedulerConfigBuilder> enterpriseSchedulerConfigBuilderSetup)
Builds a EnterpriseSchedulerConfig in-place. configuration parameters for the enterprise scheduler- Parameters:
enterpriseSchedulerConfigBuilderSetup
- a consumer to setup a newly createdEnterpriseSchedulerConfigBuilder
- See Also:
EnterpriseSchedulerConfigBuilder
-
setMinFetchIntervalSec
public PgxConfigBuilder setMinFetchIntervalSec(int minFetchIntervalSec)
(only relevant if the graph format supports delta updates) for delta-refresh, the lowest interval at which a graph source is queried for changes. You can tune this value to prevent PGX from hanging due to too frequent graph delta-refreshing.
-
setMinUpdateIntervalSec
public PgxConfigBuilder setMinUpdateIntervalSec(int minUpdateIntervalSec)
for auto-refresh, the lowest interval after which a new snapshot is created, either by reloading the entire graph or if the format supports delta-updates, out of the cached changes (only relevant if the format supports delta updates). You can tune this value to prevent PGX from hanging due to too frequent graph auto-refreshing.
-
setInPlaceUpdateConsistencyModel
public PgxConfigBuilder setInPlaceUpdateConsistencyModel(UpdateConsistencyModel inPlaceUpdateConsistencyModel)
Consistency model used when in-place updates occur. Only relevant if in-place updates are enabled. Currently updates are only applied in place if the updates are not structural (Only modifies properties). Two models are currently implemented, one only delays new tasks when an update occurs, the other also running tasks.
-
setMinArrayCompactionThreshold
public PgxConfigBuilder setMinArrayCompactionThreshold(double minArrayCompactionThreshold)
[only relevant for graphs optimized for updates] minimum value that can be used for the array_compaction_threshold value in graph configuration. If a graph configuration attempts to use a value lower than the one specified by min_array_compaction_threshold, it will use min_array_compaction_threshold instead
-
setMaxSnapshotCount
public PgxConfigBuilder setMaxSnapshotCount(int maxSnapshotCount)
Number of snapshots that may be loaded in the engine at the same time. New snapshots can be created via auto or forced update. If the number of snapshots of a graph reaches this threshold, no more auto-updates will be performed and a forced-updated will result in an exception until one or more snapshots are removed from memory. A value of zero indicates to support an unlimited amount of snapshots.
-
setJavaHomeDir
public PgxConfigBuilder setJavaHomeDir(java.lang.String javaHomeDir)
The path to Java's home directory. If set to <system-java-home-dir>, use the java.home system property.
-
setEnableGmCompiler
public PgxConfigBuilder setEnableGmCompiler(boolean enableGmCompiler)
iftrue
, enable dynamic compilation of Green-Marl code during runtime
-
setGraphAlgorithmLanguage
public PgxConfigBuilder setGraphAlgorithmLanguage(Compiler graphAlgorithmLanguage)
Frontend compiler to use.
-
setUNSAFEAllowForeignSyntax
public 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
-
setAllowUserAutoRefresh
public PgxConfigBuilder setAllowUserAutoRefresh(boolean allowUserAutoRefresh)
iftrue
users may enable auto refresh for graphs they load. Iffalse
only graphs mentioned inpreload_graphs
can have auto refresh enabled
-
setIgnoreIncompatibleBackendOperations
public PgxConfigBuilder setIgnoreIncompatibleBackendOperations(boolean ignoreIncompatibleBackendOperations)
iftrue
only log when encountering incompatible operations and configuration values in RTS or FJ pool. Iffalse
throw exceptions
-
setAllowOverrideSchedulingInformation
public PgxConfigBuilder setAllowOverrideSchedulingInformation(boolean allowOverrideSchedulingInformation)
iftrue
allow all users to override scheduling information like task weight, task priority and number of threads
-
setUdfConfigDirectory
public PgxConfigBuilder setUdfConfigDirectory(java.lang.String udfConfigDirectory)
directory path containing udf config files
-
setHostnames
public PgxConfigBuilder setHostnames(java.lang.String... hostnames)
A list of names or IP addresses of hosts which should be involved in initial bootstrapping of a PGX.D cluster. The first host specified in the list will become the leader host. This parameter should not be set when joining an existing cluster.- Parameters:
hostnames
- A host name or IP address.
-
setExistingHostnames
public PgxConfigBuilder setExistingHostnames(java.lang.String... existingHostnames)
A list of names or IP addresses of hosts that are already part of an existing PGX.D cluster. The new follower machine uses this list to join the cluster. This parameter should not be set when initially bootstrapping a cluster.- Parameters:
existingHostnames
- A host name or IP address.
-
setExecutablePath
public PgxConfigBuilder setExecutablePath(java.lang.String executablePath)
Path to the PGX.D executable.
-
setBuiltinsPath
public PgxConfigBuilder setBuiltinsPath(java.lang.String builtinsPath)
Path to the builtin algorithms directory.
-
setLogConfigure
public PgxConfigBuilder setLogConfigure(java.lang.String logConfigure)
Path to a log configuration in Log4j (version 1) syntax. Contents in the file only affects a PGX.D backend. Note: This parameter is set automatically by `start-server.sh`, do not change it.
-
setCommonLogConfigure
public PgxConfigBuilder setCommonLogConfigure(java.lang.String commonLogConfigure)
Path to a log configuration in Logback syntax. Contents in the file only affects PGX.D backend components shared with PGX.SM via JNI. Note: This parameter is set automatically by `start-server.sh`, do not change it.
-
setLogStdRedirect
public PgxConfigBuilder setLogStdRedirect(java.lang.String logStdRedirect)
Path to a log file into which the standard output streams (stdout, stderr) of PGX.D backend should be redirected. No redirection happens when the path is null.
-
setObfuscateLog
public PgxConfigBuilder setObfuscateLog(boolean obfuscateLog)
If set totrue
and iflog_sensitive_data
is disabled (by default in release mode), the engine will irreversibly hash any remaining parameters of the log messages.
-
setMaximumCommandBuffersPosted
public PgxConfigBuilder setMaximumCommandBuffersPosted(int maximumCommandBuffersPosted)
The max number of posted buffers in an MQL channel for incoming command messages from all remotes.
-
setMaximumReceivedMessagesBuffer
public PgxConfigBuilder setMaximumReceivedMessagesBuffer(int maximumReceivedMessagesBuffer)
The max size of per remote received message queue.
-
setMaximumSendBuffersInFlight
public PgxConfigBuilder setMaximumSendBuffersInFlight(int maximumSendBuffersInFlight)
The max number of in-flight messages can be sent globally at the same time. PGX.D can sendmaximum_send_buffers_in_flight / (# of remote hosts - 1)
messages per remote at maximum.
-
setMaximumDataBuffersPosted
public PgxConfigBuilder setMaximumDataBuffersPosted(int maximumDataBuffersPosted)
The max number of large buffers posted in an MQL channel for incoming data messages from all remotes.
-
setNetworkCredits
public PgxConfigBuilder setNetworkCredits(int networkCredits)
The number of network credits will be provided to MQL (per MQL remote queue). Larger value, more message sent at the same time by MQL.
-
setNewFollowerConnectionTimeoutSecs
public PgxConfigBuilder setNewFollowerConnectionTimeoutSecs(int newFollowerConnectionTimeoutSecs)
Timeout in seconds for existing PGX.D processes to wait for the new follower to join the cluster in elastic scenarios. Unless the new follower does the handshake with existing processes within the timeout, the joining operation is considered failed by the existing PGX.D processes.
-
setPgqlMaximumNumBuffers
public PgxConfigBuilder setPgqlMaximumNumBuffers(int pgqlMaximumNumBuffers)
The max number of large buffers used by the PGQL engine per query. This value limits the memory used per machine for intermediate results during pattern matching topgql_maximum_num_buffers * large_buf_size_kb
.
-
setOnHoldJobTimeoutSecs
public PgxConfigBuilder setOnHoldJobTimeoutSecs(int onHoldJobTimeoutSecs)
Timeout in seconds to keep the job waiting in case it is put on hold due to lack of memory resources. Unless additional followers join the cluster within the timeout or the required memory becomes free, the job will get cancelled. In case multiple followers are necessary to cover the required memory of the job, the timeout will be internally reset whenever a new follower joins.
-
setEngineConnectionTimeoutSecs
public PgxConfigBuilder setEngineConnectionTimeoutSecs(int engineConnectionTimeoutSecs)
Timeout in seconds to setup the initial connections among PGX.D processes. Should be lower thanliveness_check_interval_secs
to avoid false negative liveness detection during system startup. The time needed to establish connections is proportional to the cluster size, so very large PGX.D clusters might need to increase this parameter.
-
setMaximumAttainableMemory
public PgxConfigBuilder setMaximumAttainableMemory(java.lang.String maximumAttainableMemory)
The maximum memory that can ever be made available to this PGX.D cluster. The value is used by PGX.D to identify whether it should elastically expand when faced with memory pressure, or whether it should cancel the command that exceeded this value altogether. This should be configured to be equal to sum of memory of all machines in the machine pool available for cluster growth. The invariant it sets is that there will never be more memory available to the PGX.D cluster than this value. The value can also be changed at runtime. If set to 0 PGX.D assumes elasticity is not enabled. Allowed values can be specified with memory units (e.g., 1m -> 1 megabyte, 1g -> 1 gigabyte, 1t -> 1 terabyte).
-
setLivenessCheckDelaySecs
public PgxConfigBuilder setLivenessCheckDelaySecs(int livenessCheckDelaySecs)
Liveness check interval, i.e., how often to check that the PGX.D server is alive and that it can accept and execute commands. Should be larger thanengine_connection_timeout_secs
to avoid false negative liveness detection during system startup. Should be meaningfully larger than(((system_idle_sleep_max_msecs / system_idle_sleep_increment_msecs) * system_idle_sleep_increment_interval_msecs) + system_idle_delay_before_idling_msecs)
to avoid preventing system idleness.
-
setLivenessCheckTimeoutSecs
public PgxConfigBuilder setLivenessCheckTimeoutSecs(int livenessCheckTimeoutSecs)
Fails liveness check task if it cannot complete the liveness task in the period of time. Should be lower thanliveness_check_interval_secs
. Setting this parameter too low will cause false negative liveness detection.
-
setSystemIdleDelayBeforeIdlingMsecs
public PgxConfigBuilder setSystemIdleDelayBeforeIdlingMsecs(int systemIdleDelayBeforeIdlingMsecs)
When the system is idle for longer than `system_idle_delay_before_idling_msecs`, start placing active background threads to sleep to reduce CPU usage and power consumption. Should be adjusted with respect toliveness_check_interval_secs
, otherwise liveness checks will prevent system to ever go idle.
-
setSystemIdleSleepIncrementMsecs
public PgxConfigBuilder setSystemIdleSleepIncrementMsecs(int systemIdleSleepIncrementMsecs)
Idling will start withsystem_idle_sleep_increment_msecs
sleep duration and will increment this much everysystem_idle_sleep_increment_interval_msecs
to a maximum sleep ofsystem_idle_sleep_max_msecs
. Should be adjusted with respect toliveness_check_interval_secs
, otherwise liveness checks will prevent system to ever go idle.
-
setSystemIdleSleepIncrementIntervalMsecs
public PgxConfigBuilder setSystemIdleSleepIncrementIntervalMsecs(int systemIdleSleepIncrementIntervalMsecs)
Idling will start withsystem_idle_sleep_increment_msecs
sleep duration and will increment this much everysystem_idle_sleep_increment_interval_msecs
to a maximum sleep ofsystem_idle_sleep_max_msecs
. Should be adjusted with respect toliveness_check_interval_secs
, otherwise liveness checks will prevent system to ever go idle.
-
setSystemIdleSleepMaxMsecs
public PgxConfigBuilder setSystemIdleSleepMaxMsecs(int systemIdleSleepMaxMsecs)
Idling will start withsystem_idle_sleep_increment_msecs
sleep duration and will increment this much everysystem_idle_sleep_increment_interval_msecs
to a maximum sleep ofsystem_idle_sleep_max_msecs
. Determines the largest latency to detect activity in case the system is idle. If set too low, system will not save much resources during idleness. Should be adjusted with respect toliveness_check_interval_secs
, otherwise liveness checks will prevent system to ever go idle.
-
setJavaClassPath
public PgxConfigBuilder setJavaClassPath(java.lang.String javaClassPath)
Path to required java libraries.
-
setUseInfiniband
public PgxConfigBuilder setUseInfiniband(boolean useInfiniband)
If set totrue
, an InfiniBand network interface will be used. Must be set tofalse
on systems that do not support InfiniBand.
-
setIfInfiniband
public PgxConfigBuilder setIfInfiniband(java.lang.String ifInfiniband)
InfiniBand network interface, used to initialize the network transport layer when using InfiniBand.
-
setIfEthernet
public PgxConfigBuilder setIfEthernet(java.lang.String ifEthernet)
Ethernet network interface, used to initialize the network transport layer when using Ethernet.
-
setLargeBufCount
public PgxConfigBuilder setLargeBufCount(int largeBufCount)
Number of large buffers populated in the pool.
-
setLargeBufSizeKb
public PgxConfigBuilder setLargeBufSizeKb(int largeBufSizeKb)
Size in kB of the large buffers.
-
setPartitioningShuffleVertices
public PgxConfigBuilder setPartitioningShuffleVertices(boolean partitioningShuffleVertices)
If set totrue
, the vertices of the graph will be randomly shuffled among machines before partitioning. If the data source does not contain enough randomness, this could be beneficial for query and analytics performance on graphs with many properties, labels or data providers. Shuffling can however increase the time necessary to load the graph.
-
setPartitioningStrategy
public PgxConfigBuilder setPartitioningStrategy(java.lang.String partitioningStrategy)
Partitioning strategy of the vertices of the graph. Valid values are 'out' (the vertices will be attributed to each machine so that every machine has the same total number of outgoing edges), 'in' (similar, but for incoming edges) and 'out_in' (same number of outgoing plus incoming edges).
-
setProcId
public PgxConfigBuilder setProcId(int procId)
Internal unique machine identifier in the cluster.
-
setResourceMonitor
public PgxConfigBuilder setResourceMonitor(int resourceMonitor)
Frequency at which to send resource statistics to the debug server, in ms.
-
setDebugServer
public PgxConfigBuilder setDebugServer(java.lang.String debugServer)
Hostname of the debug server.
-
setInstanceName
public PgxConfigBuilder setInstanceName(java.lang.String instanceName)
Instance name sent as label to debug server.
-
setEnableEngineTls
public PgxConfigBuilder setEnableEngineTls(boolean enableEngineTls)
Iftrue
, the engine enables transport layer security (TLS) for connections between engine processes.
-
setEngineTlsKeystore
public PgxConfigBuilder setEngineTlsKeystore(java.lang.String engineTlsKeystore)
Path to the PKCS12 keystore to be used by the engine for securing mutual TLS connections between engine processes. The keystore must contain exactly one pair of private key and public certificate for the engine. If the certificate is not self-signed, the keystore should also contain the intermediate chain of CA certificates used for signing the engine public certificate.
-
setEngineTlsTruststore
public PgxConfigBuilder setEngineTlsTruststore(java.lang.String engineTlsTruststore)
Path to the PEM truststore to be used by the engine for securing mutual TLS connections between engine processes. The truststore must contain top-level CA certificates used for signing the content of the keystore.
-
setEngineTlsCipher
public PgxConfigBuilder setEngineTlsCipher(java.lang.String engineTlsCipher)
Cipher suite name (in OpenSSL syntax) to be used by the engine for securing TLS connections.
-
setEngineTlsVerifyHostname
public PgxConfigBuilder setEngineTlsVerifyHostname(boolean engineTlsVerifyHostname)
Iftrue
, the engine will verify that the hostname contained in the peer's certificate matches the hostname of the peer. Note that this parameter is completely independent fromengine_tls_expected_dn
: using none, only one of them or both of them at the same time is allowed.
-
setEngineTlsExpectedDn
public PgxConfigBuilder setEngineTlsExpectedDn(java.lang.String engineTlsExpectedDn)
If non empty, the engine will verify that the peer's certificate's Subject Distinguished Name matches exactly the given string. The format of this string must match the one given to the `openssl req` command when creating the certificate, without whitespaces between the equal signs. For instance, the following should be used for an organization in France called My Company with example.com as a hostname: /C=FR/O=My Company/CN=example.com. Note that this parameter is completely independent fromengine_tls_verify_hostname
: using none, only one of them or both of them at the same time is allowed.
-
setBackendWrapper
public PgxConfigBuilder setBackendWrapper(java.lang.String backendWrapper)
Only for internal use.
-
setHandshakePort
public PgxConfigBuilder setHandshakePort(int handshakePort)
a TCP port which will be used for handshaking of distributed backend processes.
-
setUseDedicatedPollerThreads
public PgxConfigBuilder setUseDedicatedPollerThreads(boolean useDedicatedPollerThreads)
Iftrue
, the engine will use dedicated RTS poller threads that will always be scheduled, whereas if set to code>false, IO threads will be used and will share RTS slots with other worker threads.
-
setNumSpinLocks
public PgxConfigBuilder setNumSpinLocks(int numSpinLocks)
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)
-
setExplicitSpinLocks
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 totrue
results in better performance.
-
setScheduler
public PgxConfigBuilder setScheduler(SchedulerStrategy scheduler)
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
-
setTaskLength
public PgxConfigBuilder setTaskLength(int taskLength)
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
-
setSmallTaskLength
public PgxConfigBuilder setSmallTaskLength(int smallTaskLength)
task length if total amount of work is small than default task length (only relevant for task-stealing strategies)
-
setMsBfsFrontierTypeStrategy
public PgxConfigBuilder setMsBfsFrontierTypeStrategy(FrontierTypeStrategy msBfsFrontierTypeStrategy)
the type strategy to use for MS-BFS frontiers
-
setBfsThresholdSingleThreaded
public PgxConfigBuilder setBfsThresholdSingleThreaded(int bfsThresholdSingleThreaded)
until what number of BFS traversal level items vertices are visited single-threaded
-
setBfsThresholdReadBased
public PgxConfigBuilder setBfsThresholdReadBased(int bfsThresholdReadBased)
threshold of BFS traversal level items above which to switch to read-based visiting strategy
-
setBfsIterateQueTaskSize
public PgxConfigBuilder setBfsIterateQueTaskSize(int bfsIterateQueTaskSize)
task size for BFS iterate QUE phase
-
setBfsThresholdParentReadBased
public PgxConfigBuilder setBfsThresholdParentReadBased(double bfsThresholdParentReadBased)
threshold of BFS traversal level items above which to switch to parent-read-based visiting strategy
-
setDfsThresholdLarge
public 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.
-
setCniStopRecursionDefault
public 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.
-
setCniSmallDefault
public PgxConfigBuilder setCniSmallDefault(int cniSmallDefault)
default value used in the common neighbor iterator implementations, to indicate below which threshold a subarray is considered small.
-
setCniDiffFactorDefault
public PgxConfigBuilder setCniDiffFactorDefault(int cniDiffFactorDefault)
default diff factor value used in the common neighbor iterator implementations.
-
setLargeArrayThreshold
public PgxConfigBuilder setLargeArrayThreshold(int largeArrayThreshold)
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
)
-
setMaxOffHeapSize
public PgxConfigBuilder setMaxOffHeapSize(int maxOffHeapSize)
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.
-
setMaxOnHeapMemoryUsageRatio
public PgxConfigBuilder setMaxOnHeapMemoryUsageRatio(double maxOnHeapMemoryUsageRatio)
maximum ratio of on-heap memory that PGX is allowed to use, between 0 and 1.
-
setCharacterSet
public PgxConfigBuilder setCharacterSet(java.lang.String characterSet)
standard charset to use throughout PGX, UTF-8 will be used as default. Note: Some formats may not be compatible.
-
setParallelism
public PgxConfigBuilder setParallelism(int parallelism)
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.
-
setRandomGeneratorStrategy
public PgxConfigBuilder setRandomGeneratorStrategy(RandomGeneratorStrategy randomGeneratorStrategy)
method of generating random numbers in pgx
-
setRandomSeed
public PgxConfigBuilder setRandomSeed(long randomSeed)
[relevant for deterministic random number generator only] seed for the deterministic random number generator used in pgx. The default is -24466691093057031
-
setPatternMatchingSupernodeCacheThreshold
public PgxConfigBuilder setPatternMatchingSupernodeCacheThreshold(int patternMatchingSupernodeCacheThreshold)
minimum number of a node's neighbor to be a supernode. This is for pattern matching engine.
-
setUseIndexForReachabilityQueries
public PgxConfigBuilder setUseIndexForReachabilityQueries(ReachabilityIndexCreationMode useIndexForReachabilityQueries)
create index for reachability queries
-
setRevisitThreshold
public PgxConfigBuilder setRevisitThreshold(int revisitThreshold)
maximum number of matched results from a node to be cached
-
setEnterpriseSchedulerFlags
public PgxConfigBuilder setEnterpriseSchedulerFlags(EnterpriseSchedulerFlagsConfig enterpriseSchedulerFlags)
[relevant for enterprise_scheduler] enterprise scheduler specific settings.
-
setEnterpriseSchedulerFlags
public PgxConfigBuilder setEnterpriseSchedulerFlags(java.util.function.Consumer<EnterpriseSchedulerFlagsConfigBuilder> enterpriseSchedulerFlagsBuilderSetup)
Builds a EnterpriseSchedulerFlagsConfig in-place. [relevant for enterprise_scheduler] enterprise scheduler specific settings.- Parameters:
enterpriseSchedulerFlagsBuilderSetup
- a consumer to setup a newly createdEnterpriseSchedulerFlagsConfigBuilder
- See Also:
EnterpriseSchedulerFlagsConfigBuilder
-
setMemoryAllocator
public PgxConfigBuilder setMemoryAllocator(MemoryAllocationStrategy memoryAllocator)
which memory allocator to use
-
setMaxDistinctStringsPerPool
public PgxConfigBuilder setMaxDistinctStringsPerPool(int maxDistinctStringsPerPool)
[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
-
setStringPoolingStrategy
public PgxConfigBuilder setStringPoolingStrategy(StringPoolingStrategy stringPoolingStrategy)
which string pooling strategy to use
-
setUseMemoryMapperForStoringPgb
public PgxConfigBuilder setUseMemoryMapperForStoringPgb(boolean useMemoryMapperForStoringPgb)
if true, use memory mapped files for storing in PGB format if possible; if false always use a stream based implementation
-
setUseMemoryMapperForReadingPgb
public PgxConfigBuilder setUseMemoryMapperForReadingPgb(boolean useMemoryMapperForReadingPgb)
if true, use memory mapped files for reading graphs in PGB format if possible; false always use s stream based implementation
-
setPoolingFactor
public PgxConfigBuilder setPoolingFactor(double poolingFactor)
[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
-
setGraphValidationLevel
public PgxConfigBuilder setGraphValidationLevel(GraphValidationLevel graphValidationLevel)
level of validation performed on newly loaded or created graphs
-
setAllowLazyLoadingForDatabaseGraphs
public PgxConfigBuilder setAllowLazyLoadingForDatabaseGraphs(boolean allowLazyLoadingForDatabaseGraphs)
iftrue
, PGX will automatically load graphs from the database when they are first referenced in graph queries
-
setEnableCsrfTokenChecks
public PgxConfigBuilder setEnableCsrfTokenChecks(boolean enableCsrfTokenChecks)
if true, the PGX webapp will verify CSRF token cookie and request parameters sent by the client exist and match. This is to prevent CSRF attacks.
-
setTmpDir
public PgxConfigBuilder setTmpDir(java.lang.String tmpDir)
Use this path as temporary directory to store compilation artifacts and other temporary data. If set to <system-tmp-dir>, use standard tmp directory of underlying system (/tmp
on Linux)
-
setAllowedRemoteLoadingLocations
public PgxConfigBuilder setAllowedRemoteLoadingLocations(java.lang.String... allowedRemoteLoadingLocations)
(This option may reduce security, use it only if you know what you are doing!) Allow loading graphs into the PGX engine from remote locations. If empty, as by default, no remote location is allowed. Any of the following locations can be listed: "https", "ftps", "hdfs" (deprecated) (all without colon ":"). Alternatively, "*" can be used to enable all locations at once; no other value is allowed with "*". Note that pre-loaded graphs are loaded from any location, regardless of the value of this setting- Parameters:
allowedRemoteLoadingLocations
- use "https", "ftps", "hdfs" (deprecated) for specific locations, or "*" to allow loading from all remote locations.
-
setInitPgqlOnStartup
public PgxConfigBuilder setInitPgqlOnStartup(boolean initPgqlOnStartup)
iftrue
PGQL is directly initialized on start-up of PGX. Otherwise, it is initialized during the first use of PGQL.
-
setMaxHttpClientRequestSize
public PgxConfigBuilder setMaxHttpClientRequestSize(long maxHttpClientRequestSize)
maximum size in bytes of any http request sent to to the PGX server over the REST API. Setting it to -1 allows requests of any size.
-
setPgxRealm
public PgxConfigBuilder setPgxRealm(RealmConfig pgxRealm)
configuration parameters for the realm
-
setPgxRealm
public PgxConfigBuilder setPgxRealm(java.util.function.Consumer<RealmConfigBuilder> pgxRealmBuilderSetup)
Builds a RealmConfig in-place. configuration parameters for the realm- Parameters:
pgxRealmBuilderSetup
- a consumer to setup a newly createdRealmConfigBuilder
- See Also:
RealmConfigBuilder
-
setFileLocations
public PgxConfigBuilder setFileLocations(java.lang.Object... fileLocations)
the file-locations that can be used in the authorization-config- Parameters:
fileLocations
- definition of a file-location
-
setAuthorizationSessionCreateAllowAll
public PgxConfigBuilder setAuthorizationSessionCreateAllowAll(boolean authorizationSessionCreateAllowAll)
iftrue
allow all users to create a PGX session regardless of permissions granted to them
-
setAuthorization
public PgxConfigBuilder setAuthorization(java.lang.Object... authorization)
mapping of users and roles to resources and permissions for authorization- Parameters:
authorization
- mapping resource to permissions
-
setEnableMemoryLimitsChecks
public PgxConfigBuilder setEnableMemoryLimitsChecks(boolean enableMemoryLimitsChecks)
if true, PGX will enforce the configured memory limits
-
setDataMemoryLimits
public PgxConfigBuilder setDataMemoryLimits(DataMemoryLimitsConfig dataMemoryLimits)
memory limits configuration parameters
-
setDataMemoryLimits
public PgxConfigBuilder setDataMemoryLimits(java.util.function.Consumer<DataMemoryLimitsConfigBuilder> dataMemoryLimitsBuilderSetup)
Builds a DataMemoryLimitsConfig in-place. memory limits configuration parameters- Parameters:
dataMemoryLimitsBuilderSetup
- a consumer to setup a newly createdDataMemoryLimitsConfigBuilder
- See Also:
DataMemoryLimitsConfigBuilder
-
setEnableShutdownCleanupHook
public PgxConfigBuilder setEnableShutdownCleanupHook(boolean enableShutdownCleanupHook)
iftrue
PGX will add a JVM shutdown hook that will automatically shutdown PGX at JVM shutdown. Notice: Having the shutdown hook deactivated and not shutting down PGX explicitly may result in pollution of your temp directory.
-
setSessionIdleTimeoutSecs
public PgxConfigBuilder setSessionIdleTimeoutSecs(int sessionIdleTimeoutSecs)
timeout of idling sessions in seconds. Set to zero for infinity/no timeout
-
setSessionTaskTimeoutSecs
public PgxConfigBuilder setSessionTaskTimeoutSecs(int sessionTaskTimeoutSecs)
timeout to interrupt long-running tasks submitted by sessions (algorithms, I/O tasks) in seconds. Set to zero for infinity/no timeout
-
setAllowIdleTimeoutOverwrite
public PgxConfigBuilder setAllowIdleTimeoutOverwrite(boolean allowIdleTimeoutOverwrite)
iftrue
, sessions can overwrite default idle timeout
-
setAllowTaskTimeoutOverwrite
public PgxConfigBuilder setAllowTaskTimeoutOverwrite(boolean allowTaskTimeoutOverwrite)
iftrue
, sessions can overwrite default task timeout
-
setMaxActiveSessions
public PgxConfigBuilder setMaxActiveSessions(int maxActiveSessions)
the maximum number of sessions allowed to be active at a time
-
setMaxQueueSizePerSession
public PgxConfigBuilder setMaxQueueSizePerSession(int maxQueueSizePerSession)
the maximum number of pending tasks allowed to be in the queue, per session. If a session reaches the maximum, new incoming requests of that sesssion get rejected. A negative value means infinity / unlimited.
-
setIntervalToPollMax
public PgxConfigBuilder setIntervalToPollMax(int intervalToPollMax)
Exponential backoff upper bound (in ms) to which -once reached, the job status polling interval is fixed
-
setAdminRequestCacheTimeout
public PgxConfigBuilder setAdminRequestCacheTimeout(int adminRequestCacheTimeout)
after how many seconds admin request results get removed from the cache. Requests which are not done or not yet consumed are excluded from this timeout. Note: this is only relevant if PGX is deployed as a webapp.
-
setLaunchWatchdogs
public PgxConfigBuilder setLaunchWatchdogs(boolean launchWatchdogs)
(for debugging) iftrue
, additional watch-dog threads will be launched which monitor and log engine health stats
-
setStrictMode
public PgxConfigBuilder setStrictMode(boolean strictMode)
iftrue
, exceptions are thrown and logged withERROR
level whenever engine encounters configuration problems, such as invalid keys, mismatches and other potential errors. Iffalse
, engine logs problems withERROR
/WARN
level (depending on severity) and makes best guesses / uses sensible defaults instead of throwing exceptions.
-
setPreloadGraphs
public PgxConfigBuilder setPreloadGraphs(java.lang.Object... preloadGraphs)
list of graph configs to be registered at start-up. Each item includes path to a graph config, the name of the graph and whether it should be published.- Parameters:
preloadGraphs
- configuration parameters for the preloaded graph
-
setMemoryCleanupInterval
public PgxConfigBuilder setMemoryCleanupInterval(int memoryCleanupInterval)
memory cleanup tick in seconds
-
setReleaseMemoryThreshold
public PgxConfigBuilder setReleaseMemoryThreshold(double releaseMemoryThreshold)
threshold percentage of used memory after which the engine starts freeing un-used graphs. Examples: A value of0.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 of1.0
means graphs get never freed. Engine will throwOutOfMemoryError
s as soon as a graph is needed which doesn't fit in memory anymore. A value of0.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.
-
setReadinessMemoryUsageRatio
public PgxConfigBuilder setReadinessMemoryUsageRatio(double readinessMemoryUsageRatio)
memory limit ratio that should be considered to detect if PGX server is ready, used by isReady API, default value is 1.0
-
setRunningMemoryUsageRatio
public PgxConfigBuilder setRunningMemoryUsageRatio(double runningMemoryUsageRatio)
memory limit ratio that should be considered to detect if PGX server is running, used by isRunning API default value is 1.0
-
setPgxServerBaseUrl
public PgxConfigBuilder setPgxServerBaseUrl(java.lang.String pgxServerBaseUrl)
should be used when deploying pgx server behind a load balancer to make clients before 21.3 backward compatible, the value should be set to the load balancer address
-
setPermissionChecksInterval
public PgxConfigBuilder setPermissionChecksInterval(int permissionChecksInterval)
interval in seconds to perform permission checks on source graphs
-
setGraphSharingOption
public PgxConfigBuilder setGraphSharingOption(GraphSharingOption graphSharingOption)
control if a graph can be published and shared with other users
-
setEnableSnapshotPropertiesPublishStatePropagation
public PgxConfigBuilder setEnableSnapshotPropertiesPublishStatePropagation(boolean enableSnapshotPropertiesPublishStatePropagation)
iftrue
, properties in a new snapshot will inherit the publishing state of properties in the parent snapshot
-
setEnableMlAccelerators
public PgxConfigBuilder setEnableMlAccelerators(boolean enableMlAccelerators)
iftrue
, will utilize available ML accelerators to run machine learning trainings faster.
-
setFileLocations
public PgxConfigBuilder setFileLocations(java.util.List<?> fileLocations)
the file-locations that can be used in the authorization-config- Parameters:
fileLocations
- definition of a file-location
-
setAuthorization
public PgxConfigBuilder setAuthorization(java.util.List<?> authorization)
mapping of users and roles to resources and permissions for authorization- Parameters:
authorization
- mapping resource to permissions
-
setPreloadGraphs
public PgxConfigBuilder setPreloadGraphs(java.util.List<?> preloadGraphs)
list of graph configs to be registered at start-up. Each item includes path to a graph config, the name of the graph and whether it should be published.- Parameters:
preloadGraphs
- configuration parameters for the preloaded graph
-
-