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
The node value consists of a single value named `foobar` which is of type `long`.
117
+
A node value can be of any GDS-supported type, i.e. `long`, `double`, `long[]`, `double[]` and `float[]`.
118
+
119
+
We can add an arbitrary number of values to the schema:
120
+
121
+
```
122
+
PregelSchema schema() {
123
+
return PregelSchema.Builder()
124
+
.add("foobar", ValueType.LONG)
125
+
.add("baz", ValueType.DOUBLE)
126
+
.build();
127
+
}
128
+
```
129
+
130
+
Note, that each property consumes additional memory when executing the algorithm, which typically amounts to the number of nodes multiplied by the size of a single value (e.g. 64 Bit for a `long` or `double`).
131
+
132
+
The `add` method on the builder takes a third argument: `Visibility`.
133
+
There are two possible values: `PUBLIC` (default) and `PRIVATE`.
134
+
The visibility is considered during <<algorithms-pregel-api-procedure, procedure code generation>> to indicate if the value is part of the Pregel result or not.
135
+
Any value that has visibility `PUBLIC` will be part of the computation result and included in the result of the procedure, e.g., streamed to the caller, mutated to the in-memory graph or written to the database.
136
+
137
+
The following shows a schema where one value is used as result and a second value is only used during computation:
0 commit comments