运行时遇到如下异常,原因是由于hmget返回的List含有null成员,导致thrift编码时异常:
20160415 14:55:39 ERROR org.apache.thrift.server.AbstractNonblockingServer$FrameBuffer.invoke(AbstractNonblockingServer.java:484) [Thread-0] Unexpected throwable while invoking!
java.lang.NullPointerException
at org.apache.thrift.protocol.TBinaryProtocol.writeString(TBinaryProtocol.java:185)
at com.test.redis_cluster_proxy.RedisClusterProxyService$hmget_result$hmget_resultStandardScheme.write(RedisClusterProxyService.java:19434)
at com.test.redis_cluster_proxy.RedisClusterProxyService$hmget_result$hmget_resultStandardScheme.write(RedisClusterProxyService.java:1)
at com.test.redis_cluster_proxy.RedisClusterProxyService$hmget_result.write(RedisClusterProxyService.java:19337)
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:53)
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
at org.apache.thrift.server.AbstractNonblockingServer$FrameBuffer.invoke(AbstractNonblockingServer.java:478)
at org.apache.thrift.server.TNonblockingServer.requestInvoke(TNonblockingServer.java:115)
at org.apache.thrift.server.AbstractNonblockingServer$AbstractSelectThread.handleRead(AbstractNonblockingServer.java:209)
at org.apache.thrift.server.TNonblockingServer$SelectAcceptThread.select(TNonblockingServer.java:198)
at org.apache.thrift.server.TNonblockingServer$SelectAcceptThread.run(TNonblockingServer.java:154)