Open youngcle opened 8 years ago
thrift的max frame size是写死的,最大只能16384000,超了就有问题了。你jar包本身没什么问题,nimbus client会分片上传的。
从实际效果看,没有切片上传。
只能从减小topology入手,我又重新检查了一遍我的topology,又经过了多次测试,解决方法如下:
1、thrift传递的是序列化后的对象实例,对象实例的大小是关键。 2、我的topology其中一个bolt中包括了几个大的数组,在创建实例时即创建。将这及个数组的初始化时机延后到prepair中,而prepair的运行是在assign到worker中后,对于thrift来说,需要传输的实例大小大大缩小,至少我的问题得到了解决。
对于jstorm(storm)来说,问题没有得到解决,网上不少人遇到此问题,也没有有效的答复。。
我的意思是你提交的时候,如果jar本身很大,比如有几十M,jstorm会把jar本身分成多个chunk上传到nimbus server。你提的应该是另外一个问题,是说你build出来的topology过大而导致超过了thrift的max frame size,这个的确是没有办法解决,但是对于大对象的初始化,我们是建议在open/prepare中来做的。在这种情况下,一般很少会超过max frame size。
我建议开发方把这事放在必要的说明文件中!!!!
google出来的解决方案没有一个提到这件事,没有一个能解决。
你之前如果能说明“对于大对象的初始化,我们是建议在open/prepare中来做”,可以省去我不少时间
OK,我加到FAQ里面去
谢谢 youngcle
麻烦提交一个issue 到github, 我们跟进这个问题,然后,让别人也可以搜索到
2016-03-30 11:06 GMT+08:00 Cody notifications@github.com:
OK,我加到FAQ里面去
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/alibaba/jstorm/issues/230#issuecomment-203222585
jstorm2.1.1提交topology失败错误(Failed to assign org.apache.thrift.transport.TTransportException: null)
最近写了一个topolgy,local模式调试通过,遂提交至distributed模式,报错,
奇怪的是我将topology中有一个bolt注释掉后就可以正常提交了。jar包(包括依赖)总体为9MB。
照着google上搜索的经验在storm.yaml中增加了一条nimbus.thrift.max_buffer_size: 20000000 依然失败。只是nimbus中的提示从A变成了B: A(增加之前) [ERROR 2016-03-27 22:20:55 o.a.t.s.AbstractNonblockingServer$FrameBuffer:356 Thread-16] Read a frame size of 17302738, which is bigger than the maximum allowable buffer size for ALL connections. B(增加之后) [WARN 2016-03-27 22:22:35 o.a.t.s.AbstractNonblockingServer$FrameBuffer:522 pool-8-thread-6] Exception while invoking! org.apache.thrift.transport.TTransportException: Frame size (17302738) larger than max length (16384000)!
jstorm jar出错信息和nimbus出错信息如下所示:
jstorm jar xxxx.jar topogy conf.yaml,错误信息 2344 [main] WARN backtype.storm.StormSubmitter - Failed to assign org.apache.thrift.transport.TTransportException: null at org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:132) ~[libthrift-0.9.2.jar:0.9.2] at org.apache.thrift.transport.TTransport.readAll(TTransport.java:86) ~[libthrift-0.9.2.jar:0.9.2] at org.apache.thrift.transport.TFramedTransport.readFrame(TFramedTransport.java:129) ~[libthrift-0.9.2.jar:0.9.2] at org.apache.thrift.transport.TFramedTransport.read(TFramedTransport.java:101) ~[libthrift-0.9.2.jar:0.9.2] at org.apache.thrift.transport.TTransport.readAll(TTransport.java:86) ~[libthrift-0.9.2.jar:0.9.2] at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:429) ~[libthrift-0.9.2.jar:0.9.2] at org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:318) ~[libthrift-0.9.2.jar:0.9.2] at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:219) ~[libthrift-0.9.2.jar:0.9.2] at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:69) ~[libthrift-0.9.2.jar:0.9.2] at backtype.storm.generated.Nimbus$Client.recv_submitTopology(Nimbus.java:243) ~[jstorm-core-2.1.1.jar:na] at backtype.storm.generated.Nimbus$Client.submitTopology(Nimbus.java:227) ~[jstorm-core-2.1.1.jar:na] at backtype.storm.StormSubmitter.submitTopology(StormSubmitter.java:127) [jstorm-core-2.1.1.jar:na] at backtype.storm.StormSubmitter.submitTopology(StormSubmitter.java:59) [jstorm-core-2.1.1.jar:na] at cast.c503.sec.topology_xx1102.DecompressTopology.SetRemoteTopology(DecompressTopology.java:218) [SPF.jar:2.3] at cast.c503.sec.topology_xx1102.DecompressTopology.main(DecompressTopology.java:276) [SPF.jar:2.3]
—————————————————————————————————————————————
nimbus.log错误信息
[INFO 2016-03-27 22:22:35 c.a.j.d.n.ServiceHandler:571 pool-8-thread-5] Finished uploading file from client: /data/jstorm-2.1.1/data/nimbus/inbox/3233b7a5-1964-410d-83e5-f9e1d304d5b4/stormjar-3233b7a5-1964-410d-83e5-f9e1d304d5b4.jar
[WARN 2016-03-27 22:22:35 o.a.t.s.AbstractNonblockingServer$FrameBuffer:522 pool-8-thread-6] Exception while invoking! org.apache.thrift.transport.TTransportException: Frame size (17302738) larger than max length (16384000)!