[ 
https://issues.apache.org/jira/browse/TINKERPOP-2864?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17683836#comment-17683836
 ] 

ASF GitHub Bot commented on TINKERPOP-2864:
-------------------------------------------

spmallette commented on PR #1961:
URL: https://github.com/apache/tinkerpop/pull/1961#issuecomment-1415739057

   GraphBinary is meant to return types that can be returned by the Gremlin 
language, not any random script. Random scripts should convert their results to 
one of the primitive types GraphBinary exposes. So your `toString()` of 
`ComputerResult` is at least one approach you could take there. It's tempting 
but I don't think we should get in the business of doing a quiet `toString()` 
by default. I feel like the user should know if a serializer isn't present 
directly by exception, then they alter their request accordingly. 




> GraphBinaryMessageSerializer cannot serialize DefaultComputerResult
> -------------------------------------------------------------------
>
>                 Key: TINKERPOP-2864
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2864
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: driver
>    Affects Versions: 3.5.5
>            Reporter: Redriver
>            Priority: Major
>
> When I send the following request to gremlin-server, I got an error 
> "{color:#1d1c1d}Serializer for type 
> org.apache.tinkerpop.gremlin.process.computer.util.DefaultComputerResult not 
> found{color}".
> {code:java}
> graph = GraphFactory.open('conf/fdb-psave-export.properties')
> graph.compute(SparkGraphComputer).program(CloneVertexProgram.build().create()).submit().get()
> {code}
> After investigation, I found GraphBinaryMessageSerializer cannot serialize 
> DefaultComputerResult. The quick workaround is change the gremline to
> {code:java}
> graph = GraphFactory.open('conf/fdb-psave-export.properties')
> a= 
> graph.compute(SparkGraphComputer).program(CloneVertexProgram.build().create()).submit().get()
> a.toString()
> {code}
> This asks the GraphBinaryMessageSerializer to serialize String instead of 
> DefaultComputerGraph.
> I'm wondering is it possible to change the GraphBinaryMessageSerializer to 
> automatically handle this.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to