Skip to content

Commit 56ac29d

Browse files
committed
GH-4952 - Add config-via-template example to federation documentation
1 parent f72c49a commit 56ac29d

1 file changed

Lines changed: 32 additions & 1 deletion

File tree

site/content/documentation/programming/federation.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,9 +299,10 @@ FedX provides various means for configuration. Configuration settings can be def
299299
|Property | Description |
300300
|---------|-------------|
301301
|prefixDeclarations | Path to prefix declarations file, see [PREFIX Declarations](#prefix-declarations) |
302-
|cacheLocation | Location where the memory cache gets persisted at shutdown, default _cache.db_ |
302+
|sourceSelectionCacheSpec | Cache specification for the `SourceSelectionMemoryCache`, default _maximumSize=1000,expireAfterWrite=6h_ |
303303
|joinWorkerThreads | The number of join worker threads for parallelization, default _20_ |
304304
|unionWorkerThreads | The number of union worker threads for parallelization, default _20_ |
305+
|leftJoinWorkerThreads | The number of left join worker threads for parallelization, default _10_ |
305306
|boundJoinBlockSize | Block size for bound joins, default _15_ |
306307
|enforceMaxQueryTime | Max query time in seconds, 0 to disable, default _30_ |
307308
|enableServiceAsBoundJoin | Flag for evaluating a SERVICE expression (contacting non-federation members) using vectored evaluation, default _true_. For today's endpoints it is more efficient to disable vectored evaluation of SERVICE |
@@ -310,6 +311,36 @@ FedX provides various means for configuration. Configuration settings can be def
310311
|logQueryPlan | Flag to enable/disable query plan logging via Java class _QueryPlanLog_, default _false_ |
311312
|logQueries | Flag to enable/disable query logging via _QueryLog_, default _false_. The _QueryLog_ facility allows to log all queries to a file |
312313

314+
#### Overriding via configuration template
315+
316+
The aforementioned properties can also be set using a configuration template, via the `fedx:config` property, e.g.:
317+
318+
```turtle
319+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
320+
@prefix rep: <http://www.openrdf.org/config/repository#>.
321+
@prefix config: <tag:rdf4j.org,2023:config/>.
322+
@prefix fedx: <http://rdf4j.org/config/federation#>.
323+
324+
[] a rep:Repository ;
325+
rep:repositoryImpl [
326+
rep:repositoryType "fedx:FedXRepository" ;
327+
fedx:member [
328+
fedx:store "ResolvableRepository" ;
329+
fedx:repositoryName "endpoint1"
330+
],
331+
[
332+
fedx:store "ResolvableRepository" ;
333+
fedx:repositoryName "endpoint2"
334+
]
335+
fedx:config [
336+
fedx:sourceSelectionCacheSpec "maximumSize=0" ;
337+
fedx:enforceMaxQueryTime 30 ;
338+
]
339+
];
340+
rep:repositoryID "fedx" ;
341+
rdfs:label "FedX Federation" .
342+
```
343+
313344
### Query timeouts
314345

315346
FedX supports to define the maximum execution time for a query. This can be set on query level `Query#setMaxExecutionTime`or globally using the FedX config setting _enforceMaxQueryTime_.

0 commit comments

Comments
 (0)