Package oracle.pgx.config
Class GraphLoadingConfig
- java.lang.Object
-
- oracle.pgx.config.AbstractConfig
-
- oracle.pgx.config.GraphLoadingConfig
-
@Generated("config_generator.py") public class GraphLoadingConfig extends AbstractConfig
PGX Engine Graph Loading Config
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GraphLoadingConfig.Field
Fields of PGX Engine Graph Loading Config
-
Field Summary
-
Fields inherited from class oracle.pgx.config.AbstractConfig
ENV_SEPARATOR, ENV_VARIABLE_PREFIX, SYSTEM_PROPERTY_PREFIX
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
static GraphLoadingConfig.Field[]
getConfigFields()
java.lang.Integer
getFetchIntervalSec()
(only relevant if the format supports delta updates) the interval in which the graph source is queried for changesjava.util.Map<java.lang.String,java.lang.Object>
getLeftoverValues()
Gets the values that do not belong to any field.java.lang.Integer
getLoadingProgressReportingFrequency()
indicates at what frequency the loading of vertices and edges should be logged.java.lang.String
getPropertyValueDelimiter()
ifnull
read the whole string value as label.SnapshotsSource
getSnapshotsSource()
source of graph snapshots: ifREFRESH
, new snapshots can be created only by reading the graph again via this config (e.g., with `readGraphWithProperties`), or equivalently via auto-refresh if enabled; ifCHANGE_SET
, new snapshots can be added only via changesets by any session.java.lang.Integer
getUpdateIntervalSec()
the interval in which a new snapshot is created, either by reloading the entire graph or if the format supports delta-updates, out of the cached changes.java.lang.Integer
getUpdateThreshold()
(only relevant if the format supports delta updates) the maximum number of changes that are cached before a new snapshot is created.java.lang.String
getUseVertexPropertyValueAsLabel()
load the given property as vertex label.java.util.Map<GraphLoadingConfig.Field,java.lang.Object>
getValues()
Gets the parsed values.java.util.Map<GraphLoadingConfig.Field,java.lang.Object>
getValuesWithoutDefaults()
Gets the values without defaults.boolean
hasDefaultValue(GraphLoadingConfig.Field field)
Checks for default value.java.lang.Boolean
isAutoRefresh()
iftrue
the graph gets refreshed automatically in periodic intervals.java.lang.Boolean
isCreateEdgeIdIndex()
iftrue
, an index is prepared during loading which enables retrieval of edge pathsjava.lang.Boolean
isCreateEdgeIdMapping()
iftrue
, a mapping is prepared during loading which enables edge key arguments and filters containing edge keysjava.lang.Boolean
isCreateLabelHistogram()
whether a label histogram needs to be generated when the graph is loadedjava.lang.Boolean
isCreateVertexIdIndex()
iftrue
, an index is prepared during loading which enables retrieval of vertex pathsjava.lang.Boolean
isCreateVertexIdMapping()
iftrue
, a mapping is prepared during loading which enables vertex arguments and vertex filtersboolean
isEmpty()
Checks if it's empty.java.lang.Boolean
isPartitionDiscardDefaultValues()
[relevant for partition_while_loading]when partition_while_loading is specified, if set toby_label
, the properties that contain only default values are removed from vertex and edge providers.java.lang.Boolean
isStrictMode()
iftrue
, exceptions are thrown and logged withERROR
level whenever loader encounters problems with input file, such as invalid format, repeated keys, missing fields, mismatches and other potential errors.java.lang.Boolean
isUpdatePropertiesInPlace()
iftrue
, non-structural updates get applied to the graph in-place, else non-structural updates also cause new snapshots of the graph to be created.java.lang.Boolean
loadEdgeLabel()
whether or not to load the edge label if it is availablejava.lang.Boolean
loadVertexLabels()
whether or not to load the vertex label if it is availablestatic GraphLoadingConfig
parse(java.io.InputStream is, boolean strict, java.lang.String parentPath)
Parses an input stream.static GraphLoadingConfig
parse(java.util.Map<java.lang.String,java.lang.Object> raw, boolean strict, java.lang.String parentPath)
Parses a raw key/value mapping.static GraphLoadingConfig
parse(java.util.Properties props, boolean strict)
Parses a properties file.java.lang.Boolean
skipEdges()
whether or not to load the edgesjava.lang.Boolean
skipVertices()
whether or not to load the verticesjava.lang.String
toString()
java.lang.String
toString(boolean hideSensitiveData)
-
Methods inherited from class oracle.pgx.config.AbstractConfig
getDefault, getValueFromEnvironment, getValueFromEnvironment, parseString, setSerializable
-
-
-
-
Method Detail
-
parse
public static GraphLoadingConfig parse(java.io.InputStream is, boolean strict, java.lang.String parentPath) throws java.io.IOException
Parses an input stream.- Parameters:
is
- the input streamstrict
- if true, parses in strict modeparentPath
- if not null, resolves relative paths against this parentPath- Returns:
- the parsed graph config
- Throws:
java.io.IOException
- Signals that an I/O exception has occurred.
-
parse
public static GraphLoadingConfig parse(java.util.Map<java.lang.String,java.lang.Object> raw, boolean strict, java.lang.String parentPath)
Parses a raw key/value mapping.- Parameters:
raw
- the raw key/value mapping to parsestrict
- if true, parses in strict modeparentPath
- if not null, resolves relative paths against this parentPath- Returns:
- the parsed graph config
-
parse
public static GraphLoadingConfig parse(java.util.Properties props, boolean strict)
Parses a properties file.- Parameters:
props
- the properties to parsestrict
- if true, parses in strict mode- Returns:
- the parsed graph config
-
getConfigFields
public static GraphLoadingConfig.Field[] getConfigFields()
-
getValues
public java.util.Map<GraphLoadingConfig.Field,java.lang.Object> getValues()
Gets the parsed values.- Specified by:
getValues
in classAbstractConfig
- Returns:
- the parsed values
-
isEmpty
public boolean isEmpty()
Checks if it's empty.- Returns:
- true, if the Map 'values' is empty.
-
hasDefaultValue
public boolean hasDefaultValue(GraphLoadingConfig.Field field)
Checks for default value.- Parameters:
field
- the field- Returns:
- true, if value for given field is the default value
-
getValuesWithoutDefaults
public java.util.Map<GraphLoadingConfig.Field,java.lang.Object> getValuesWithoutDefaults()
Gets the values without defaults.- Returns:
- the values without defaults
-
getLeftoverValues
public java.util.Map<java.lang.String,java.lang.Object> getLeftoverValues()
Gets the values that do not belong to any field.- Returns:
- the values that do not belong to any field
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
toString
public java.lang.String toString(boolean hideSensitiveData)
-
isCreateVertexIdIndex
public java.lang.Boolean isCreateVertexIdIndex()
iftrue
, an index is prepared during loading which enables retrieval of vertex paths
-
isCreateVertexIdMapping
public java.lang.Boolean isCreateVertexIdMapping()
iftrue
, a mapping is prepared during loading which enables vertex arguments and vertex filters
-
isCreateEdgeIdIndex
public java.lang.Boolean isCreateEdgeIdIndex()
iftrue
, an index is prepared during loading which enables retrieval of edge paths
-
isCreateEdgeIdMapping
public java.lang.Boolean isCreateEdgeIdMapping()
iftrue
, a mapping is prepared during loading which enables edge key arguments and filters containing edge keys
-
isAutoRefresh
public java.lang.Boolean isAutoRefresh()
iftrue
the graph gets refreshed automatically in periodic intervals. Note: Depending on the global settings, only fixed (pre-loaded) graphs can be auto-refreshed
-
getSnapshotsSource
public SnapshotsSource getSnapshotsSource()
source of graph snapshots: ifREFRESH
, new snapshots can be created only by reading the graph again via this config (e.g., with `readGraphWithProperties`), or equivalently via auto-refresh if enabled; ifCHANGE_SET
, new snapshots can be added only via changesets by any session. Note: CHANGE_SET is not compatible with auto-refresh
-
getFetchIntervalSec
public java.lang.Integer getFetchIntervalSec()
(only relevant if the format supports delta updates) the interval in which the graph source is queried for changes
-
getUpdateIntervalSec
public java.lang.Integer getUpdateIntervalSec()
the interval in 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) Set to -1 if you want to disable periodic snapshot creation. Note: one ofupdate_interval_sec
andupdate_threshold
must be set
-
getUpdateThreshold
public java.lang.Integer getUpdateThreshold()
(only relevant if the format supports delta updates) the maximum number of changes that are cached before a new snapshot is created. Set to -1 if you want to disable the threshold for snapshot creation. Note: one ofupdate_interval_sec
andupdate_threshold
must be set
-
isStrictMode
public java.lang.Boolean isStrictMode()
iftrue
, exceptions are thrown and logged withERROR
level whenever loader encounters problems with input file, such as invalid format, repeated keys, missing fields, mismatches and other potential errors. Iffalse
, loader may use less memory during loading phase, but behave unexpectedly with erratic input files
-
loadVertexLabels
public java.lang.Boolean loadVertexLabels()
whether or not to load the vertex label if it is available
-
loadEdgeLabel
public java.lang.Boolean loadEdgeLabel()
whether or not to load the edge label if it is available
-
getUseVertexPropertyValueAsLabel
public java.lang.String getUseVertexPropertyValueAsLabel()
load the given property as vertex label. Currently only available for loading from PG
-
getPropertyValueDelimiter
public java.lang.String getPropertyValueDelimiter()
ifnull
read the whole string value as label. Otherwise, split the string using the specified delimiter and use all values as vertex labels
-
skipEdges
public java.lang.Boolean skipEdges()
whether or not to load the edges
-
skipVertices
public java.lang.Boolean skipVertices()
whether or not to load the vertices
-
isCreateLabelHistogram
public java.lang.Boolean isCreateLabelHistogram()
whether a label histogram needs to be generated when the graph is loaded
-
isUpdatePropertiesInPlace
public java.lang.Boolean isUpdatePropertiesInPlace()
iftrue
, non-structural updates get applied to the graph in-place, else non-structural updates also cause new snapshots of the graph to be created.
-
isPartitionDiscardDefaultValues
public java.lang.Boolean isPartitionDiscardDefaultValues()
[relevant for partition_while_loading]when partition_while_loading is specified, if set toby_label
, the properties that contain only default values are removed from vertex and edge providers.
-
getLoadingProgressReportingFrequency
public java.lang.Integer getLoadingProgressReportingFrequency()
indicates at what frequency the loading of vertices and edges should be logged. The frequency will be rounded up to the next multiple of 10,000.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-