You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 6, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: docs/administration-guide/gaffer-stores/federated-store.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,8 @@
1
1
# Federated Store
2
2
3
+
!!! warning
4
+
The current version of the federated store and how it currently operates is deprecated, it will be replaced by the current [simple federated store](./simple-federated/configuration.md#) in v2.4.0.
5
+
3
6
The Federated Store is a Gaffer store which forwards operations to a collection of sub-graphs and returns a single response as though a single graph were queried.
Copy file name to clipboardExpand all lines: docs/administration-guide/gaffer-stores/simple-federated/additional-info.md
+59-21Lines changed: 59 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,21 +16,23 @@ operation. These can be used to do things like pick graphs or control the
16
16
merging, a full list of the available options are outlined in the following
17
17
table:
18
18
19
-
| Option | Description |
20
-
| --- | --- |
21
-
|`federated.graphIds`| List of graph IDs to submit the operation to, formatted as a comma separated string e.g. `"graph1,graph2"`|
22
-
|`federated.excludedGraphIds`| List of graph IDs to exclude from the query. If this is set any graph IDs on a `federated.graphIds` option are ignored and instead, all graphs are executed on except the ones specified e.g. `"graph1,graph2"`|
23
-
|`federated.aggregateElements`| Should the element aggregator be used when merging element results. |
24
-
|`federated.forwardChain`| Should the whole operation chain be sent to the sub graph or not. If set to `false` each operation will inside the chain will be sent separately, so merging from each graph will happen after each operation instead of at the end of the chain. This will be inherently slower if turned off so is `true` by default. |
19
+
| Option | Default | Description |
20
+
| --- | --- | --- |
21
+
|`federated.graphIds`| None | List of graph IDs to submit the operation to, formatted as a comma separated string e.g. `"graph1,graph2"`|
22
+
|`federated.excludedGraphIds`| None | List of graph IDs to exclude from the query. If this is set any graph IDs on a `federated.graphIds` option are ignored and instead, all graphs are executed on except the ones specified e.g. `"graph1,graph2"`|
23
+
|`federated.aggregateElements`| See store properties | Should the element aggregator be used when merging element results. |
24
+
| `federated.useDefaultGraphIds` | None | Explicitly specifies that the default Graph IDs from the store.properties file should be used. By default if no graph ID options are specified the default graph IDs will still be used where applicable. However, specifying this on an operation chain means the whole chain will be sent to the sub graph, and so merging from each graph will happen at the end of the chain instead of after each operation, hopefully increasing performance.
25
+
|`federated.separateResults`|`false`| A boolean option to specify if the results from each graph should be kept separate. If set, this will return a map where each key value is the graph ID and its respective result. |
26
+
|`federated.skipGraphOnFail`|`false`| A boolean option to specify if the operation should continue even if it fails on one or more of the sub graphs. |
25
27
26
28
Along with the options above, all merge classes can be overridden per query
27
29
using the same property key as you would via the store properties. Please see
28
30
the table [here](./configuration.md#store-properties) for more information.
29
31
30
32
If you wish to submit different operations to different graphs in the same query
31
-
you can do this using the `federate.forwardChain` option. By setting this to
32
-
false on the outer operation chain the options on the operations inside it will
33
-
be honoured. An example of this can be seen below:
33
+
you can do this by omitting any graph ID options on the outer operation chain.
34
+
You can then specify the graph IDs on the individual operations in the chain
35
+
instead. An example of this can be seen below:
34
36
35
37
!!! note
36
38
This will turn off any merging of the results at the end of the chain, the
@@ -44,9 +46,6 @@ be honoured. An example of this can be seen below:
44
46
```json
45
47
{
46
48
"class": "OperationChain",
47
-
"options": {
48
-
"federated.forwardChain": false
49
-
},
50
49
"operations": [
51
50
{
52
51
"class": "GetElements",
@@ -77,21 +76,60 @@ graphs that have been added to the store. This means all features available to
77
76
normal caches are also available to the graph storage, allowing the sharing and
78
77
persisting of graphs between instances.
79
78
80
-
The federated store will use the default cache service to store graphs in. It
81
-
will also add a standard suffix meaning if you want to share graphs you will
82
-
need to set this to something other than the graph ID (see [here](../store-guide.md#cache-service)).
79
+
The federated store will use the default cache service to store graphs in. It will
80
+
also store graphs in a cache named `"federatedGraphCache_"` followed by the graph
81
+
ID of the federated store. You may wish to change this to have common storage
82
+
of graphs between stores using the `gaffer.store.federated.graphCache.name`
83
+
store property.
84
+
85
+
### Named Operations and Views
86
+
87
+
Named Operations and Views can be added to different caches if specified. By
88
+
passing graph IDs in the add operation (e.g. `AddNamedOperation`) you can make
89
+
the Named Operation or View specific to the graph(s) you specified. However,
90
+
this will mean if you try to run it on another graph it will not be available.
91
+
92
+
If you do not specify any graph IDs in the add operation, any Named
93
+
Operations/Views will instead be added to the federated store's cache. By doing
94
+
this anything Named will be resolved before forwarding to sub graphs meaning in
95
+
essence it is available to all sub graphs.
96
+
97
+
!!! example ""
98
+
=== "Add to a sub graph"
99
+
```java
100
+
final AddNamedOperation addNamedOp = new AddNamedOperation.Builder()
Copy file name to clipboardExpand all lines: docs/administration-guide/gaffer-stores/simple-federated/configuration.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,6 +43,7 @@ specific to a federated store and their usage.
43
43
|`gaffer.store.federated.default.graphIds`|`""`| The list of default graph IDs for if a user does not specify what graph(s) to run their query on. Takes a comma separated list of graph IDs e.g. `"graphID1,graphID2"`|
44
44
|`gaffer.store.federated.allowPublicGraphs`|`true`| Are graphs with public access allowed to be added to this store. |
45
45
|`gaffer.store.federated.default.aggregateElements`|`false`| Should queries aggregate returned Gaffer elements together using the binary operator for merging elements. False by default as it can be slower meaning results are just chained into one big list. |
46
+
|`gaffer.store.federated.graphCache.name`|`"federatedGraphCache_<graphId>"`| The name of the cache that the federated store will store its graphs in. This allows sharing of graphs between different federated stores if the cache name is the same (and same default implementation). |
46
47
|`gaffer.store.federated.merge.number.class`|`uk.gov.gchq.koryphe.impl.binaryoperator.Sum`| Default binary operator for merging [`Number`](https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html) results (e.g. from a `Count` operation) from multiple graphs. |
47
48
|`gaffer.store.federated.merge.string.class`|`uk.gov.gchq.koryphe.impl.binaryoperator.StringConcat`| Default binary operator for merging [`String`](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html) results from multiple graphs. |
48
49
|`gaffer.store.federated.merge.boolean.class`|`uk.gov.gchq.koryphe.impl.binaryoperator.And`| Default binary operator for merging [`Boolean`](https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html) results from multiple graphs. |
interface, you can then specify it using the property key for the data type you
65
66
wish to use it for.
66
67
68
+
!!! note
69
+
Please note you currently can't chose a merge operator for operations that
70
+
return an `Iterable` type, they will always just be chained together (an
71
+
iterable of `Element`s is an obvious exception, please see below).
72
+
67
73
### The Default Element Merge Operator
68
74
69
75
The default operator used to merge Gaffer elements is unique compared to the
@@ -95,6 +101,12 @@ to the individual graph results, this means two results separately will
95
101
satisfy the `View` but once aggregated they may not.
96
102
- If you wish to write or use your own operator for merging elements the class
97
103
must extend the [`ElementAggregateOperator`](https://github.com/gchq/Gaffer/blob/develop/store-implementation/simple-federated-store/src/main/java/uk/gov/gchq/gaffer/federated/simple/merge/operator/ElementAggregateOperator.java).
104
+
- If you have chosen in the schema to use a time sensitive aggregation function
0 commit comments