[
https://issues.apache.org/jira/browse/TINKERPOP-2417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17193539#comment-17193539
]
Oleksandr Porunov commented on TINKERPOP-2417:
----------------------------------------------
[~spmallette] graph.io(Builder) allows to create a custom reader / writer which
can be supplied with InputStream or OutputStream.
I.e. something like:
graph.io(IoCore.graphson()).reader().create().readGraph(graphSonInputStream),
graph)
The deprecation says to use GraphTraversalSource.io(String) which isn't the
same as it expects filesystem path which sometimes might be very inconvenient.
Examples:
* The user receives InputStream of GraphSON but the user don't have write
access to the underlying file system to write GraphSON file temporary and then
remove it after it was ingested to the graph.
* Server disks don't have enough capacity to write a temporary file for
ingestion.
* Server disks are too slow thus limiting ingestion performance.
Would it be better to undeprecate graph.io(Builder) until there is a solution
which replaces it? Is it planned to remove graph.io(Builder) soon?
> Add possibility to supply io step with InputStream instead of a file path
> -------------------------------------------------------------------------
>
> Key: TINKERPOP-2417
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2417
> Project: TinkerPop
> Issue Type: Improvement
> Components: io
> Reporter: Oleksandr Porunov
> Priority: Major
>
> Currently it is possible to supply *io* step with file path to read a file
> from file system.
> It would be very convenient if we would be able to read files from input
> stream instead of file path.
> For example, it could look something like:
> *g.io(graphSonInputStream).with(IO.reader, IO.graphson).read().iterate()*
> Of course it wouldn't work as expected if we would use *write* instead of
> read here because we won't be able to write to the input stream. Thus, we can
> fail fast if the user supplied an input stream into the *io* step but tried
> to use *write*.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)