Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-1045

Client-Side Hangs when attempting to access a HashMap with Keys of type Integer

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.1.0-incubating
    • 3.1.1-incubating
    • server
    • None

    Description

      I try to use a HashMap that has keys of type Integer, and send the following request:

      gremlin> map = [1: "hello", 2: 3]
      ==>1=hello
      ==>2=3
      gremlin> map[1]
      ==>hello
      gremlin> map[2]
      ==>3
      gremlin> client = Cluster.build().create().connect().alias("graph.g")
      ==>org.apache.tinkerpop.gremlin.driver.Client$ReboundClusteredClient@cda4919
      gremlin> client.submit('1+1').all().get()
      ==>result{object=2 class=java.lang.Integer}
      gremlin> client.submit('map[1]', map).all().get()
      
      
      The client-side ends up hanging. The Gremlin Server logs give this, which is to be expected, as explained to me by Stephen:
      
      
      WARN  [gremlin-server-worker-1] 2015-12-16 00:34:26,609  Slf4JLogger.java:151 - An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
      io.netty.handler.codec.DecoderException: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
      	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:99) [netty-all-4.0.33.dse.jar:4.0.33.dse]
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318) [netty-all-4.0.33.dse.jar:4.0.33.dse]
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304) [netty-all-4.0.33.dse.jar:4.0.33.dse]
      	at com.datastax.bdp.graph.plugin.GremlinServerGraphHandler.handleRequestMessage(GremlinServerGraphHandler.java:94) [dse-graph-5.0.0-DSP-5175.jar:5.0.0-DSP-5175]
      	at com.datastax.bdp.graph.plugin.AbstractRequestMessageHandler.channelRead(AbstractRequestMessageHandler.java:62) [dse-graph-5.0.0-DSP-5175.jar:5.0.0-DSP-5175]
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318) [netty-all-4.0.33.dse.jar:4.0.33.dse]
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304) [netty-all-4.0.33.dse.jar:4.0.33.dse]
      	at com.datastax.bdp.cassandra.audit.GremlinServerAuditLogRequestHandler.handleRequestMessage(GremlinServerAuditLogRequestHandler.java:32) [dse-graph-5.0.0-DSP-5175.jar:5.0.0-DSP-5175]
      	at com.datastax.bdp.graph.plugin.AbstractRequestMessageHandler.channelRead(AbstractRequestMessageHandler.java:62) [dse-graph-5.0.0-DSP-5175.jar:5.0.0-DSP-5175]
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318) [netty-all-4.0.33.dse.jar:4.0.33.dse]
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304) [netty-all-4.0.33.dse.jar:4.0.33.dse]
      	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) [netty-all-4.0.33.dse.jar:4.0.33.dse]
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318) [netty-all-4.0.33.dse.jar:4.0.33.dse]
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304) [netty-all-4.0.33.dse.jar:4.0.33.dse]
      	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) [netty-all-4.0.33.dse.jar:4.0.33.dse]
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318) [netty-all-4.0.33.dse.jar:4.0.33.dse]
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304) [netty-all-4.0.33.dse.jar:4.0.33.dse]
      	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) [netty-all-4.0.33.dse.jar:4.0.33.dse]
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318) [netty-all-4.0.33.dse.jar:4.0.33.dse]
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304) [netty-all-4.0.33.dse.jar:4.0.33.dse]
      	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) [netty-all-4.0.33.dse.jar:4.0.33.dse]
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318) [netty-all-4.0.33.dse.jar:4.0.33.dse]
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304) [netty-all-4.0.33.dse.jar:4.0.33.dse]
      	at io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandler$1.channelRead(WebSocketServerProtocolHandler.java:147) [netty-all-4.0.33.dse.jar:4.0.33.dse]
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318) [netty-all-4.0.33.dse.jar:4.0.33.dse]
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304) [netty-all-4.0.33.dse.jar:4.0.33.dse]
      	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:276) [netty-all-4.0.33.dse.jar:4.0.33.dse]
      	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:263) [netty-all-4.0.33.dse.jar:4.0.33.dse]
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318) [netty-all-4.0.33.dse.jar:4.0.33.dse]
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304) [netty-all-4.0.33.dse.jar:4.0.33.dse]
      	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:848) [netty-all-4.0.33.dse.jar:4.0.33.dse]
      	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131) [netty-all-4.0.33.dse.jar:4.0.33.dse]
      	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511) [netty-all-4.0.33.dse.jar:4.0.33.dse]
      	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468) [netty-all-4.0.33.dse.jar:4.0.33.dse]
      	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382) [netty-all-4.0.33.dse.jar:4.0.33.dse]
      	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354) [netty-all-4.0.33.dse.jar:4.0.33.dse]
      	at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112) [netty-all-4.0.33.dse.jar:4.0.33.dse]
      	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_40]
      Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
      	at org.apache.tinkerpop.gremlin.server.op.AbstractEvalOpProcessor$$Lambda$451/1156928780.test(Unknown Source) ~[na:na]
      	at java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90) ~[na:1.8.0_40]
      	at java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1812) ~[na:1.8.0_40]
      	at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126) ~[na:1.8.0_40]
      	at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:529) ~[na:1.8.0_40]
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:516) ~[na:1.8.0_40]
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:502) ~[na:1.8.0_40]
      	at java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230) ~[na:1.8.0_40]
      	at java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196) ~[na:1.8.0_40]
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_40]
      	at java.util.stream.ReferencePipeline.anyMatch(ReferencePipeline.java:449) ~[na:1.8.0_40]
      	at org.apache.tinkerpop.gremlin.server.op.AbstractEvalOpProcessor.validateEvalMessage(AbstractEvalOpProcessor.java:137) ~[gremlin-server-3.1.1-SNAPSHOT-20151209-e1624745.jar:3.1.1-SNAPSHOT-20151209-e1624745]
      	at org.apache.tinkerpop.gremlin.server.op.AbstractEvalOpProcessor.select(AbstractEvalOpProcessor.java:114) ~[gremlin-server-3.1.1-SNAPSHOT-20151209-e1624745.jar:3.1.1-SNAPSHOT-20151209-e1624745]
      	at com.datastax.bdp.graph.plugin.DseOpSelectorHandler.decode(DseOpSelectorHandler.java:83) ~[dse-graph-5.0.0-DSP-5175.jar:5.0.0-DSP-5175]
      	at com.datastax.bdp.graph.plugin.DseOpSelectorHandler.decode(DseOpSelectorHandler.java:42) ~[dse-graph-5.0.0-DSP-5175.jar:5.0.0-DSP-5175]
      	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89) [netty-all-4.0.33.dse.jar:4.0.33.dse]
      	... 37 common frames omitted
      

      Any way to stop the hang on the client-side?

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            spmallette Stephen Mallette
            shaunakdas88 Shaunak Das
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment