public static final class GraphSONReader.Builder extends Object implements GraphReader.ReaderBuilder<GraphSONReader>
Modifier and Type | Method and Description |
---|---|
GraphSONReader.Builder |
batchSize(long batchSize)
Number of mutations to perform before a commit is executed when using
GraphSONReader.readGraph(InputStream, Graph) . |
GraphSONReader |
create()
Creates the
GraphReader implementation given options provided to the GraphReader.ReaderBuilder
implementation. |
GraphSONReader.Builder |
mapper(Mapper<ObjectMapper> mapper)
Override all of the
GraphSONMapper builder
options with this mapper. |
GraphSONReader.Builder |
unwrapAdjacencyList(boolean unwrapAdjacencyList)
If the adjacency list is wrapped in a JSON object, as is done when writing a graph with
GraphSONWriter.Builder.wrapAdjacencyList set to true , this setting needs to be set to
true to properly read it. |
public GraphSONReader.Builder batchSize(long batchSize)
GraphSONReader.readGraph(InputStream, Graph)
.public GraphSONReader.Builder mapper(Mapper<ObjectMapper> mapper)
GraphSONMapper
builder
options with this mapper. If this value is set to something other than null then that value will be
used to construct the writer.public GraphSONReader.Builder unwrapAdjacencyList(boolean unwrapAdjacencyList)
GraphSONWriter.Builder.wrapAdjacencyList
set to true
, this setting needs to be set to
true
to properly read it. By default, this value is false
and the adjacency list is
simply read as line delimited vertices.
By setting this value to true
, the generated JSON is no longer "splittable" by line and thus not
suitable for OLAP processing. Furthermore, reading this format of the JSON with
GraphSONReader.readGraph(InputStream, Graph)
or
GraphSONReader.readVertices(InputStream, Function, Function, Direction)
requires that the
entire JSON object be read into memory, so it is best saved for "small" graphs.public GraphSONReader create()
GraphReader.ReaderBuilder
GraphReader
implementation given options provided to the GraphReader.ReaderBuilder
implementation.create
in interface GraphReader.ReaderBuilder<GraphSONReader>
Copyright © 2013–2020 Apache Software Foundation. All rights reserved.